spaces?
This commit is contained in:
parent
55d5c8b820
commit
bb754fa750
|
@ -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-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>
|
||||
<footer>
|
||||
<p>Made by emma for the love of cats. </p>
|
||||
|
|
9
main.py
9
main.py
|
@ -63,12 +63,12 @@ def update_html_img_tag(index):
|
|||
with open(index, "r") as f:
|
||||
index_file = f.read()
|
||||
element_list = index_file.split('\n')
|
||||
|
||||
|
||||
print(element_list)
|
||||
items = ""
|
||||
for el in element_list:
|
||||
if "<img" in el:
|
||||
if " <img" in el:
|
||||
items += el
|
||||
|
||||
split_img_element = items.split(" ")
|
||||
time = datetime.datetime.today()
|
||||
time = str(time).strip()
|
||||
|
@ -80,7 +80,6 @@ def update_html_img_tag(index):
|
|||
# cleaning up some things that don't need to be in the tag before writing it to index.html
|
||||
img_element_as_list = in_progress_img_tag.split(" ")
|
||||
new_img_tag = " ".join(img_element_as_list)
|
||||
|
||||
|
||||
index_file = index_file.replace(items, new_img_tag)
|
||||
|
||||
|
@ -109,4 +108,4 @@ def main():
|
|||
with open(f"{path}cat{DATETIME_STR}.jpg", "wb") as f:
|
||||
f.write(image.content)
|
||||
|
||||
main()
|
||||
main()
|
||||
|
|
10
rss.xml
10
rss.xml
|
@ -5,14 +5,14 @@
|
|||
<link>https://onecatper.day</link>
|
||||
<description>Source page: https://onecatper.day</description>
|
||||
<language>en</language>
|
||||
<lastBuildDate>Mon, 28 Oct 2024 08:37:10 -0500</lastBuildDate>
|
||||
<lastBuildDate>Wed, 01 Jan 2025 14:17:25 -0500</lastBuildDate>
|
||||
<item>
|
||||
<title>One cat per day!</title>
|
||||
<link>https://onecatper.day#13802732918456937153935740295791</link>
|
||||
<link>https://onecatper.day#44916540192597240931585686089577</link>
|
||||
<description>One cat per day!</description>
|
||||
<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"/>
|
||||
<pubDate>Wed, 01 Jan 2025 14:17:25 -0500</pubDate>
|
||||
<guid isPermaLink="false">https://onecatper.day#75056952922079383819793489552617</guid>
|
||||
<enclosure length="1000000" type="image/jpeg" url="https://onecatper.day/img/cat2025-01-01-14:17.jpg"/>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue