The final goal of this project is to retrieve RSS feeds and display the contained articles in a flask web application with a Swagger interface for a user who subscribed to it.
[x] Application shows RSS stream on the terminal
[x] Application shows RSS stream in a web UI
[ ] Application has one scrapper component and one reader component
[ ] Application support multiple user profiles
03/04/2023 :
First iteration of the project.
Installation of the "Feedparser" lib and creation of a python script that retrieves some information from an rss feed link.
07/04/2023 :
Add some information retrieved by the python script.
Some problem using flask. Even if installed, the script seems not to find it and can't use it.
11/04/2023 :
Problem with flask was related to the script file naming (don't name it "flask.py")
Create a flask web application that display "hello world!" on http://127.0.0.1:5000/.
Followed flask tuto to create a web app that display some post (with titles, timstamp, link and content) from a local db initialized by a init_db python script
Db is initialized with values retrieved from an RSS feed url.
12/04/2023 :
Project is migrated on Zenika GitHub organization.
README.md file upgraded.
CONTRIBUTING.md file added
13/04/2023 :
init_db.py is now executed when flask run.
14/04/2023 :
We can now have multiple rss feeds in init_db.
Post content in html is now interpreted as html (not just a string).
17/04/2023 :
Rss feed URLs are now read from a RssFeeds
file.
Flask run will ask user if they want to generate the database.db.
Add a new page feed
.
19/04/23 :
Ordered feed and post by name.
Feed Filter by name.
20/04/23 :
Testing swagger interface.
21/04/23 :
Adapting test swagger interface to rss feed.
Missing information from some feeds causes problems for swagger
api/version_1 just a flask app that display hom page
api/version_2 swagger test app that can retrieve some informations (people) on http://localhost:8080/api/ui/
api/version_3 try to retrieve Rss feed infos like we retrieved people infos in version_2
Make sure you have python
and therefore pip
installed.
Download all the python packages required.
You can do it from the requirements.txt file with pip
:
pip install -r requirements.txt --use-pep517 --user
The --use-pep517 is required by sgmllib (a dependency of feedparser) and the --user is required by flask.
Tell Flask witch python app you want to use :
export FLASK_APP=app.py
Run the flask web application with:
flask run
We need a database.db file.
One is already in the project file to avoid you to generate it yourself, but you can edit the Rssfeeds
file to add, replace or delete some Rss feed url and the app will then ask if you want to generate a new database.db file from the actual RssFeeds
file.
Do you want to create a new database.db from actual RssFeeds file ? (Y/N)
The generation can take a few minutes.
Then go on your favorite internet Browser to the url :
http://127.0.0.1:5000/
đ¤ Jason Sycz
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a âď¸ if this project helped you!