Suitable code for displaying an RSS feed as a list on a post?

Just did it! I replaced the above blog feed with your Pocket feed. Check the app again here and see if the post updates with your additions.

Hmm, well its displaying a list of my feed, but its not updating.

Would it be instant, or does it take time to update?

Interesting - it looks like the link for your Pocket feed hasn’t updated yet. I still see the ‘7 Twitter Accounts for Outstanding Longreads’ as the first link.

But it could totally be something wrong with the code. I will keep investigating!

Actually it is, if you look at the 2 entries below “7 twitter accounts…” the xml feed is updating but the app hasnt.

You’re totally right @digitalgyoza. My bad! I will keep working on it and let you know if anything changes.

Ha! Thats very kind of you!

Okay now it should work! Try updating it again. The app should update the post now.

1 Like

It works! Thats fantastic. Can you share the code to make this happen?

1 Like

Sure thing @digitalgyoza. I just need to update the code so it can be used by anyone with whatever RSS feed. Should have the code and a how-to up soon!

1 Like

Alright the code to make the updating RSS feed list post happen is right here.

Just remix the app on Glitch and follow the instructions on the README file. Let me know if you have any questions with implementation. It is a tad tricky but should work for you!

Have fun!

1 Like

Ok so the terminal part is a problem for me. I dont use linux, and the Chrome OS Crosh has issues with this too… any suggestions?

EDIT: Whilst I look into the terminal side further (hopefully something i can look at when i’m back in front of my PC), I have found a temporary solution using Embedly.

https://write.as/digitalgyoza/links

Sadly, I dont seem to have access to a suitable terminal… is this a linux only thing? Powershell and windows CMD doesnt like Curl … I may be using the completely wrong thing here, lol.

Nah I don’t think you are wrong. Maybe I have been taking curl for granted all this time haha! I use iTerm2 for Mac OS.

In the meantime, I created a simple app that allows you to log in as you usually do to grab an access token. Try it out here and use the token you get to bypass the terminal stuff. Hope that helps!

Ok, so the token seemed to work, but when I add /xml and it redirects to the write.as post, it’s empty with no RSS feed. Stumped!

Hmm that is interesting. Are you using the Pocket RSS feed or something different? Could I look at your Glitch project url? I won’t be able to see the token but I will see what the other code looks like. Maybe there is something in there beyond what we can discuss.

Here you go https://axiomatic-breeze-1.glitch.me/

Thanks @digitalgyoza! It looks like something with the token.

In stuff.py for the ‘token’ variable up top, copy the value you put in os.environ.get() and replace it with ‘TOKEN’. It should look like this:

token = os.environ.get('TOKEN')

Now paste that value into the .env file (the one with the key next to it). It should be formatted as follows (no spaces and all):

TOKEN="abcd-1234-efgh-5678"

Then refresh the app and try it again to see what happens. The post should update with the list!

Oh gosh, I’m so silly… I placed the actual token in both fields! Got it to work finally. Thanks once again!

https://digitalgyoza.writeas.com/links

I have noticed that if I write some standard text as an intro before the feed links, and then the RSS feed updates itself, it removes the manually added text. how could I overcome this?

Awesome! No problem at all.

Funny you mention the intro text - that is the one thing I want to implement next with this. I will spin something up and let you know where to add it into the Glitch app. Shouldn’t be too complicated.

1 Like

So I found a way to add introductory text to the post. I added it to the original app here so go ahead and remix it. The text will be added in stuff.py like the other values.

For you @digitalgyoza, just paste what you have into the ‘intro’ variable like so:

intro = '![](https://i.snap.as/b4xSz26.jpg)\nVarious articles, websites and other interesting snippets that have caught my eye for future reading...'

Hope that helps! Let me know if it works.

1 Like