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.

199 lines
6.3 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.3.0 2019-06-23
  3. - Generalize iso_date() test for epoch to include all timezones
  4. v6.3.0 2019-06-22
  5. - Move get_date() from App::WRT::Util to App::WRT::Date
  6. - Make App::WRT::FileIO and ::Util less redundant
  7. - Add App::WRT::Mock::FileIO for faking writes in tests
  8. - Make bin/wrt-render-all testable, add t/bin-wrt-render-all.t
  9. v6.2.4 2019-05-28
  10. - Replace README.pod with a concise README.md
  11. v6.2.3 2019-05-16
  12. - bin/wrt-display: correctly expand new, fulltext, all
  13. v6.2.2 2019-05-16
  14. - EntryStore: stash sorted list of all entries as found
  15. v6.2.1 2019-05-16
  16. - bin/wrt-help
  17. - list more subcommands
  18. - fix display of utility name
  19. v6.2.0 2019-05-16
  20. - EntryStore: Add methods for further slicing entry list:
  21. - Days by month or year
  22. - Months by year
  23. - Immediate children and parents of entries
  24. - basename($entry)
  25. v6.1.0 2019-05-16
  26. - Add bin/wrt-help and bin/wrt-version
  27. - Includes -h, --help, -v, --version, -v aliases.
  28. v6.0.0 2019-05-06
  29. - App::WRT::Date
  30. - Move month_name() in here from App::WRT, add tests.
  31. - App::WRT::EntryStore:
  32. - Hash file types for entries (directory or flatfile)
  33. - Use keys of file type hash for complete list of entries.
  34. - has_prop($entry, $property)
  35. - is_dir($entry), is_file($entry), is_extant($entry)
  36. - parent_of($entry)
  37. - has_index($entry)
  38. - Make EntryStore cache whether a file is a flatfile or a directory, as
  39. well as its existence, in a single hash.
  40. - Include index flatfiles in @source_files for use by has_index()
  41. - Various tests.
  42. - App::WRT::FileIO
  43. - Still duplicates a bunch of shit from Util, so that needs sorted.
  44. - App::WRT::Renderer
  45. - Convert to a proper class.
  46. - Add experimental FileIO class to use in Renderer (imperfect,
  47. tricky, still thinking about this). The idea is to separate out the
  48. concerns of reading and writing the filesystem.
  49. - App::WRT
  50. - Refactor display() and improve tests
  51. - Use "@entries" instead of "@options" for clarity
  52. - Handle entry names that might evaluate as false
  53. - Test running display() without any params
  54. - Rename expand_option() -> expand_alias(), refactor
  55. - Use EntryStore::has_prop() to detect wrt-noexpand.prop
  56. - year(), month(), entry() partially rewritten to use EntryStore
  57. - year() should handle months which are a flatfile
  58. - Refactor icon_markup() to use is_file() / is_dir() / is_extant(),
  59. add tests.
  60. - Add subtitle to feeds
  61. - bin/wrt-ls is now a "modulino" with tests
  62. - bin/display errors on non-existent entries
  63. v5.0.0 2019-04-14
  64. - Add bin/wrt-ls for listing entries in current archive
  65. - Add bin/wrt-config for displaying configuration info
  66. - Allow header tags with attributes
  67. - Minor documentation cleanup
  68. - Bump XML::Atom::SimpleFeed to 0.900; remove wrt-fcgi
  69. - Concatenation instead of variable interpolation in HTML::tag()
  70. - Remove hardcoded "public" from renderer directory path copying
  71. - Remove unused feed_url param from wrt-init and example dir
  72. - Remove an extraneous JSON->convert_blessed(1) call
  73. - WRT::entry(): fix glitch with contents list for binfile_expr matches
  74. - Correctly encode feed output - see https://p1k3.com/2018/5/28/
  75. - Add App::WRT::Util::file_get_contents();
  76. - Optionally cache included files in-memory
  77. - Add EntryStore, a class for wrapping various methods for finding entry lists
  78. - Refactor display()
  79. - Use Carp for errors
  80. - Remove old LaTeX markup stuff
  81. - Add this Changes file
  82. v5.0.0-alpha 2018-04-19
  83. - Use 5 most recent entries for home page instead of latest month
  84. - Remove accessor methods for instance variables / configuration
  85. - Give absolute paths to imgsize() so it chills out on Cwd::getcwd() calls
  86. - Remove local_path(), recent_month(), month_before, and feed_print_latest()
  87. - Stop using a() in entry_markup()
  88. - Cache get_date_entries_by_depth() results
  89. - Swap out state vars for stashing things on $self in get_all_source_files()
  90. - Add get_date_entries_by_depth()
  91. - Tweak link_bar() behavior to retain link for current page
  92. v4.3.0 2018-04-06
  93. - Render feed for last feed_length day entries instead of for latest month
  94. - Switch example config from p1k3.com to example.com urls
  95. - feed_print() now takes a list of entries instead of a month
  96. v4.2.2 2018-02-10
  97. - Fix --config option to wrt-display & wrt-render-all
  98. - Remove year list from linkbar
  99. v4.2.1 2017-11-18
  100. - Change url_root default to /
  101. - Add url_root to topic link generator
  102. v4.2.0 2017-11-18
  103. - Improved documentation in shell utilities
  104. - Make a copy of %default before blessing
  105. - Document MethodSpit
  106. - Document the overlay option, add an accessor method for it
  107. - Use a logging callback to WRT::Renderer::render()
  108. - Miscellaneous test cleanup
  109. - Add publish_dir to example wrt.json
  110. - Improve documentation
  111. - Add $wrt->feed_alias and a .xml copy of same
  112. v4.1.0 2017-11-15
  113. - Add wrt-init for creating a skeleton project directory
  114. - Die on missing template file
  115. v4.0.1 2017-11-14
  116. - Fix App::WRT::Markup require of WRT::Image
  117. - Remove an unused dependency on Imager
  118. v4.0.0 2017-11-14
  119. - Rename WRT to App::WRT
  120. - Add a license info
  121. - Strip unused image size code from WRT::Image
  122. - Add publish_dir config value, ensure that dir exists when rendering
  123. - Add rendering tests
  124. v3.5.0 2017-11-13
  125. - wrt-render-all now handles /, /all, and /feed
  126. - Migrate wrt wrapper utilities to posix shell
  127. v3.4.2 2017-06-21
  128. - Add [0-9] to acceptable sub-entry characters
  129. v3.3.1 2017-06-19
  130. - Die on attempting to include a directory
  131. - Include datestamps in feed
  132. v3.3.0 2017-04-03
  133. - Add topic list to entries
  134. - List topics in datestamp
  135. - Clean up addprop output
  136. - Allow `-` in entry names, use .prop for properties
  137. - Simplify datestamps
  138. - Add wrt-noexpand property
  139. - Remove a sorta-extraneous trailing slash on contents
  140. v3.0.0 2016-10-12
  141. - Split wrt utility into git-style subcommands
  142. - Support for includes, change root_dir semantics, add entry_dir
  143. - addprop and findprop subcommands for dealing with entry properties
  144. v2.0.0 2016-08-09
  145. - Now called "wrt" instead of "display"
  146. - Extract http_header stuff from WRT module
  147. - Switch to wrt.json for configuration
  148. - Add XML::Feed and CGI::Fast to dependencies
  149. - Make wrt.fcgi work, more or less
  150. - Escape braces in variable interpolation regexp
  151. - Add --stdin flag