2011/09/30

Categorised uncategorised images

There were about 165 uncategorised images; about 1/3 of these are images we don't particularly have specific categories for (meta stuff, talk-page illustrations, &c.) and the rest are screenshots that just need to be cited and placed in the appropriate media category. They're now in the Images needing citation category, if someone wants to get to work on them.

python ./category.py -pt:2 add -file:file1.xml

Corrected spellings of Attemborough

There were a handful of instances where Attemborough was misspelt as Attemborrough or Attenborrough; these have been corrected. I also normalised Attenborough to Attemborough per our canon policy.

Corrected spellings of João and Rebelo

There were still many instances of Lebello; these have been corrected (except where intentional). Additionally there were several alternate spellings of his first name (including Joe, lol) — these have also been changed.

2011/10/01

Added old images to Images to replace category

We have a large number of screenshots (uploaded mostly by myself) derived from the Nemesis and, to a lesser extent, LaserDisc rips. These all need to be replaced by images from the CA DVD rips, which are superior in picture quality. To help us with this task, i've added all of the oldest images on the site to the Images to replace category.

The date i chose is somewhat arbitrary (so i suspect the number of images needing replaced is higher), but this should cover a large portion of them. Also, in what is probably a minority of cases, some of the images have already been replaced (by files with different names). This is especially true for images replaced by BD screenshots.

Anyway, i first ran a SQL query to grab all images with upload dates prior to 30 March 2011 (these dates indicate the last upload date, so if they were replaced at some point afterwards they won't be returned):

After that i manually pruned the handful of irrelevant (non-screenshot) images, and then, after the necessary regexp replacing/formatting:

python ./category.py -pt:2 add -file:file1.xml

Replaced Nemesis screenshots by CA/BD images

There were two screenshots where we had the CA or BD images uploaded, but they weren't being used. I had these replaced.

python ./image.py -pt:2 "High Council building.jpg" "High Council building (rain).jpg"

python ./image.py -pt:2 "High Council.jpg" "High Council (BD).jpg"

Deleted unused images

In addition to the ones indicated above, there were about 30 images that were clearly unused and not likely to be needed for anything in the future (either replaced or just bad), so i removed these. You can see exactly which images were affected by viewing the bot's deletion log.

python ./delete.py -pt:2 -file:file1.xml

Moved and renamed erroneous Apocrypha sections

A while ago someone came through and added a bunch of name etymologies. Unfortunately they put them all in the wrong section (Apocrypha) and they also put the section in the wrong place (at the top instead of lower down). Additionally several of these lines contains misspellings or formatting errors. I've addressed this by moving and renaming (most of) the sections and then adding clean-up tags around the information in question.

This was quite complicated and required several passes; it was the best way i could think of. :/

2011/10/07

Created Images by episode categories

I decided it'd be helpful to have a list of images from each individual episode at a glance, so i decided to alter the citation templates (like {{logh}}) to automatically add files to categories). In order to do this of course i needed to create all of the categories. Exact steps to do so, since i know i'll forget:

1. Create a sequence of 110 numbers:

seq 1 110

2. Copy and paste sequence into TextMate, then construct templates suitable for pagefromfile.py:

Altered/corrected image citations

In order to prevent accidentally adding images to the episode categories when we don't want to, i've made it so that you need to put image citations in the format {{logh|###|i}} to get the automatic categorisation. This means all image citations up 'til now need updated. I did this in three parts, where the first two parts included correcting improperly formatted citations:

2011/10/11

Uploaded lots of Blu-ray screenshots

I have been on a Blu-ray screenshot rampage, and the editing, sorting, archiving, and uploading of those screenshots is a very tedious job. I've made a shell script for use with Hazel (a folder-monitoring tool for the Mac) to reduce that tediousness, and part of this script uses the bot. Here's what happens now:

I take a screenshot in Movist or VLC or whatever

I rename the screenshot in the format <episode number> BD <description>.png

I open the screenshot in Photoshop and run two or three macros which automatically crop and export the images to JPEG

I take both the PNGs and the JPEGs (i like to save the PNGs in case i need to make new JPEGs out of them in the future) and drop them onto my external drive

Shell script creates a basic image description which includes the summary, the in-universe year (determined by the episode number), the episode citation, the licence stuff, and the Blu-ray image category, and asks me to fill in the rest

I fill in the rest (usually just the name) and save

Shell script passes the description to the bot, and the bot uploads the images in my name

Replaced old images by Blu-ray ones

As part of my Blu-ray screenshot work i've obviously needed to replace the old images by their new Blu-ray equivalents. The bot is able to do this for all pages that a particular image is used on:

python ./image.py -pt:2 -always "Frederica.jpg" "Frederica (BD).jpg"

Moved old images to Images to delete

After replacing the old images, i then needed to move them to Images to delete. Some are already in Images to replace, so i run two commands. First i copy the file names from the wiki into a text file, and then:

2011/12/14

Populated Characters from Overture to a New War category

I've decided we need category pages to keep track of appearances, and i think the best way to do that without being ridiculous is to use hidden categories. So i've created Category:Characters from Overture to a New War as a first (and mostly easy) run. The category was created by hand, i compiled a list of the characters listed in the ONW credits who we actually have articles for, and then i ran the following:

python ./replace.py -pt:2 -file:file1.xml -regex -dotall "[\r\n]+(\[\[Category:[^\|]+?\]\])\s*$" "\n\1\n[[Category:Characters from Overture to a New War]]\n" -excepttext:"Characters from Overture to a New War"

python ./replace.py -pt:2 -file:file1.xml -regex -dotall "[\r\n]+(\[\[Category:[^\|]+?\|([^\|]+?)\]\])\s*$" "\n\1\n[[Category:Characters from Overture to a New War|\2]]\n" -excepttext:"Characters from Overture to a New War"

(The second one ensures that any existing sort keys are kept intact.) I hope to do the same for other categories like this, eventually