This commit is contained in:
emma 2025-01-01 14:57:24 -05:00
parent 55d5c8b820
commit bb754fa750
3 changed files with 10 additions and 11 deletions

View File

@ -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-12-31-10:00.jpg alt="A picture of a cat"> <img class="cat-img" src=img/cat2025-01-01-14:40.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>

View File

@ -64,11 +64,11 @@ def update_html_img_tag(index):
index_file = f.read() index_file = f.read()
element_list = index_file.split('\n') element_list = index_file.split('\n')
print(element_list)
items = "" items = ""
for el in element_list: for el in element_list:
if "<img" in el: if " <img" in el:
items += el items += el
split_img_element = items.split(" ") split_img_element = items.split(" ")
time = datetime.datetime.today() time = datetime.datetime.today()
time = str(time).strip() time = str(time).strip()
@ -81,7 +81,6 @@ def update_html_img_tag(index):
img_element_as_list = in_progress_img_tag.split(" ") img_element_as_list = in_progress_img_tag.split(" ")
new_img_tag = " ".join(img_element_as_list) new_img_tag = " ".join(img_element_as_list)
index_file = index_file.replace(items, new_img_tag) index_file = index_file.replace(items, new_img_tag)
with open(index, "w") as f: with open(index, "w") as f:

10
rss.xml
View File

@ -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>Mon, 28 Oct 2024 08:37:10 -0500</lastBuildDate> <lastBuildDate>Wed, 01 Jan 2025 14:17:25 -0500</lastBuildDate>
<item> <item>
<title>One cat per day!</title> <title>One cat per day!</title>
<link>https://onecatper.day#13802732918456937153935740295791</link> <link>https://onecatper.day#44916540192597240931585686089577</link>
<description>One cat per day!</description> <description>One cat per day!</description>
<pubDate>Mon, 28 Oct 2024 08:37:10 -0500</pubDate> <pubDate>Wed, 01 Jan 2025 14:17:25 -0500</pubDate>
<guid isPermaLink="false">https://onecatper.day#54549609790825238168636521505486</guid> <guid isPermaLink="false">https://onecatper.day#75056952922079383819793489552617</guid>
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2024-10-28-08:37.jpg"/> <enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2025-01-01-14:17.jpg"/>
</item> </item>
</channel> </channel>
</rss> </rss>