Keep Tabs on Your Data with Pygmynote
Productivity Sauce
When it comes to filers and pilers, I firmly belong to the latter category. I do like to keep all my disparate data -- notes, links, to-dos, etc. -- in one application, so when I need to find something, I have to look in one place. That's why I wrote a simple Python command-line tool that acts as my personal data manager. While there are many open source applications out there that provide this type of functionality, none of them scratch my particular itches. So I wrote my dead-simple script that does pretty much anything I need. The first version of Pygmynote was released in August 2008, followed by a major update in January 2009. A few days ago, I released version 0.5.1 which fixes a few annoying bugs and adds a couple of new features.
Pygmynote allows you to save any type of text-based data in an SQLite database. The script provides just a handful of easy to remember commands, so you can learn to use it in a matter of minutes. The h command provides a list of all available commands with their descriptions. Despite its simplicity, Pygmynote has a couple of nifty tricks up its sleeve. For example, if you specify a due date for the record, you can treat it as a task, and the tl command lists all active tasks in the database. Once the task is complete, you can mark it as hidden using the u command, so it doesn't appear in the list of active tasks. When you run the script, it automatically displays the current deadlines. When adding a record, you have an option to insert text from a text file. This can come in handy when you want to import existing notes to Pygmynote, or when you want to insert a multi-line note.
Instead of using Pygmynote on my production machine, I run the script on my home server, so I can access it from anywhere using an SSH connection. And using the ConnectBot SSH client, I can access my data from my Android device.
Pygmynote can also export records in a text or CSV file (the w command). You can use this feature to display the tasks on your desktop with Conky. By default, Pygmynote exports all existing records, so you have to tweak the code a bit to export only active tasks:
# Save all notes as pygmynote.txt cursor.execute("SELECT due, note, tags FROM notes WHERE due <> '' AND type = 'A' ORDER BY due ASC") rows = cursor.fetchall() if os.path.exists('pygmynote.txt'): os.remove('pygmynote.txt') for row in rows: filename = 'pygmynote.txt' file = open(filename, 'a') file.write('%s -- %s [%s]\n' % (row[0], row[1], row[2])) file.close() print _(u'\nRecords have been saved in the pygmynote.txt file.')
Add the following command to my .conkyrc file, and you are done:
${execi 30 cat /path/to/pygmynote.txt}
Pygmynote is a simple script that was developed for rather specific purposes. But I'm open to suggestions and ideas. The script is released under GPLv3, so you are free to hack it to your liking.
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
There's a New Open Source Terminal App in Town
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.