Squashing bugs I created and didn't test for :(

Moving the constant to two files caused the time
drift I warned myself about but forgot. I shaved
the seconds off of the constant as well since if
it takes an hour between downloading the image and
updating the feed and website, something out of my
control is going on
This commit is contained in:
emma 2024-10-28 08:51:33 -04:00
parent 204f0ebbaf
commit 129e5bfd57
4 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@
</header>
<main>
<!-- a more descriptive alt text is not possible, I can only know ahead of time that one or more catss will be in the image -->
<img class="cat-img" src=img/cat2024-10-01-06:00:03.jpg alt="A picture of a cat">
<img class="cat-img" src=img/cat2024-10-28-08:37.jpg alt="A picture of a cat">
</main>
<footer>
<p>Made by emma for the love of cats. </p>

View File

@ -10,7 +10,7 @@ import datetime
# better for it just to be a global
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
# we don't need those pesky microseconds any way
DATETIME_STR = DATETIME_STR[:-7]
DATETIME_STR = DATETIME_STR[:-10]
def get_image_url():

10
rss.xml
View File

@ -5,14 +5,14 @@
<link>https://onecatper.day</link>
<description>Source page: https://onecatper.day</description>
<language>en</language>
<lastBuildDate>Tue, 01 Oct 2024 05:46:31 -0500</lastBuildDate>
<lastBuildDate>Mon, 28 Oct 2024 08:37:10 -0500</lastBuildDate>
<item>
<title>One cat per day!</title>
<link>https://onecatper.day#98277929033324946536005614106589</link>
<link>https://onecatper.day#13802732918456937153935740295791</link>
<description>One cat per day!</description>
<pubDate>Tue, 01 Oct 2024 05:46:31 -0500</pubDate>
<guid isPermaLink="false">https://onecatper.day#48930374247138023033213881531490</guid>
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2024-10-01-05:46:31.jpg"/>
<pubDate>Mon, 28 Oct 2024 08:37:10 -0500</pubDate>
<guid isPermaLink="false">https://onecatper.day#54549609790825238168636521505486</guid>
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2024-10-28-08:37.jpg"/>
</item>
</channel>
</rss>

View File

@ -5,7 +5,7 @@ import datetime
# better for it just to be a global
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
# we don't need those pesky microseconds any way
DATETIME_STR = DATETIME_STR[:-7]
DATETIME_STR = DATETIME_STR[:-10]
# refrence: https://cyber.harvard.edu/rss/rss.html#ltguidgtSubelementOfLtitemgt