Done, not done

I just finished my first Python app, so of course now I have to re-write it. The app is called DonkeyFeed, it’s a simple little dingus that is supposed to filter RSS feeds for certain keywords: Users save a list of RSS feed links with their associated keywords, then run the searches anytime and save any results in an easy-to-read HTML file.

My original idea was to use a GUI, but then I figured out that Tkinter is janky as hell and pretty bad for doing anything dynamic. So I switched to a command line user interface, and that went pretty OK! I’ve actually got a working product now that works.

But now I’m realizing I designed the user interface as rigid if-then flowchart of options, when what I really should be doing is an input() loop where users can enter commands with arguments to run, add, remove, or modify filters right from the cursor, instead of poking around with menu options.

Fortunately, I focused this project on using a class-based structure, with all the moving parts put into separate objects. There’s a class for handling the .JSON file with the RSS roster, a class for parsing the RSS feeds, a class for handling configurations, a class for the user menus, etc., all with their various associated methods. So changing the UI won’t mean untangling a bunch of stuff, more like reassembling existing parts into different loops and logic.

In general, I’m starting to feel like that’s what most of coding is: take a thing and plug it into, get it to talk to, or wrap it in another thing. You build your code as a series of things that can be made to work with other things, then take it home, throw it in a pot, add some broth, a potato… baby you got a stew going! Eh, I digress.

4 responses to “Done, not done”

  1. @pjk I could never get over how *ugly* TK looks. The same awful graphical interface for decades.

    Totally my problem, it works, it does its job, but still. It's like the difference between a late snes game and an early 3d ps1 game.

    1. @peter @pjk The thing I'd recommend is to disregard that Django is BEEEEEEG.

      I read an interesting take days ago on how it's better to learn that first and not something much leaner (like, say, Flask) because its strong decisions can help you understand complications without falling into the pits they cover.

    2. @peter @adriano @pjk I was going to say that development process sounds familiar. 😂 I had created a media library manager that started as a few large shell scripts, then wrote it in Python a few times starting over from mostly-scratch each time, and eventually found and followed https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world to make it into a web app using Flask. https://github.com/gfitzp/fitzflix

  2. @pjk you might also want to create a project config file and add an entry point to your app so you can install it with pip install which will add a system wide name on the app so you can call it just by name "donkeyfeed" see https://python-poetry.org/docs/pyproject/#scripts

Leave a Reply

Your email address will not be published. Required fields are marked *