RSS TXT Parsers? (Or other solutions..?)

Hello! I was trying my best to write an txt to RSS parser, but failed, and now I’ve decided to just see if anyone else has something they use to make updating RSS feeds easier.

My site is self hosted on a VPS and relies mainly on PHP (with bits of JS here and there) which is why I wanted to write the code myself, but XML and I really dislike each other. I used to update the XML page by hand a really long time ago when the site was static and I had more motivation to handwrite everything back then… I really hate it and update my site fairly often so I just.. stopped when I lost motivation (and since neocities has its own updates feed/rss)

If you have an ideas, please let me know!

@yequari had an RSS feed generator tool - seems offline atm.

Yes I looked into it but it was offline.

Yeah I had a bug in there that kept causing it to crash but I couldn’t get the time to properly investigate so I stopped rebooting the service everytime it happened. I can look into getting it back online. In the meantime, you could take a look at the code and try running it yourself if you’re interested. I don’t remember if I got the CLI fully working (looks like there is a barebones version) but that might be an option too.

1 Like

I’ve been putting together a small PHP app that provides an RSS feed. It sounds like you’re comfortable with PHP, so even though it’s not general-purpose code you might be able to crib what you need. It’s not as robust as @yequari’s generator, but it does appear to put together valid RSS.

Here’s the code for the RSS page generator.

The trickiest parts for me were figuring out how and when to escape the text for XML, and how to render html as links in the descriptions. There are a couple helper functions that handle those things:

escape_xml
linkify

1 Like

In all fairness mine is only “robust” because of the excellent Go standard library packages I can build on top of :grin:

2 Likes

@greg @yequari Thank you both! I’m going to try to wrangle one of these for my purposes. I appreciate you!

2 Likes

I managed to wrangle one together in the end though I didn’t use TXT files or anything and it is imperfect :'D thnank you everyone