New tool: Wikimedia APT browser

I've created a new tool to make it easier for humans to browse Wikimedia's APT repository: apt.wikimedia.org. Wikimedia's servers run Debian (Ubuntu is nearly phased out), and for the most part use the standard packages that Debian provides. But in some cases we use software that isn't in the official Debian repositories, and distribute it via our own APT repository.

For a while now I've been working on different things where it's helpful for me to be able to see which packages are provided for each Debian version. I was unable to find any existing, reusable HTML browsers for APT repositories (most people seem to use the commandline tools), so I quickly wrote my own.

Introducing the Wikimedia APT browser. It's a short (less than 100 lines) Python and Flask application that reads from the Package/Release files that APT uses, and presents them in a simple HTML page. You can see the different versions of Debian and Ubuntu that are supported, the different sections in each one, and then the packages and their versions.

There's nothing really Wikimedia-specific about this, it would be trivial to remove the Wikimedia branding and turn it into something general if people are interested.

The source code is published on Phabricator and licensed under the AGPL v3, or any later version.


Firefox Add-on to skip mobile Wikipedia redirect

Skip Mobile Wikipedia on Firefox Add-ons

Lately, I've been reading Wikipedia on my phone significantly more than I used to. I get 15 minutes on the train each morning, which makes for some great reading time. But when I'm on my phone, Wikipedia redirects to the mobile website. I'm sure there are some people out there who love it, but it's not for me.

There's a "Desktop" button at the bottom of the page, but it's annoying and inconvenient. So I created my first Firefox Add-on, "Skip Mobile Wikipedia". It rewrites all requests to the mobile Wikipedia website to the standard canonical domain, and sets a cookie to prevent any further redirects. It works on the standard desktop Firefox and on Android.

Install the Add-on and view the source code.


My back to school free software toolkit

The 2018 spring semester started last Wednesday. I think I've set up a pretty good free software toolkit for a successful year:

  • Operating system: Fedora - latest software with stable releases
  • Browser: Firefox - what else? :-) Note that our school and most California universities and colleges have adopted the AGPL licensed Canvas learning management system, so usually my browser is running free JavaScript code too!
  • Documents/notes: LibreOffice - nearly all professors are fine with assignments being submitted as plain text or PDF, only a few want docx specifically. For professors that insist you need to use Times New Roman or fail the assignment - not a single one has noticed my usage of Liberation Serif.
  • Cloud storage: Nextcloud - I self-host a nextcloud instance that all my school documents are saved to. Additionally I have the Android app on my phone for convenient reading of notes while I'm on the train.
  • Photos: Shotwell - very simple photo organizer, though I would also like to become more proficient at darktable soon.
  • Email: Thunderbird - I have filters set up so all my school email gets filtered into a folder that I normally read first.

Total software cost: $0


MassMessage hits 1,000 commits

The MassMessage MediaWiki extension hit 1,000 commits today, following an update of the localization messages for the Russian language. MassMessage replaced a Toolserver bot that allowed sending a message to all Wikimedia wikis, by integrating it into MediaWiki and using the job queue. We also added some nice features like input validation and previewing. Through it, I became familiar with different internals of MediaWiki, including submitting a few core patches.

I made my first commit on July 20, 2013. It would get a full rollout to all Wikimedia wikis on November 19, 2013, after a lot of help from MZMcBride, Reedy, Siebrand, Ori, and other MediaWiki developers.

I also mentored User:wctaiwan, who worked on a Google Summer of Code project that added a ContentHandler backend to the extension, to make it easier for people to create and maintain page lists. You can see it used by The Wikipedia Signpost's subscription list.

It's still a bit crazy to think that I've been hacking on MediaWiki for over four years now, and how much it has changed my life in that much time. So here's to the next four years and next 1,000 commits to MassMessage!


Requiring HTTPS for my Toolforge tools

My Toolforge (formerly "Tool Labs") tools will now start requiring HTTPS, and redirecting any HTTP traffic. It's a little bit of common code for each tool, so I put it in a shared "toolforge" library.

from flask import Flask
import toolforge

app = Flask(__name__)
app.before_request(toolforge.redirect_to_https)

And that's it! Your tool will automatically be HTTPS-only now.

$ curl -I "http://tools.wmflabs.org/mwpackages/"
HTTP/1.1 302 FOUND
Server: nginx/1.11.13
Date: Sat, 26 Aug 2017 07:58:39 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 281
Connection: keep-alive
Location: https://tools.wmflabs.org/mwpackages/
X-Clacks-Overhead: GNU Terry Pratchett

My DebConf 17 presentation - Bringing MediaWiki back into Debian

Full quality video available on Wikimedia Commons, as well as the slides.

I had a blast attending DebConf '17 in Montreal, and presented about my efforts to bring back MediaWiki into Debian. The talks I went to were all fantastic, and got to meet some amazing people. But the best parts about the conference was the laid-back atmosphere and the food. I've never been to another conference that had food that comes even close to DebConf.

Feeling very motivated, I have three new packages in the pipeline: LuaSandbox, uprightdiff, and libkiwix.

I hope to be at DebConf again next year!