The big change in this release is the addition of graphs, something that I’ve wanted to add in for quite a while but never got around to. They’re implemented using matplotlib, which makes it very easy to do.
(Click the screenshots for larger images.)
Added new context (right-click) menu to the main data list, with some basic actions (Add New, Edit, Remove, etc).
Merged some files into others:
directions.py -> utility_functions.py
convert.py -> utility_functions.py
ui.py -> launch.py
Minor renaming of some things.
Fixed WeatherLog not working with Python 3. Apparently relative imports work slightly differently between Python 2 and Python 3.
Downloads and code are available on Github. From now on this will be the only source for the downloads; the SourceForge page is no longer going to be updated.
I’ve finally gotten around to working on the graphs, a feature that I’ve meant to add for quite a while now. I’ve decided to use the excellent matplotlib graphing library, as it is fairly straightforward to use and can easily be embedded into GTK applications.
This is what I have currently, with some example data. I’m not too fond of the x-axis (not very easy to read), but there’s not much I can do about that. One thing I really appreciate, though, is that matplotlib will automatically scale the axes to the numbers it’s given, so I don’t have to worry about that myself.
This is a fairly large release, considering the last one was back in July. I didn’t have any particular focus for this, so the changes are sort of all over; there are lots of little changes, some major new features, and some large internal changes.
Added a feature to list recently created pastes. There’s no feature in the pastebin.com API to do this, however, so I had to resort to scraping one of the webpages.
Get Paste will now parse out the paste key if the user inputs a link instead.
Create Paste will now check if the paste triggered the automatic spam filter, and tell the user if so.
List Trending Pastes no longer shows the pastes’ formats, due to that value getting removed from the API. No documentation has changed regarding this, however, so I’m not entirely certain that pastebin meant for this to happen. Might change back in the future.
Get User’s Details will now display everything in a certain order, instead of randomly.
Delete Paste now asks for confirmation.
Font is now set to monospaced, for easier reading of code. Sometime in the future I’ll probably add an option to set the font to whatever.
Get Paste will now let the user know that private pastes cannot be loaded (due to API restrictions).
Removed command line arguments. I don’t normally remove features, but I felt that the command line interface didn’t really fit with the goal of the application. There are already better command line clients for pastebin, and I didn’t think there was a reason to duplicate the effort. (Also, it was more trouble than it was worth to keep updating the CLI as the rest of the program changed.)
Added option to select how many pastes to show in List User’s Pastes.
Bit of a code clean-up.
Created a new API wrapper (https://github.com/achesak/python-pastebin). I didn’t really like the previous one’s way of doing things, and I also wanted to extend it with some things of my own, so I figured this was the best solution. (Also, licensing on the previous wrapper wasn’t clear.) This is really just a Python port of my pastebin API wrapper for Nim with a few new features added.
Open from File now sets the cursor to the beginning of the text box.
Login now checks if a user is already logged in. This sounds really minor, and it was, but it caused tons of issues regarding the features that required a logged-in user.
Changed keybindings to be more sensible.
Fixed options now being able to be saved. Oops. Not sure how I missed this before.
Anonymous users are no longer allowed to create private pastes. This is not my restriction, but something that pastebin.com doesn’t allow. Previously PastebinGTK would report that the paste was successfully created, and show a link, but the paste wasn’t actually created.
I decided to move this release to 2.0 (instead of 1.11, which is what it was originally going to be), due to it breaking backwards compatibility. Before this, versions 0.3 to 1.10 could be updated by simply using the new program files; any changes to the data files were made automatically as needed. However, I decided to stop doing that for this release due to a change of formats and a restructuring of where the data and configuration files were stored. All releases from now on (or at least until 3.0, if I ever get that far) will be backwards compatible with this one.
WeatherLog now follows the XDG Base Directory Specification, so instead of having all data files stored in ~/.weatherlog they have been moved to ~/.config/weatherlog (for configuration files) and ~/.local/share/weatherlog (for data files).
The data storage format has been changed from JSON to pickling, mostly for speed. Python’s JSON parser is rather slow compared to pickling (especially the internal C implementation).
More code cleanup.
Removed executable permissions from the files.
Removed all backwards compatibility code.
Moved some menu items around. Import and Export features are now in a new File menu.
Condensed the Info and Chart dialogs down into one each, with tabs for each category. This first makes its implementation simpler, and also makes it easier to use.
When importing data it is now possible to choose to import all data or only selected dates.
Streamlined copying and moving data between profiles. Instead of having the menus, there is now just two items. Whether to move or copy the data is choosen later on.
Implemented a new “metadata” file for each profile to store creation date and last modified date (and more in the future). This is shown in the profile selection dialogs.
When adding or renaming a profile the user can now choose to overwrite an existing one.
Changed some labels to make more sense.
Removed fullscreen support.
Changed keybindings to make more sense.
Implemented an Import All option.
Added validation for importing data.
Deferred creation of the profile in Import as New Profile to after the data file has been selected.
Deferred creation of the profile for Copy/Move to New Profile until after the data has been selected.
Fixed automatic sorting by date.
Import as New Profile now has the correct dialog title.
As this application has now reached feature parity with the pastebin.com website, I’ve decided to bump the version up to 1.0 instead of 0.4.
After getting a paste the cursor will now be set to the beginning of the text, instead of at the end.
Changed the textbox into a SourceView, which allows for syntax highlighting, line numbers, and other more advanced editing features. Currently the line numbers are enabled and working, but the syntax highlighting isn’t (I hate not having proper documentation to work from). The code for the highlighting is all in the application still, but it’s commented out.
Added more options to configure some of the new stuff. Also added an option for the developer key, with a request for the user to change it to their own so I don’t run into problems with people uploading too many things.
Added a feature to get the user’s account details and settings.