It is time I think (5AM on a Friday) to finally try to get the Flicker2Piwigo CLI script working. Small job before breakfast?
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';
I love the morning time, while the brain is still sharp enough to focus on one thing and get it done, but dull enough not to remember the other things and derail everything with panic about there being too much to do. The morning is when the world properly exists, and is broad and friendly.
I want a login-by-emailed-link feature for MediaWiki, so it’s easier to log in from mobile.
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.
Midwest Heritage of Western Australia is a terrific database of records of graves and deceased people in the mid-west region of WA.
I joined newCardigan today.
I keep wanting to be able to recommend the ‘best’ way for people (who don’t like command lines) to get research stuff online. Is it Flickr, Zenodo, Internet Archive, Wikimedia, and Github? Or is it a shared hosting account on Dreamhost, running MediaWiki, WordPress, and Piwigo? I’d rather the latter! Is it really that hard to set up your own website? (I don’t think so, but I probably can’t see what I can’t see.)
Anyway, even if running your own website, one should still be putting stuff on Wikimedia projects. And even if not using it for everything, Flickr is a good place for photos (in Australia) because you can add them to the Australia in Pictures group and they’ll turn up in searches on Trove. The Internet Archive, even if not a primary and cited place for research materials, is a great place to upload wikis’ public page dumps. So it really seems that the remaining trouble with self-hosting websites is that they’re fragile and subject to complete loss if you abandon them (i.e. stop paying the bills).
My current mitigation to my own sites’ reliance on me is to create annual dumps in multiple formats, including uploading public stuff to IA, and printing some things, and burning all to Blu-ray discs that get stored in polypropylene sleeves in the dark in places I can forget to throw them out. (Of course, I deal in tiny amounts of data, and no video.)
What was it Robert Graves said in I, Claudius about the best way to ensure the survival of a document being to just leave it sitting on ones desk and not try at all to do anything special — because it’s all perfectly random anyway as to what persists, and we can not influence the universe in any meaningful way?
I think I am learning to love paperbacks. (Am hiding in New Editions this morning.)