Well, one day last year I was checking my timeline and a tweet caught my attention.
This is from Victor and the important thing to know about Victor is that he’s blind. He used to use software called TheQube to access his tweets. Turns out that Twitter changed the API, and he and other users can no longer access their DM’s. Victor was asking Python developers to help.
I thought: I’m a Python developer. API changes? Pfff. Of course, I can help! So, let’s dig into this project! At the beginning I didn’t really know what I was doing, so Victor helped me to understand a bit more about the project. No screen, operated mostly via shortcuts. How would be possible to access Twitter like this? The idea totally blew my mind. I started to work on the issue and the truth is: I dug into the code and I spent some time trying to make it run. Was not possible. Going through the Github issues I could see that TheQube was no longer maintained.
Since this was an important software for so many people, I decided to do an experiment: re-writing with the basic functions and using recent technologies.
I called this experiment/project Pardal (sparrow in English).
So, I came up with a plan to solve three problems:
- Make sure that this new software keeps the basic features of the TheQube. That includes global shortcuts, so they can call a feature from anywhere in their OS; templates: the users should be able to customize their own templates as they like it; text-to-speech: this new software should be able to read things using the local screen reader.
- Being multi platform: Windows, Linux, and MacOS. TheQube only supports Windows. The idea on having a multi platform project is making it accessible for more people and making it easy for developers to test.
- Low entry barrier to start contributing: must be easy to find things, to run and to test. Apart from that, must be welcoming to everyone who'd like to contribute.
But let's compare Python and Electron solutions in Pardal's context.
Starting with global shortcuts: I don’t know about you but before this project I had no idea how to create shortcuts in Python. Python have ways to detect keyboard events but it’s not for humans.
The most popular libraries available unfortunately don’t work well on multi platform apps. I tested libraries like keyboard and pynput. Electron has it out of the box and works like a charm.
Another important feature is templates. The users must be able to define variables and change the way a tweet or a DM is gonna be read. Something like this:
$screen_name $created_data $text $source
Easy in languages like JS and Python (actually, in almost all programming languages). :)
Python doesn’t have a built in solution for it but a lib called espeak works fine for Linux and Windows. Unfortunately, not for MacOS. I got by this by calling
say on MacOS.
Electron has native support from Chromium. Meaning: everything that is implemented in the browser, we can access, like Speech Synthesis API.
To generate installers, pyinstaller seems the most popular in the Python community but requires lots of configuration for each OS. Electron’s got a multi platform support that works like the apps were native, which is really helpful. We can invest time on delivering features instead of being solving incompatibilities.
To make a project like this work, we need you. There are many ways of contributing: you can help translating things, giving inputs about packaging, doing code reviews, testing and developing. You can find more at pard.al or on our Github issues.
This is something that can make a difference to people’s lives. I hope you will join us!