User:Rudolf von Goldenbot/log

From Gineipaedia, the Legend of Galactic Heroes wiki

Jump to: navigation, search

This page contains a log of this bot's general actions. It is maintained (manually) by kine, who also directs the bot, and any first-person references are to her. The log's purpose is three-fold:

  1. to more easily track overall changes made by the bot (the change log is not always clear),
  2. to help others understand how the bot can be used to assist with the wiki, and
  3. to have a record of the commands used (since i'm somewhat forgetful)

Contents

2011/09/25

Corrected spellings of Marr-Adetta

As Vympel pointed out, our spelling of Marr-Adetta throughout the site was quite erratic. I corrected this to match the spelling used in the anime subtitles.

python ./replace.py -pt:2 -always -regex -subcat:Browse "[Mm]a[lr]+.?[Aa][d]+e[t]+a" "Marr-Adetta"

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.

python ./replace.py -pt:2 -subcat:Browse -regex "([Aa]ttenbo[r]+ough|[Aa]ttemborrough)" "Attemborough"

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.

python ./replace.py -pt:2 -subcat:Browse -regex "([Ll]ebe[l]+o|[Rr]ebello)" "Rebelo"
python ./replace.py -pt:2 -subcat:Browse -regex "J[^ã\W]+ Rebelo" "João Rebelo"

Corrected spellings of Trunicht

There were still a few instances of Truniht; these have been corrected (except where intentional).

python ./replace.py -pt:2 -subcat:Browse -regex "[Tt]run[hi]+t" "Trunicht"

Added unknown-licence tag to images without copyright information

Several images were uploaded without having a licence selected. I've added the {{licence}} template to these, with the parameter unknown. (This automatically adds them to Files with unknown copyright status.)

python ./add_text.py -pt:2 -subcat:Files -text:"\n== Licensing ==\n{{licence|unknown}}" -except:"==[\s]?Licensing[\s]?=="

Added Summary header to images lacking it

Several images were uploaded without the Summary header above the image description; this has been corrected.

python ./add_text.py -pt:2 -subcat:Files -up -text:"== Summary ==" -except:"^==[\s]?(Summary|Licensing)[\s]?=="

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):

SELECT img_name, img_timestamp FROM wiki_image WHERE img_timestamp < 20110330000000 ORDER BY img_name LIMIT 1000

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. :/

python ./replace.py -pt:2 -regex -dotall -file:file1.xml -excepttext:"===Background information===" "==Appendices==[\r\n]+===Apocrypha===[\r\n]+([^\r\n]+)[\r\n]+(.*===Quotes===.*?)({{nav|===|\[\[Category|$)" "==Appendices==\n\2===Background information===\n{{cleanup-span|\1}}\n\n\3"
python ./replace.py -pt:2 -regex -dotall -file:file1.xml -excepttext:"===Background information===" "==Appendices==[\r\n]+===Apocrypha===[\r\n]+([^\r\n]+)[\r\n]+(.*===Memorable quotes===.*?)({{nav|===|\[\[Category|$)" "==Appendices==\n\2===Background information===\n{{cleanup-span|\1}}\n\n\3"
python ./replace.py -pt:2 -regex -dotall -file:file1.xml -excepttext:"===Background information===" "==Appendices==[\r\n]+===Apocrypha===[\r\n]+([^\r\n]+)[\r\n]+(.*===Name variations===.*?)({{nav|===|\[\[Category|$)" "==Appendices==\n\2===Background information===\n{{cleanup-span|\1}}\n\n\3"
python ./replace.py -pt:2 -regex -dotall -file:file1.xml -excepttext:"===Background information===" "==Appendices==[\r\n]+===Apocrypha===[\r\n]+([^\r\n]+)[\r\n]+(.*===Appearances===.*?)({{nav|===|\[\[Category|$)" "==Appendices==\n\2===Background information===\n{{cleanup-span|\1}}\n\n\3"

Corrected Appendices section names

In cleaning up some of the name etymologies i missed (see above), i noticed we had some section names (under and including Appendices) that were incorrect. I've fixed these.

python ./replace.py -pt:2 -regex -subcat:People "===(Memorable )?Quotes===" "===Memorable quotes==="
python ./replace.py -pt:2 -regex -subcat:"Legend of Galactic Heroes" "===Name Variations===" "===Name variations==="
python ./replace.py -pt:2 -regex -subcat:"Legend of Galactic Heroes" "==Appendix==" "==Appendices=="

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:

Find:

^([0-9]{1})$

Replace:

xxxx\n'''Category:Images from Legend of Galactic Heroes (OVA) episode 00$1'''\nThis category contains all images from episode 00$1, {{e|00$1}}, of [[Legend of Galactic Heroes (OVA)|''Legend of Galactic Heroes'' (OVA)]].\n\n[[Category:Images from Legend of Galactic Heroes (OVA) by episode|{{PAGENAME}}]]\nyyyy\n\n

(et cetera)

3. And then do the needful:

python ./pagefromfile.py -pt:2 -start:xxxx -end:yyyy -file:file1.xml -notitle

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:

python ./replace.py -pt:2 -regex -subcat:Files " {{logh\|([0-9]{3})}}\r\n" " ({{logh|\1|i}})\n"
python ./replace.py -pt:2 -regex -subcat:Files "from {{logh\|([0-9]{3})}}\.\r\n" "({{logh|\1|i}})\n\n{{cleanup}}\n\n"
python ./replace.py -pt:2 -regex -subcat:Files "\({{logh\|([0-9]{3})}}\)\r\n" "({{logh|\1|i}})\n"

Created and moved image categories

I needed to make some changes to the image category structure, somewhat related to the above. Specifically i created a handful of new Gaiden OVA categories:

python ./pagefromfile.py -pt:2 -start:xxxx -end:yyyy -file:file1.xml -notitle

Then i moved all Gaiden images from the erroneous (and non-existing) categories they were in to the new ones:

python ./category.py -pt:2 move -cat:"Images from Legend of Galactic Heroes Gaiden series 1"
> Images from Legend of Galactic Heroes Gaiden (OVA) series 1
python ./category.py -pt:2 move -cat:"Images from Legend of Galactic Heroes Gaiden series 2"
> Images from Legend of Galactic Heroes Gaiden (OVA) series 2

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:

  1. I take a screenshot in Movist or VLC or whatever
  2. I rename the screenshot in the format <episode number> BD <description>.png
  3. I open the screenshot in Photoshop and run two or three macros which automatically crop and export the images to JPEG
  4. 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
  5. Hazel picks up the files and sends them to my shell script
  6. Shell script moves the PNG into the folder LOGH OVA screenshots/<episode number>/!png
  7. Shell script renames the JPEG to the format <description> (BD).jpg
  8. 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
  9. I fill in the rest (usually just the name) and save
  10. Shell script passes the description to the bot, and the bot uploads the images in my name
  11. Shell script moves the JPEG into the folder LOGH OVA screenshots/<episode number>

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:

python ./replace.py -pt:2 -always -file:file1.xml "[[Category:Images to replace" "[[Category:Images to delete"
python ./category.py -pt:2 -always -file:file1.xml
> Images to delete

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

Personal tools
Namespaces
Variants
Actions
Miscellany
Common
Tool box