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.

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