Twtxt is a text file which may be hosted over RSYNC, FTP, Gemini, Gopher, and even HTTP.
It is simple to parse.
def twtxt(content: str) -> dict:
feed = []
for line in content.split('\n'):
if line and not line.startswith('#'):
line_split = line.split(' ')
entry = {
'content' : line_split[1],
'date' : line_split[0]
}
feed.append(entry)
return feed
I wrote a module at https://git.xmpp-it.net/sch/Slixfeed/src/branch/master/src/slixfeed/parser/twtxt.py
Resources
Twtxt is a text file which may be hosted over RSYNC, FTP, Gemini, Gopher, and even HTTP.
It is simple to parse.
I wrote a module at https://git.xmpp-it.net/sch/Slixfeed/src/branch/master/src/slixfeed/parser/twtxt.py
Resources