Building my own RSS reader in Python, part 0

in github •  7 years ago  (edited)

I need a few projects on github that I can use as a showcase. But I don't have much free time, and the little that I do have I prefer not to spend on coding so that I can save my previous coding manna for when I do code for work. I chose a pet project that uses Python, a language I do not use at work, and one in which I would like to gain more proficiency. I'm building my own RSS reader!

There Must be a Library for This Sort of Thing

I'm not too familiar with Python, but one aspect of Python that I do know about is there is usually some sort of library to help you do the kind of thing you want to do. Which kind of libraries would I need here?

  • There is probably some kind of boilerplate feed reader that does most of the heavy lifting already
  • I prefer a command-line interface and ever since my studies I hate making UIs with a burning passion. But most people won't bother firing up the cold comfort of the command line to get a program running, so I'm going to have to make things pretty. I'm going to need a graphical user interface.

Low and behold, there are libraries for both in Python.

  • There is a library called Feedparser. Would this parse feeds? I wonder.
  • Python ships with TkInter, however you pronounce that. I have never made an user interface in Python so we'll see how this goes.

Is there another path that leads to the same dungeon?

It turns out yes, someone else already tried to slay this dragon in the same dungeon. There is an article on how to use Feedburner in Python on Python for Beginners. I'm not a complete noob! Some parts are missing!

Feed Me, Seymour!

Firstly, let's get the Feedburner up and running and see if this ancient technology still works.
feederStillFeeds.PNG

After punishing myself with Ninja IDE and eventually finding out that the syntax used in the tutorial is incompatible with my version of Python, I at least got my github to take my commits. I like Ninja IDE because it's neat and clean, but it doesn't seem suitable as a real workbench. IDLE gave me more helpful feedback. I think I'll be seeing what IntelliJ can do with Python from now on. That's another tool to learn.

study_all_the_things.jpg

Now everything is set up to the point where I can jump in. What now?

Is There Someone Else Who Modelled Data that needed to be Controlled and Displayed in a View?

Why, yes. Yes there is. It's called the Model-View-Controller pattern. I haven't done this in Python yet, but there is a helpful article on the MVC Paradigm summarised with Lego.

This is one of the most widely used patterns but it's one that still confuses me. What goes where? It has something to do with the Observer pattern, right? So which is the View? That part is easy, that's probably the Subscriber. But that does it talk to? The Publisher? Arg!

Coincidentally, MVC Paradigm summarised with Lego is a gem in more ways than one. Not only does it explain the MVC pattern very clearly, but it also shows me how to implement it in Python.

Now I'm thirsty, it's time for a beer

Skål!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

you're making steemit a great community with your content gargunzola! keep it up!

Thanks again!