wow-addon-updater - Now supports Tukui!
This utility provides an alternative to the Twitch/Curse client for management and updating of addons for World of Warcraft. The Twitch/Curse client is rather bloated and buggy, and comes with many features that most users will not ever use in the first place. This utility, however, is lightweight and makes it very easy to manage which addons are being updated, and to update them just by running a python script.
Changelog located in changelog.txt
This utility has two dependencies:
Thanks to https://github.com/Saritus, the requests module is now included in the download as a package, so there is no longer any need to install those yourself. Just install Python 3, download this app, configure the utility, and double click "WoWAddonUpdater.py" to start.
Configuring the utility
The "config.ini" file…
This post will give some thoughts and remarks from my experiences with the WoW Addon Updater, my first real open source project. I'd love feedback and any other thoughts of your own.
The WoW Addon Updater had a rather simple rationale:
I have a few World of Warcraft addons.
Each of these folders (besides some that can be combined into a single addon) represents an addon that I needed to manually update. So, each time I wanted to update my addons, I needed to manually download 19 zips from 19 different webpages, and extract them all to my addons directory.
But Derek, doesn't the Twitch client do all this automatically?
Yes, but the Twitch/Curse client is bloated and gross, and I don't like it. And neither do a lot of other WoW players who are forced to use it out of necessity.
So I decided to make my own.
The initial version of the app was rather a mess, to be succinct.
But hey, everyone starts somewhere.
The initial version of the app worked as intended, despite some serious issues in how it was meant to be used. Chief among these was how I handled the use of external libraries. My first priority was to get the thing coded and available, so I just did the first thing that came to mind when it came to libraries, with the assumption that I'd make some major changes there later.
The app basically came with a batch script that installed pip (using the publicly available get-pip.py) and the required package. Obviously this was a messy solution, but it worked for an initial release. This was probably the biggest "obvious misstep" in the early versions of the project, since future versions simply distributed the required packages along with the app.
The actual functionality of the initial design was simple. It took input through a text file with a list of URLs to addons on the Curse platform, and also had a config file to fill in the location to put addons, and the name of the input file. The app just went through the input file, found the download URL from each Curse page, downloaded the zip file containing the addon, and unzipped it to the target directory.
However, after initially making this initial release available and advertising it on the WoW subreddit, several questions quickly came up:
How can we make this support more websites than just Curse?
How can we optimize the app by skipping up-to-date addons?
How can we make this simpler and more available, especially to non-techie users?
How can we improve the readability and usability of the code?
Almost immediately after the initial post on /r/wow, some generous contributors got to work making this project something worth talking about. The general design of the code got some much-needed work, organizing the task of getting a download link from an addon URL into a sort of pseudo-strategy pattern, paving the way to support more platforms in the future. Existing functionality was also split up into multiple files and a more-structured set of functions, benefiting readability.
As mentioned above, the method of getting packages changed to just distributing them along with the app itself, reducing the time needed to set the app up, and also getting rid of bloat in the download and project files.
Another major improvement from community contributions was the addition of a file keeping track of current versions of addons, so if the currently installed version of the addon was the most up-to-date, the app skipped downloading that addon.
By far the most requested feature for the app was support for more addon providers. Curse is easily the most popular, but there are still alternatives like WoWInterface. And some very popular addons like ElvUI have their own providers, which complicates things further.
The earlier work in improving the design of the codebase helped a lot here. It reduced the work in adding providers to answering two questions for the provider:
How do I get the download link for an addon?
How do I get the current version of an addon?
Sometimes things got complicated with this, though. Especially considering the fact that Curse really likes to change its site layout and URL scheme. Adding TukUI/ElvUI support was also a bit of a challenge, as it provided the actual addon as a subfolder in the folder from the download link. So I had to implement an extension to the input file that lets you specify a subfolder.
Next up on the plate for this app is going to be support for any addons distributed through Github. This should be rather simple, as ElvUI used Gitlab, which was obviously similar. I'll also be adding support to choose a branch through the URL, and get the download from that branch.
I feel like this was a very useful experience for me. Besides the specifics of learning more about the workflow of merging PRs and such, I also learned some more abstract things about open source development:
It's okay for things to not be perfect at first.
It's good to really put yourself in the position of users to identify potential trouble points with usability.
People have different ways of visualizing and solving problems, and that shows through their contributions.
Other programmers aren't perfect; they made silly mistakes too.
Again, I'd love to hear everyone's thoughts on this, and definitely share anything you've learned through open source contributions as well!