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:
parent
204f0ebbaf
commit
129e5bfd57
|
@ -21,7 +21,7 @@
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<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 -->
|
<!-- 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>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<p>Made by emma for the love of cats. </p>
|
<p>Made by emma for the love of cats. </p>
|
||||||
|
|
2
main.py
2
main.py
|
@ -10,7 +10,7 @@ import datetime
|
||||||
# better for it just to be a global
|
# better for it just to be a global
|
||||||
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
|
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
|
||||||
# we don't need those pesky microseconds any way
|
# we don't need those pesky microseconds any way
|
||||||
DATETIME_STR = DATETIME_STR[:-7]
|
DATETIME_STR = DATETIME_STR[:-10]
|
||||||
|
|
||||||
def get_image_url():
|
def get_image_url():
|
||||||
|
|
||||||
|
|
10
rss.xml
10
rss.xml
|
@ -5,14 +5,14 @@
|
||||||
<link>https://onecatper.day</link>
|
<link>https://onecatper.day</link>
|
||||||
<description>Source page: https://onecatper.day</description>
|
<description>Source page: https://onecatper.day</description>
|
||||||
<language>en</language>
|
<language>en</language>
|
||||||
<lastBuildDate>Tue, 01 Oct 2024 05:46:31 -0500</lastBuildDate>
|
<lastBuildDate>Mon, 28 Oct 2024 08:37:10 -0500</lastBuildDate>
|
||||||
<item>
|
<item>
|
||||||
<title>One cat per day!</title>
|
<title>One cat per day!</title>
|
||||||
<link>https://onecatper.day#98277929033324946536005614106589</link>
|
<link>https://onecatper.day#13802732918456937153935740295791</link>
|
||||||
<description>One cat per day!</description>
|
<description>One cat per day!</description>
|
||||||
<pubDate>Tue, 01 Oct 2024 05:46:31 -0500</pubDate>
|
<pubDate>Mon, 28 Oct 2024 08:37:10 -0500</pubDate>
|
||||||
<guid isPermaLink="false">https://onecatper.day#48930374247138023033213881531490</guid>
|
<guid isPermaLink="false">https://onecatper.day#54549609790825238168636521505486</guid>
|
||||||
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2024-10-01-05:46:31.jpg"/>
|
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2024-10-28-08:37.jpg"/>
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
|
@ -5,7 +5,7 @@ import datetime
|
||||||
# better for it just to be a global
|
# better for it just to be a global
|
||||||
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
|
DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-")
|
||||||
# we don't need those pesky microseconds any way
|
# 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
|
# refrence: https://cyber.harvard.edu/rss/rss.html#ltguidgtSubelementOfLtitemgt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue