2017 archive

This page is part of the archives of my blog.

·1998 · 1999 · 2000 · 2001 · 2002 · 2003 · 2004 · 2005 · 2006 · 2007 · 2008 · 2009 · 2010 · 2011 · 2012 · 2013 · 2014 · 2015 · 2016 · 2017 · 2018 · 2019 · 2020 · 2021 · 2022 · 2023 · 2024 · 

This is the full archive for 2017

Wikisource Hangout

I wonder how long it takes after someone first starts editing a Wikimedia project that they figure out that they can read lots of Wikimedia news on https://en.planet.wikimedia.org — and when, after that, they realise they can also post to the news there? (At which point they probably give up if they haven't already got a blog.)

Anyway, I forgot that I can post news, but then I remembered. So:

There's going to be a Wikisource meeting next weekend (28 January, on Google Hangouts), if you're interested in joining: metawikimedia:Wikisource Community User Group/January 2017 Hangout.

Comments on this blog post+ Add a comment
No comments yet

Abandoned code projects

One of the sad things about open source software is the process of working on some code, feeling like it's going somewhere good and is useful to people, but then at some point having to abandon it. Normally just because life moves on and the higher-priority code always has to be the stuff that earns an income, or just that there are only so many slots for projects in my brain.

I feel this way about Tabulate, the WordPress plugin I was working on until a year ago, and about a few Dokuwiki plugins that I used to maintain. All were good fun to work on, and served reasonably useful places in some people's websites. But I don't have time, especially as it takes even more time & concentration to switch between completely separate codebases and communities — the latter especially. So these projects just languish, usually until some wonderful person comes along on Github and asks to take over as maintainer.

I am going to try to keep up with Tabulate, however. It doesn't need that much work, and the WordPress ecosystem is a world that I actually find quite rewarding to inhabit (I know lots of people wouldn't agree with that, and certainly there's a commercial side to it that I find a bit tiring).

Not this morning, though, but maybe later this week... :-)


· blogging ·

micro.blog sounds like a cool thing built on top of the existing blogosphere, allowing anyone to microblog (i.e. tweet) from the comfort of their own personally-controlled blog installation (e.g. WordPress).

New feature for ia-upload


I have been working on an addition to the IA Upload tool these last few days, and it's ready for testing. Hopefully we'll merge it tomorrow or the next day.

This is the first time I've done much work with the internal structure of DjVu files, and really it's all been pretty straight-forward. A couple of odd bits about matching element and page names up between things, but once that was sorted it all seems to be working as it should.

It's a shame that the Internet Archive has discontinued their production of DjVu files, but I guess they've got their reasons, and it's not like anyone's ever heard of DjVu anyway. I don't suppose anyone other than Wikisource was using those files. Thankfully they're still producing the DjVu XML that we need to make our own DjVus, and it sounds like they're going to continue doing so (because they use the XML to produce the text versions of items).

Update two days later: this feature is now live.

Comments on this blog post+ Add a comment
No comments yet

Editing MediaWiki pages in an external editor


I've been working on a MediaWiki gadget lately, for editing Wikisource authors' metadata without leaving the author page. It's fun working with and learning more about OOjs-UI, but it's also a pain because gadget code is kept in Javascript pages in the MediaWiki namespace, and so every single time you want to change something it's a matter of saving the whole page, then clicking 'edit' again, and scrolling back down to find the spot you were at. The other end of things—the re-loading of whatever test page is running the gadget—is annoying and slow enough, without having to do much the same thing at the source end too.

So I've added a feature to the ExternalArticles extension that allows a whole directory full of text files to be imported at once (namespaces are handled as subdirectories). More importantly, it also 'watches' the directories and every time a file is updated (i.e. with Ctrl-S in a text editor or IDE) it is re-imported. So this means I can have MediaWiki:Gadget-Author.js and MediaWiki:Gadget-Author.css open in PhpStorm, and just edit from there. I even have these files open inside a MediaWiki project and so autocompletion and documentation look-up works as usual for all the library code. It's even quite a speedy set-up, luckily: I haven't yet noticed having to wait at any time between saving some code, alt-tabbing to the browser, and hitting F5.

