Skip to content

Instantly share code, notes, and snippets.

@Stilic
Last active April 26, 2021 10:56
Show Gist options
  • Save Stilic/175dd31c2be385cb4f53ba4cea2571ea to your computer and use it in GitHub Desktop.
Save Stilic/175dd31c2be385cb4f53ba4cea2571ea to your computer and use it in GitHub Desktop.
"Pro type" RSS reader
Rich Reader
===========
"Pro type" RSS reader GUI writtent in Python 3 with Feedparser and GUIzero.
Install for first launch
------------------------
For launch it, just type in a terminal `pip3 install --upgrade feedparser guizero || python3 RichReader.py`.
from guizero import *
import feedparser
app = App(title="Rich Reader")
url = TextBox(app, width=23)
def list_view(v):
try:
txt.value = feed["feed"][v]
except KeyError:
txt.value = "<Nothing here>"
def conn():
global feed, list
list.destroy()
feed = feedparser.parse(url.value)
list = ListBox(app, items=feed.entries[1], scrollbar=True, command=list_view)
connect = PushButton(app, text="Connect", command=conn)
txt = TextBox(app, multiline=True, scrollbar=True, width=30, height=5, enabled=False)
list = ListBox(app)
app.display()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment