so rss is this really cool tech we all love but when you're writing your entire static website by hand you also have to update your feed by hand and it gets just slightly annoying. i don't really know python but it's a testament to the language's noob-friendliness that i quickly wrote a basic script to do this for me, saving probably no more than two minutes of effort whenever i update my feed. it could be better but works for now. i'll edit the page if i can improve it.
look i'm sorry but my guide pressuposes basic command line stuff like knowing where you are and how to change directories. i believe in you. oh and obviously you need python. i'm pretty sure the script doesn't need v3, but it's what i have in this machine.
if you'd rather have a graphical interface, i recommend karma chameleon's tool, which does this with js on your browser. russhdown is a similar tool that can generate and update the xml file itself, it's meant more as a rss-as-social-media thing where you use it for posts rather than to talk about updates, but you can use it in whatever way you like so. i'm sharing.
you'll also need a xml feed to update. here's a simple rss setup guide for that.
"%a, %d %b %Y %H:%M:%S -0300"
, change the -0300 part to your utc offset. you'll need to change this whenever you change timezones, which is the part of the script i wish i could also automate but haven't figured out yet, but i'm not exactly globetrotting so it doesn't matter really.YOUR WEBSITE HERE
you should add your website url, obviously. the format is simply https://solflo.neocities.org/ (trailing slash important)python3 rss.py
, hit enter. if python3 doesn't work just use plain python. idk. it'll ask you for three things (just type / paste and hit enter):
<![CDATA[]]
means you can use html within the description, including images, but it's completely optional — it's kinda cumbersome to write stuff like multiple paragraphs directly in the terminal though, and you can delete it from the script if you like the clean look better.
from time import localtime, strftime
# get date time and format it properly
# change the '-0300' part to your UTC offset
pub_date = strftime("%a, %d %b %Y %H:%M:%S -0300", localtime())
# get info like title etc
title = input("title: ")
path = input("path: ")
description = input("description: ")
# final copy pastable item
print(
"""
<item>
<title>""" + title + """</title>
<pubDate>""" + pub_date + """</pubDate>
<link>https://solflo.neocities.org/""" + path + """</link>
<description><![CDATA[
""" + description + """
]]></description>
</item>
"""
)
you're welcome to modify and redistribute the code to your heart's content. and maybe let me know if you can automate the utc offset part thing?