Hi all,
Since I use the Kobo Utilities plugin regularly I wanted to make it easier to maintain in the longer run to make contributions to it easier, both for the contributing person and for whoever is responsible for integrating them.
As a result I have cleaned up a number of things in the plugin and set up a GitHub repository with some basic project configuration like automatic formatting, linting, and CI to automatically do pull request checks and releases. I also added a basic test framework to make it easier to add tests for changed or new code in the future. At the moment there's only one basic test, but at least it verifies that the plugin loads successfully in both the minimum supported version of Calibre and the latest version.
I started from @chaley's repository but set things up in a more standard way so that releases are not themselves added to the repository. There are still quite a few linting errors and areas that I think could really benefit from some larger refactoring, but I realised that fixing all of this would take a really long time and so I've put it off for now.
Note that my goal is not really to "take over" the plugin, just to make it easier to work on it as a community. I would be very happy if @chaley and/or @ownedbycats wanted to become co-maintainers on GitHub, for example. I certainly don't have any plans for any great changes so far, and I'm far from an expert on the code.
The repository can be found here:
https://github.com/majutsushi/kobo-utilities
I've attached a version of the plugin that includes all of my changes, but I haven't done an actual release yet so there isn't any potential confusion about release versions. I'm not sure how releases should be handled in the future, it would certainly be easiest for users if @chaley would continue updating the first post in this thread.
The changes I've made to the actual plugin are:
- Two new custom columns options for the "time spent reading" and "rest of book estimate" database entries. This is the only user-visible change (unless I broke something).
- Removed a lot of obsolete compatibility code for Python 2 and ancient versions of Calibre. This means that the minimum supported Calibre version is now 5.13, which came out almost four years ago. This is a bit unfortunate but makes maintenance in the future much easier.
- Reformatted the code with ruff so it is all consistent.
- Various small refactorings.
It would be great if a few people could test my changes to make sure everything is working as it should. I don't
think there should be any problems, but you never know.