Almost-minimal filesystem based blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

184 lines
5.9 KiB

v6.0.0: expand EntryStore, test more, cache harder This commit is something of a hairball, the result of evenings-and-weekends hacking building up a set of changes that got out of hand in parallel. If I had the energy to spare, I would break it apart into semantically-related changes, but I don't - and I suppose all this crap being rolled together is at least reflective of how the code was written. These changes are really half-finished, at best. Eventual goals: - App::WRT shouldn't directly touch the filesystem - App::WRT::EntryStore should model the entry archive completely - App::WRT::Renderer should say what to write to the publication directory - This one's a maybe: Filesystem interaction should pass through App::WRT::FileIO or something like it so that EntryStore and Renderer can be more usefully tested, with mocked writes (maybe) I do think this represents an inflection point in the long, silly life of this program: It includes a handful of new tests, and a number of the code changes were in turn easy to make because the test suite begins to model the code in a useful way. It's less and less necessary to run wrt against the p1k3.com archives to be sure that I haven't trashed something. Breaking changes to note: - Will no longer render HTML for nonexistent entries - Months and years which are flatfiles or contain an index are handled differently, albeit less brokenly - EntryStore includes index files in its overall list of entries (this seems to break less than I thought), which trickles out to bin/wrt-ls Overall changes herein: - App::WRT::Date - Move month_name() in here from App::WRT, add tests. - App::WRT::EntryStore - Hash file types for entries (directory or flatfile) - Use keys of file type hash for complete list of entries. - has_prop($entry, $property) - is_dir($entry), is_file($entry), is_extant($entry) - parent_of($entry) - has_index($entry) - Make EntryStore cache whether a file is a flatfile or a directory, as well as its existence, in a single hash. - Include index flatfiles in @source_files for use by has_index() - Various tests. - App::WRT::FileIO - Still duplicates a bunch of shit from Util, so that needs sorted. - App::WRT::Renderer - Convert to a proper class. - Add experimental FileIO class to use in Renderer (imperfect, tricky, still thinking about this). The idea is to separate out the concerns of reading and writing the filesystem. - App::WRT - Refactor display() and improve tests - Use "@entries" instead of "@options" for clarity - Handle entry names that might evaluate as false - Test running display() without any params - Rename expand_option() -> expand_alias(), refactor - Use EntryStore::has_prop() to detect wrt-noexpand.prop - year(), month(), entry() partially rewritten to use EntryStore - year() should handle months which are a flatfile - Refactor icon_markup() to use is_file() / is_dir() / is_extant(), add tests. - Add subtitle to feeds - bin/wrt-ls is now a "modulino" with tests - bin/display errors on non-existent entries - Build.PL - Remove bogus XML::Feed dependency
5 years ago
  1. Revision history for App::WRT
  2. v6.2.3 2019-05-16
  3. - bin/wrt-display: correctly expand new, fulltext, all
  4. v6.2.2 2019-05-16
  5. - EntryStore: stash sorted list of all entries as found
  6. v6.2.1 2019-05-16
  7. - bin/wrt-help
  8. - list more subcommands
  9. - fix display of utility name
  10. v6.2.0 2019-05-16
  11. - EntryStore: Add methods for further slicing entry list:
  12. - Days by month or year
  13. - Months by year
  14. - Immediate children and parents of entries
  15. - basename($entry)
  16. v6.1.0 2019-05-16
  17. - Add bin/wrt-help and bin/wrt-version
  18. - Includes -h, --help, -v, --version, -v aliases.
  19. v6.0.0 2019-05-06
  20. - App::WRT::Date
  21. - Move month_name() in here from App::WRT, add tests.
  22. - App::WRT::EntryStore:
  23. - Hash file types for entries (directory or flatfile)
  24. - Use keys of file type hash for complete list of entries.
  25. - has_prop($entry, $property)
  26. - is_dir($entry), is_file($entry), is_extant($entry)
  27. - parent_of($entry)
  28. - has_index($entry)
  29. - Make EntryStore cache whether a file is a flatfile or a directory, as
  30. well as its existence, in a single hash.
  31. - Include index flatfiles in @source_files for use by has_index()
  32. - Various tests.
  33. - App::WRT::FileIO
  34. - Still duplicates a bunch of shit from Util, so that needs sorted.
  35. - App::WRT::Renderer
  36. - Convert to a proper class.
  37. - Add experimental FileIO class to use in Renderer (imperfect,
  38. tricky, still thinking about this). The idea is to separate out the
  39. concerns of reading and writing the filesystem.
  40. - App::WRT
  41. - Refactor display() and improve tests
  42. - Use "@entries" instead of "@options" for clarity
  43. - Handle entry names that might evaluate as false
  44. - Test running display() without any params
  45. - Rename expand_option() -> expand_alias(), refactor
  46. - Use EntryStore::has_prop() to detect wrt-noexpand.prop
  47. - year(), month(), entry() partially rewritten to use EntryStore
  48. - year() should handle months which are a flatfile
  49. - Refactor icon_markup() to use is_file() / is_dir() / is_extant(),
  50. add tests.
  51. - Add subtitle to feeds
  52. - bin/wrt-ls is now a "modulino" with tests
  53. - bin/display errors on non-existent entries
  54. v5.0.0 2019-04-14
  55. - Add bin/wrt-ls for listing entries in current archive
  56. - Add bin/wrt-config for displaying configuration info
  57. - Allow header tags with attributes
  58. - Minor documentation cleanup
  59. - Bump XML::Atom::SimpleFeed to 0.900; remove wrt-fcgi
  60. - Concatenation instead of variable interpolation in HTML::tag()
  61. - Remove hardcoded "public" from renderer directory path copying
  62. - Remove unused feed_url param from wrt-init and example dir
  63. - Remove an extraneous JSON->convert_blessed(1) call
  64. - WRT::entry(): fix glitch with contents list for binfile_expr matches
  65. - Correctly encode feed output - see https://p1k3.com/2018/5/28/
  66. - Add App::WRT::Util::file_get_contents();
  67. - Optionally cache included files in-memory
  68. - Add EntryStore, a class for wrapping various methods for finding entry lists
  69. - Refactor display()
  70. - Use Carp for errors
  71. - Remove old LaTeX markup stuff
  72. - Add this Changes file
  73. v5.0.0-alpha 2018-04-19
  74. - Use 5 most recent entries for home page instead of latest month
  75. - Remove accessor methods for instance variables / configuration
  76. - Give absolute paths to imgsize() so it chills out on Cwd::getcwd() calls
  77. - Remove local_path(), recent_month(), month_before, and feed_print_latest()
  78. - Stop using a() in entry_markup()
  79. - Cache get_date_entries_by_depth() results
  80. - Swap out state vars for stashing things on $self in get_all_source_files()
  81. - Add get_date_entries_by_depth()
  82. - Tweak link_bar() behavior to retain link for current page
  83. v4.3.0 2018-04-06
  84. - Render feed for last feed_length day entries instead of for latest month
  85. - Switch example config from p1k3.com to example.com urls
  86. - feed_print() now takes a list of entries instead of a month
  87. v4.2.2 2018-02-10
  88. - Fix --config option to wrt-display & wrt-render-all
  89. - Remove year list from linkbar
  90. v4.2.1 2017-11-18
  91. - Change url_root default to /
  92. - Add url_root to topic link generator
  93. v4.2.0 2017-11-18
  94. - Improved documentation in shell utilities
  95. - Make a copy of %default before blessing
  96. - Document MethodSpit
  97. - Document the overlay option, add an accessor method for it
  98. - Use a logging callback to WRT::Renderer::render()
  99. - Miscellaneous test cleanup
  100. - Add publish_dir to example wrt.json
  101. - Improve documentation
  102. - Add $wrt->feed_alias and a .xml copy of same
  103. v4.1.0 2017-11-15
  104. - Add wrt-init for creating a skeleton project directory
  105. - Die on missing template file
  106. v4.0.1 2017-11-14
  107. - Fix App::WRT::Markup require of WRT::Image
  108. - Remove an unused dependency on Imager
  109. v4.0.0 2017-11-14
  110. - Rename WRT to App::WRT
  111. - Add a license info
  112. - Strip unused image size code from WRT::Image
  113. - Add publish_dir config value, ensure that dir exists when rendering
  114. - Add rendering tests
  115. v3.5.0 2017-11-13
  116. - wrt-render-all now handles /, /all, and /feed
  117. - Migrate wrt wrapper utilities to posix shell
  118. v3.4.2 2017-06-21
  119. - Add [0-9] to acceptable sub-entry characters
  120. v3.3.1 2017-06-19
  121. - Die on attempting to include a directory
  122. - Include datestamps in feed
  123. v3.3.0 2017-04-03
  124. - Add topic list to entries
  125. - List topics in datestamp
  126. - Clean up addprop output
  127. - Allow `-` in entry names, use .prop for properties
  128. - Simplify datestamps
  129. - Add wrt-noexpand property
  130. - Remove a sorta-extraneous trailing slash on contents
  131. v3.0.0 2016-10-12
  132. - Split wrt utility into git-style subcommands
  133. - Support for includes, change root_dir semantics, add entry_dir
  134. - addprop and findprop subcommands for dealing with entry properties
  135. v2.0.0 2016-08-09
  136. - Now called "wrt" instead of "display"
  137. - Extract http_header stuff from WRT module
  138. - Switch to wrt.json for configuration
  139. - Add XML::Feed and CGI::Fast to dependencies
  140. - Make wrt.fcgi work, more or less
  141. - Escape braces in variable interpolation regexp
  142. - Add --stdin flag