I dare say my bodged-together script has many flaws, but it's working for me for now!

Comments on this blog post+ Add a comment
No comments yet

Importing to Piwigo


· Piwigo ·

Piwigo is pretty good!

I mean, I mostly use Flickr at the moment, because it is quick, easy to recommend to people, and allows photos to be added to Trove. But I’d rather host things myself. Far easier for backups, and so nice to know that if the software doesn’t do a thing then there’s a possibility of modifying it.

To bulk import into Piwigo one must first rsync all photos into the galleries/ directory. Then, rename them all to not have any unwanted characters (such as spaces or accented characters). To do this, first have a look at the files that will fail:

find -regex '.*[^a-zA-Z0-9\-_\.].*'

(The regex is determined by $conf['sync_chars_regex'] in include/config_default.inc.php which defaults to ^[a-zA-Z0-9-_.]+$.)

Then you can rename the offending files (replace unwanted characters with underscores) by extending the above command with an exec option:

find -regex '.*[^a-zA-Z0-9\-\._].*' -exec rename -v -n "s/[^a-zA-Z0-9\-\._\/]/_/g" {} \;

(I previously used a more complicated for-loop for this, that didn’t handle directories.)

Once this command is showing what you expect, remove the -n (“no action”) switch and run it for real. Note also that the second regex includes the forward slash, to not replace directory separators. And don’t worry about it overwriting files whose normalized names match; rename will complain if that happens (unless you pass the --force option).

Once all the names are normalized, use the built-in synchronization feature to update Piwigo’s database.

At this point, all photos should be visible in your albums, but there is one last step to take before all is done, for maximum Piwigo-grooviness. This is to use the Virtualize plugin to turn all of these ‘physical’ photos into ‘virtual’ ones (so they can be added to multiple albums etc.). This plugin comes with a warning to ensure that your database is backed up etc. but personally I’ve used it dozens of times on quite large sets of files and never had any trouble. It seems that even if it runs out of memory and crashes halfway, it doesn’t leave anything in an unstable state (of course, you shouldn’t take my word for it…).

Comments on this blog post+ Add a comment
No comments yet

Jazz and MediaWiki package


