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.

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