Piwigo has a duplicates-search feature, which allows you to search for duplicate photos by original filename, MD5 checksum, creation date & time, and/or image width & height. It’s slightly annoying though, because although it presents you with the duplicates, it doesn’t sort them so that potential duplicates are displayed next to each other. I’ve attempted to fix this.
Most of the work has finished: people are using the specifications in production and the rate of errata has slowed to a crawl. XQuery, XSLT and EXI ended this year. But just because the specification work is ending doesn’t mean XML is ending! It means XML is at a stage where the technology is mature and widely deployed. People aren’t reporting many new problems because the problems have already been worked out.
—The World Wide Success That Is XML, on the W3C Blog.
There’s a delight in writing documentation, in putting the words down that you wish you could read when first starting to use a project. At that point nothing doesn’t make sense, and everything is going to proceed according to the clear picture you have. Things later change, but when done well I think the earlier documentation serves to get you back on track, and makes later maintenance so much better.
I fixed a bug in Tabulate last night, and released version 2.10.3. I’ve rather been neglecting this project for a while, so it’s been nice to come back to it. There are a few things that I might try to get done on it in the next few days or weeks (starting with more documentation).
The bug was to do with the change in WordPress’ default database character set and how that affected the reports ‘title’ column. Previously, a key length on this column of 200 was okay as it was under MySQL’s maximum of 767 (i.e. 767 bytes / 3 bytes for utf8 = max. 255 characters), but now the default is utf8mb4 each character can use up to 4 bytes instead of 3, and so the length must be reduced to 191 (i.e. 767 bytes / 4 bytes for utf8mb4 = max. 191 characters). WordPress core only does this for sites running on MySQL 5.5 and above, but it seemed easier just to reduce the key length for all Tabulate installations; it doesn’t seem likely to be an annoyance to anyone.
+ // 'o' is better than 'Y' because it does not add leading + // zeroes to years with fewer than four digits. + // For some reason, though, this fails for some years - + // returning one year lower than it's supposed to - unless you + // add the equivalent of 3 days or more to the number of + // seconds. Is that a leap day thing? Weird PHP bug? Who knows. + // Anyway, it's easy to get around. + $yearString = date( 'o', $seconds + 300000 );
For my own future reference, resizing a Digital Ocean storage volume is (as described in the docs) quite easy:
- Resize the volume in the the DO control panel.
$ sudo resize2fs /dev/disk/by-id/scsi-0DO_Volume_volume-xxxn-nn
(I recommend Digital Ocean for anyone needing a VPS. I’ve been using them for a few years and have found it all quite brilliant.)
I’ve been trying to replicate locally a bug with MediaWiki’s GlobalPreferences extension. The bug is about the increased number of database reads that happen when the extension is loaded, and the increase happens not on the database table that stores the global preferences (as might be expected) but rather on the ‘local’ tables. However, locally I’ve had all of these running on the same database server, which makes it hard to watch the standard monitoring tools to see differences; so, I set things up on two database servers locally.
Firstly, this was a matter of starting a new MySQL server in a Docker container (accessible at 127.0.0.1:3305 and with its data in a local directory so I could destroy and recreate the container as required):
docker run -it -e MYSQL_ROOT_PASSWORD=pwd123 -p3305:3306 -v$PWD/mysqldata:/var/lib/mysql mysql
(Note that because we’re keeping local data, root’s password is only set on the first set-up, and so the
MYSQL_ROOT_PASSWORD can be left off future invocations of this command.)
Then it’s a matter of setting up MediaWiki to use the two servers:
$wgLBFactoryConf = [ 'class' => 'LBFactory_Multi', 'sectionsByDB' => [ // Map of database names to section names. 'mediawiki_wiki1' => 's1', 'wikimeta' => 's2', ], 'sectionLoads' => [ // Map of sections to server-name/load pairs. 'DEFAULT' => [ 'localdb' => 0 ], 's1' => [ 'localdb' => 0 ], 's2' => [ 'metadb' => 0 ], ], 'hostsByName' => [ // Map of server-names to IP addresses (and, in this case, ports). 'localdb' => '127.0.0.1:3306', 'metadb' => '127.0.0.1:3305', ], 'serverTemplate' => [ 'dbname' => $wgDBname, 'user' => $wgDBuser, 'password' => $wgDBpassword, 'type' => 'mysql', 'flags' => DBO_DEFAULT, 'max lag' => 30, ], ]; $wgGlobalPreferencesDB = 'wikimeta';
New MediaWiki extension: AutoCategoriseUploads. It “automatically adds categories to new file uploads based on keyword metadata found in the file. The following metadata types are supported: XMP (many file types, including JPG, PNG, PDF, etc.); ITCP (JPG); ID3 (MP3)”.
Unfortunately there’s no code yet in the repository, so there’s nothing to test. Sounds interesting though.
No, it’s actually because property is theft!
A few years ago I came across Marx CSS reset, which is a simple and small (7.92 KB) stylesheet that provides decent formatting not only for the usual HTML element, but also all the new HTML5 ones. It does it by not expecting anyone to do things like
<ul class="nav">…</ul> but rather
<nav><ul>…</ul></nav> which mightn’t seem like much, but it feels better to me.
Maybe I just wish to live in a classless society.
I thought I’d help out and try to update the Flickr2Piwigo plugin to support OAuth, but having done so I now seem to have become a maintainer of the thing. So that’s good. I’ve just released version 1.3.0.
I’ll try to see to all the outstanding bug reports (well, there’s only one at the moment). And then perhaps add some extra features (support for approximate dates? automatic downloading? download of other people’s photos?).