And rain, I mustn't forget the rain. I'm worrying about the roof, although far less than I used to (it's a different roof). The jazz is the radio; it's on.

But the main point this morning is exploring the mediawiki-lts package maintained by Legoktm. I've been meaning to look at it for a while, and switch my (non-playground) wikis over to it, but there's never enough time. Not that there's enough time now, but I'm just trying to get it running locally for two wikis (yes, the smallest possible farm).

So, in simple steps, I first added the PPA:

sudo add-apt-repository ppa:legoktm/mediawiki-lts

This created /etc/apt/sources.list.d/legoktm-ubuntu-mediawiki-lts-xenial.list. Then I updated the package info:

sudo apt-get update

And installed the package:

sudo apt install mediawiki

At this point, the installation prompt for MediaWiki 1.27.3 was available at http://localhost/mediawiki/ (which luckily doesn't conflict with anything I already had locally) and I stepped through the installer, creating a new database and DB user via phpMyAdmin as I went, and answering all the questions appropriately. (It's actually been a while since I last saw the installer properly.) The only tricky thing I found was that it asks for the "Directory for deleted files" but not for the actual directory for all files — because I want the files to be stored in a particular place and not in /usr/share/mediawiki/images/, especially as I want there to be two different wikis that don't share files.

I made a typo in my database username in the installation form, and got a "Access denied for user x to database y" error. I hit the browser's back button, and then the installer's back buttons, to go back to the relevant page in the installer, fixed the typo and proceeded. It remembered everything correctly, and this time installed the database tables, with only one error. This was "Notice: JobQueueGroup::__destruct: 1 buffered job(s) of type(s) RecentChangesUpdateJob never inserted. in /usr/share/mediawiki/includes/jobqueue/JobQueueGroup.php on line 447". Didn't seem to matter.

At the end of the installer, it prompted me to download LocalSettings.php and put it at /etc/mediawiki/LocalSettings.php which I did:

sudo mv ~/LocalSettings.php /etc/mediawiki/.
sudo chown root:root /etc/mediawiki/LocalSettings.php
sudo chmod 644 /etc/mediawiki/LocalSettings.php

And then I had a working wiki at http://localhost/mediawiki/index.php!


I wanted a different URL, so edited /etc/apache2/sites-available/000-default.conf (in order to not modify the package-provided /etc/mediawiki/mediawiki.conf) to add:

Alias /mywiki /var/lib/mediawiki

And changed the following in LocalSettings.php:

$wgScriptPath = "/mywiki";

The multiple wikis will have to wait until later, as will the backup regime.

Comments on this blog post+ Add a comment
No comments yet

All the stations have an adventure

Montreal, Canada

Today is [All The Stations](http://allthestations.co.uk/)‘ “have an adventure” day, in which they’re asking people to visit a railway station that they’ve never been to before. When I first heard about it I figured I have to end up at somewhere boring like [Aubin Grove](https://en.wikipedia.org/wiki/Aubin_Grove_railway_station) but as it turns out I’m actually at Wikimania in Montreal! So it’s rather easy to find a station to which I’ve never been; in fact, with the assistance of a friend, I have today been to seven new stations.


[<img src="https://farm5.staticflickr.com/4393/36385399781_16dc3327a7.jpg" alt="All the stations have an adventure" width="500" height="281" />](https://www.flickr.com/photos/freosam/36385399781/)


[<img src="https://farm5.staticflickr.com/4345/35713703393_937783a8a6_c.jpg" alt="Square-Victoria-OACI station" width="450" height="800" />](https://www.flickr.com/photos/freosam/35713703393/)

[Place d’Armes](https://en.wikipedia.org/wiki/Place-d%27Armes_station) (no photo).


[<img src="https://farm5.staticflickr.com/4438/36476242786_30d3944647.jpg" alt="Champ-de-Mars station" width="500" height="281" />](https://www.flickr.com/photos/freosam/36476242786/)


[<img src="https://farm5.staticflickr.com/4404/35687619524_b8a4e7e000.jpg" alt="Berri-UQAM station" width="500" height="281" />](https://www.flickr.com/photos/freosam/35687619524/)


[<img src="https://farm5.staticflickr.com/4425/36126121220_e767a9cd56.jpg" alt="Jean-Drapeau station" width="500" height="281" />](https://www.flickr.com/photos/freosam/36126121220/)


[<img src="https://farm5.staticflickr.com/4363/36522689145_5e9d09d312.jpg" alt="Longueuil station" width="500" height="281" />](https://www.flickr.com/photos/freosam/36522689145/)

And also [Windsor](https://en.wikipedia.org/wiki/Windsor_Station_(Montreal)), which isn’t actually a station any more:

[<img src="https://farm5.staticflickr.com/4427/36126339090_d9e84ef61a_c.jpg" alt="Windsor station" width="450" height="800" />](https://www.flickr.com/photos/freosam/36126339090/)

Importing books from IA to Wikisource

After being inspired by Ewan McAndrew at Wikimania, I've taken a crack at doing my own video about importing books from the Internet Archive into Wikisource:


There are a few mistakes here, and as I’ve yet to figure out how to edit videos properly (I’ve only managed to hang my video editing software so far), they’ve stayed in; I’ll do another video correcting things.

The pagelist creation process is probably the hardest bit for beginners to Wikisource, and it’s something we need to work on. Metadata copying, on the other hand, mostly works fine (of course, we should not be _copying_ the metadata, but that’s another story).

On not hosting everything oneself

I’ve been moving all my photos to Flickr lately. It’s been a long process, one complicated by the fact that it seems silly to run my own WordPress installation (and things like ArchivesWiki) if I’m not going to bother hosting everything myself. Of course, that’s not really very logical, and so I’ve decided that it’s perfectly okay to host photos on Flickr, videos on YouTube, and all the text (and miscellaneous) stuff here on my own server.

Creating Wikisource author pages

I figured out how to do some slight video editing in OpenShot, and have tried to make another Wikisource tutorial:


Perth Heritage Days 2017

Perth CBD


Moana Chambers

Moana Chambers. The café only recently closed, but prehaps will re-open again soon under new management. An amazing stairwell, retrofitted certainly but it's hard to get an idea of the original layout.

Trinity Buildings

Trinity Arcade. A great place, I'd love to work in these offices. Lots of empty rooms by the looks of it.

The sign boards read as follows:

The first congregational church in Perth was founded by Henry Trigg who opened a chapel in 1846 on a site in William Street.

In 1863 the present site in Saint George's Terrace was purchased and a new building, Trinity Congregational Chapel, was opened by Governor Hampton in 1865. This colonial building was designed by Richard Roach Jewell in the Gothic Revival style known as Commissioners' Gothic, was located on a rise set well back from the Terrace.

Constructed in Flemish Bond brickwork and with a shingled root that building exists today and appears externally very much as it did in 1865. The original open space around the chapel has been replaced with arcades and buildings.

The new schoolroom was added to the northern side of the chapel in 1872. Constructed in Flemish Bond brickwork with a shingled roof, that building also survives but with some minor alterations and later additions to the western side.

The present Trinity Church on Saint George's Terrace was erected in front of the former chapel. Designed by Henry Trigg, the first architect to be born and trained in W.A. and grandson of the founder, the church was dedicated in December 1893. This building constructed in Flemish Bond brickwork with twin towers and elaborate stucco decoration was designed in the Victorian style known as "Dissenter's Mediaevalism."

Trinity Church maintains a presence in the city and an historic link with the past. The arcades provide a connection between the business centre in St. George's Terrace and the commercial district of the Hay Street Mall.

(Architects: Duncan Stephen and Mercer 1982.)

In 1927 Trinity Arcade and Buildings were constructed on the Hat Street frontage of the property to provide three floors of shops and commercial premises and a basement. The building was designed for the trustees of Trinity Congregational Church by E. Allwood, architect.

In 1981, Trinity Arcade was extended on three levels and the basement of Trinity buildings upgraded to provided a shopping arcade link from St. George's Terrace and under Hay Street. Trinity Church and Halls were restored at the same time.

Mary Raine exhibition

A corporate exhibition with reasonable research and few artifacts. Lots to learn though, about Mary Raine. Shame aboue the venue (the foyer of the Bank West corporate offices).


Cast Iron Pillar Boxes of WA

Cast iron pillar boxes of Western Australia (J. & E. Ledger engineering works pic, corner of Aberdeen and Pier Streets, possibly run by Heath Ledgers grandfather?)

The talk, Sun. 15 October 2017 1:30 pm – 2:30 pm AWST, City of Perth Library and History Centre 573 Hay Street:[1]

Cast iron letterboxes were once a common sight on the streets of Perth. The fabrication of the pillar-style letterboxes was predominately carried out by local firm J & E Ledger. Who were the people and the firm behind the name and when did the Ledgers start their manufacturing business in WA? Sue Hobson (née Ledger) will be presenting the findings of her research on an interesting aspect of the social and postal history of WA.

A great talk by Sue Hobson, who has published a book about the history of cast-iron pillar boxes of Western Australia. She's been giving this talk regularly since first presenting to the RHSWA, and has a family connection to the topic as her great-great grandfather started the company (J & E Ledger) that made the pillar boxes.

Comments on this blog post+ Add a comment
No comments yet

Cross-referencing in MediaWiki Genealogy


I want to add a new tag to the Genealogy extension: {{#genealogy:ref|Page Name}}

This would display a person's page name and years of birth and death, in exactly the same way that the 'partners' and 'children' lists currently do (and in fact, those would be changed to use the new 'ref' system). So for example, {{#genealogy:ref|John Smith}} would result in John William Smith (1878–1953) with the first part just being the full page name (after redirects have been followed) and the second part in parentheses being the 'coverage' or 'short description' value of that page (the details of which are in phabricator:T175667).

The idea is that whenever one mentions a person anywhere on the wiki, it'd be nice to sometimes be able to display that person's full name and details without having to look them up and duplicate them on the current page. It's something I've used for years in a custom \bioref{} command in my LaTeX family histories.

I'm not sure that this is actually a genealogy problem though. It seems like the sort of thing that would be useful in lots of different contexts, and perhaps already does exist in some extension or other. I'll do some more investigating...

Comments on this blog post+ Add a comment
No comments yet

Updating PhpFlickr

I sort of really like bringing old code up to date, even though it can be such a pain. Got to have the time for it though.

Recently, I’ve been trying to modernize phpFlickr, so I can set up better Flickr-to-MediaWiki importing (and Flickr-to-Piwigo perhaps).


The MediaWiki Display Title extension is pretty cool. It uses a page’s display title in all links to that page. That might not sound like much, but it’s really useful to only have to change the title in one place, and have it show correctly all over the wiki. (This is much the same as Dokuwiki with the useheading configuration variable set to 1).

This is the sort of extension that I really like: it does a small thing, but does it well, and it makes sense as an addition to the core software. It’s not trying to do something completely different and just sit on top of or inside MediaWiki. It’s also not something that everyone would want, and so does belong as an extension and not an addition to core (even though the display title feature is part of core).

The other thing the Display Title extension provides is a parser function for retrieving the display title of any page: {{#getdisplaytitle:A page name}}, so you can use the display title without creating a link.

Tabulate updated to not require REST API plugin

I’ve removed Tabulate’s dependency on the REST API plugin, because that’s now been moved in to core WordPress. (Actually, that happened rather a while ago, but I’m slack and haven’t been paying enough attention to Tabulate this year; other things going on!)

I hope to get back to adding file-field support to Tabulate sometime soon. That’d be a useful addition for me. Also, the whole situation with Reports needs sorting out: better documentation, easier to use, support for embedding in posts and as sidebar wigets, that sort of thing.

CFB Folder 1 done


The first folder of the C.F. Barker Archives' material is done: finished scanning and initial entry into ArchivesWiki. This is my attempt to use MediaWiki as a digital archive platform for physical records (and digitally-created ones, although they don’t feature as much in the physical folders). It’s reasonably satisfactory so far, although there’s lots that’s a bit frustrating. I’m attempting to document what I’m doing (in a Wikibook), and there’s more to figure out.

There are a few key parts to it; two stand out as a bit weird. Firstly, the structure of access control is that completely separate wikis are created for each group of access required. This can make it tricky linking things together, but makes for much clearer separation of privacy, and almost removes the possibility of things being inadvertently made public when they shouldn’t be. The second is that the File namespace is not used at all for file descriptions. Files are considered more like ‘attachments’ and their metadata is contained on main-namespace pages, where the files are displayed. This means that files are _not_ considered to be archival items (except of course when they are; i.e. digitally-created ones!), but just representations of them, and for example multiple file types or differently cropped photos can all appear on a single item’s record. The basic idea is to have a single page that encapsulates the entire item (it doesn’t matter if the item is just a single photograph, and the system also works when the ‘item’ is an aggregate item of, for example, a whole box of photos being accessioned into ArchivesWiki).

PhpFlickr 4.1.0

I've just tagged version 4.1.0 of my new fork of the PhpFlickr package. It introduces oauth support, and hopefully improves the documentation of the user authentication process. This release deprecates some old behaviour, but I hope it doesn’t break any. Bug reports are welcome!

There are some parts that are still not converted to the new request flow, but I’ll get to them next.

Monday MediaWiki


Monday morning, hot and humid, and the rain's been falling all night (nearly 5 mm!). It's one of those lovely days when you can look out to the ocean and stand on the limestone and feel this place.

I'm reading through the position statements that have been accepted for the Wikimedia Developer Summit in January. It's great to read other people's ideas in this form. I think there's not really enough of that, in MediaWiki development: it's hard to get an idea of other people's 'big picture' thoughts of what the future should hold.

Old VIP Packaging factory in O'Connor


· Fremantle · urbex · O'Connor ·

1895 Stornoway chart


· maps · posters · Stornoway · Hebrides · Scotland · woodworking ·

Yesterday I found a 1:18300 scale nautical chart of the Approaches to Stornoway in an antique shop in North Fremantle. It's not large, but looks nice, and reminds me both of how nice printed maps can be (on good, thick, paper) and also of Stornoway (where I spent a few days last year). I'm making a wooden clamping bar to hang it with.

Then I made a bolted-stick contraption, and hung it on the wall: