gutenbergtools / autocat3

CherryPy App that serves dynamic content for Project Gutenberg
GNU General Public License v3.0
2 stars 6 forks source link

Remove "updated" entries from database and instead populate generated files with update dates from file timestamps #116

Closed gbnewby closed 4 months ago

gbnewby commented 6 months ago

Predecessor discussion & background is here: https://github.com/gutenbergtools/libgutenberg/issues/36#issuecomment-1874698748

My goals are:

  1. Continue to include formatted "Most recently updated: ..." fields in generated files' headers, just like this: https://github.com/gutenbergtools/libgutenberg/assets/926513/464b6c07-2d31-4cae-a5f0-e58ee7c20151
  2. Stop storing "Updated: Month Day, Year" or similar data in the 508 field in the catalog database. All those entries will be removed, so that only actual credit lines are stored in the catalog database 508 field. (We will permanently store those among the cache/feeds/ location, so people interested in that revision history can have it.)
  3. Include the update date on the landing page (via autocat3), similarly to how it appears now on landing pages such as https://www.gutenberg.org/ebooks/10000, but not with the "Credit" table label. Perhaps simply, "Updated" in the left-hand column, and a date like "January 2, 2024" in the right-hand column.

Based on some discussion with Eric, my understanding is that code already exists to perform #1 by looking at the file timestamps. Basically, files that have been updated some time after initial posting (say, at least 14 days - TBC) should have a "^tMost recently updated: Month Day, Year" field in the header. Where ^t is a tab or similar indentation under the "Release date:" and "Month Day, Year" is something like "January 2, 2024".

There should only be zero or one "Most recently updated: ..." lines in the header. We don't need to track previous revisions - those are handled via the "old/" subdirectory or in the per-book github repository. If/when the source file (HTML or text, usually, in the 1/2/3 filesystem) is updated, then the file timestamp is updated and a new date will be put into the "Most recently updated:" header the next time generated files are rebuilt.

eshellman commented 6 months ago

Thanks. I was planning to work on Autocat3 next week.

eshellman commented 4 months ago

fixed in #117