sneakers-the-rat / paper-feeds

A FastAPI web server for creating RSS feeds for scholarly journals with the magic of adversarial interoperability
GNU General Public License v3.0
62 stars 4 forks source link

Generate OPML file #22

Open roaldarbol opened 9 months ago

roaldarbol commented 9 months ago

For multi-feed export we need to generate an OPML file, so we need functionality to generate the file content.

I have previously done that in R (https://github.com/roaldarbol/rss-journals/blob/e4c75c0179ef15d2f630d905a383e35a8d969e14/R/functions.R) for a similar project, so we can just reimplement that in python. I can take a swing at it one of the coming days.

sneakers-the-rat commented 9 months ago

yes! I think we will want to do something similar to the fastapi_rss package we're using for the feeds, make a pydantic model and a renderer method so we can use fastapi's automatic documentation and whatnot, but from your example it looks like that will be pretty straightforward :)

roaldarbol commented 9 months ago

The OPML structure is super simple, so that part is not that tricky! I've never used pydantic before, but maybe a good time to learn that. Otherwise feel free to take a swing at it - I'll have to work on my actual PhD today unfortunately 😅