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.

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