Open andychu opened 3 years ago
Coming here from Reddit.
I noticed in the Lobsters thread you were asking for examples on generating feeds. I'll volunteer mine (hope that's OK).
I usually avoid text templates with XML, and prefer to build it instead, so I don't accidentally introduce escaping issues.
I'm using feedgen for my website; you can find the code using it here (70 LOC; example output here). Some notes:
# required
(IIRC feedgen complains if they're not set); feel free to leave anything else out.fe.content(...)
bit at the end.thingie
is a DAO-style object, page
a data object (defined here); you'll need to plug your own data (you can obviously hard-code more than I did).get_children(tags=['tag'])
returns the pages for tag
); you can strip the tag-related bits out as well if you don't need them.The only issue with this approach is that it keeps the whole feed in memory, but this wasn't a problem for me (yet); usually feeds only have the last 100-500 articles anyway.
(BTW, you can consider the linked code in the public domain.)
Since I kinda instigated this issue being made (in the lobste.rs comment link), I ought to say
(BTW, you can consider the linked code in the public domain.)
same goes for the atom.sh
script referenced in your post @andychu. Feel free to use it, I just want a nice feed for this blog :)
Thank you @lemon24 and @somasis ! I want to get to this, although I realized #974 to use git instead of rsync is a little higher priority. My deployment workflow is a little wonky.
Also curious if either of you have used git annex or Git LFS and have any opinions? This is for the deployed data on the website, not the source data, which fits in regular git.
I start using git annex in March, and it's pretty good. Although a few things confused me, and I'm not sure I want to make it a dependency for the oilshell.org website. Probably I could get away with git + rsync for big files. Although that might be similar to building my own git annex -- since git annex does invoke rsync for as far as I understand :)
Also curious what Atom/RSS reader you use?
No experience with annex/LFS, sorry.
I use my own feed reader, https://github.com/lemon24/reader – that's part of the reason why I'm relatively familiar with the formats.
If I wanted to try mkaing a PR for this, where would I start? Can you give me a pointer to where the code that produces the blog lives?
Thanks for pinging this after 3 years :) The plan right now is to move to a new domain https://oils.pub/
Along with that, in theory I would like to overhaul the blog infrastructure, and I do think it's about time for an Atom/RSS feed. (Since this bug was filed, I've gotten a steady stream of inquiries)
But there have been few blog posts lately, mostly just announcements, mainly because we are deep in design work on YSH, which is a huge project
Everything is happening on Zulip now, so there's not much on the blog
The blog code has never been open source -- I would like to make the eventual code for https://oils.pub/ open source, precisely so other people can contribute.
(And I would like it to be in YSH, which is starting to look feasible ... maybe not for the initial version though)
I guess the short answer is open sourcing the existing blog is a low priority, but you're welcome to come on Zulip, get a feel for what's blocking it, and maybe help out there.
Or you're welcome to ping again in 2, 4, or 6 weeks and see where things stand. Thanks for the interest!
Requested by a few users:
https://lobste.rs/s/0fxsey/updates_oil_faq
https://git.mutiny.red/somasis/www.somas.is/plain/atom.sh