document date stuff

This commit is contained in:
Alexis Marie Wright 2022-04-16 21:49:33 -04:00
parent e41e395f12
commit cf1c7adc54
1 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,16 @@ Because the site isn't generated from any kind of content-management system, the
HTML parsing is surprisingly flexible, but not bulletproof, and not all of the information this script uses is encoded in the site's HTML - some of it, notably page numbers and titles, has to come from the plain(ish) text of the Archives page. *So if you change how you structure the Archives page, or the comic pages, this script is likely to break.*
*** Dates
Put simply: There aren't any! I wasn't able to find anything in the site content that identified a publication date for each of the comic pages.
That's not a problem for the site, but it /is/ potentially a problem for RSS readers - if we don't provide /something/ for a date, it isn't safe to assume all readers will be able to show the feed items in the correct order.
This script deals with that by faking it based on when the script is run. That /should/ work OK, but may behave a little strangely if there's an existing feed XML file, and more than one new item has been posted on the site since the last time the script was run. In that case, the easiest fix is probably to delete the feed XML file.
(Note also that, because the script does have to make up dates as it goes along, deleting the feed XML file will change all the dates in it. This /shouldn't/ be a problem; RSS readers have other ways to know whether two items in different versions of a feed are the same.)
*** Error handling
The script can emit considerable debugging information to its output, and tries to be pretty good about explaining why things break when they do. The script also tries hard to ensure that, if anything /does/ break, the worst that happens is that the feed XML isn't updated - the idea is, it may not gain new pages right away, but it will at least stay correct with what it has.
@ -134,6 +144,12 @@ You might have changed how the Archives page is structured.
Outside of the comic image itself, all information for a given comic page comes from its entry in the Archives page. As mentioned above, that needs to stay consistent in order to be correctly parsed. The fix is the same, too: change either the page or the script such that the script can parse the page.
*** Dates aren't in the right order in the feed file
More than one item might have been posted on the site since the last time the script ran. See the discussion of date handling above for details. (And let me know about it! If that /is/ a real problem, then it's one worth fixing.)
*Fix:* Delete the existing feed file and let the script create a new one from scratch.
*** None of that helped or something else is going wrong
Something else broke. :) Consult your server admin for advice - I'm happy to provide support with the script implementation itself, but there's not much I can do about the way the server is set up. That said, if your server admin needs to talk to me, they can hit me up via fedi ([[https://tilde.zone/@alexis][@alexis@tilde.zone]]) or email ([[mailto:lexie@alexis-marie-wright.me][lexie@alexis-marie-wright.me]]).