Commons talk:State Library of Queensland/Subjects

category regex fix edit

The following regex fixes missing ':' in Category links

/\[\[Category:/mg
[[:Category:

— Preceding unsigned comment added by John Vandenberg (talk • contribs)


Default categories edit

Maybe would could try to replace

| \1 || ||

with

| \1 || {{subst:#ifexist: Category:\1 | [[:Category:\1]] }} ||

It makes it easier to edit the result. --  Docu  at 12:50, 19 December 2010 (UTC)Reply

I need the categories to be recorded on these pages, so I can use them in other parts of my bot logic. I could write a script which identifies when ds:subject=category, and adds them to these pages. John Vandenberg (chat) 12:59, 19 December 2010 (UTC)Reply
Sure, but if we run the a/m search/replace across these pages, all already existing categories would be visible. --  Docu  at 13:01, 19 December 2010 (UTC)Reply
Ah, I follow you. That should work. I'll try it now. John Vandenberg (chat) 13:02, 19 December 2010 (UTC)Reply

Using MediaWiki:Gadget-RegexMenuFramework, the following works:

Search
/^\| ([^|]*) \|\|  \|\| $/gm
Replace
| $1 || {{subst:#ifexist: Category:$1 | [[:Category:$1|]] }} || 

John Vandenberg (chat) 13:11, 19 December 2010 (UTC)Reply

| $1 || {{subst:#ifexist: Category:$1 | [[:Category:$1]] }} ||
does indeed. --  Docu  at 13:23, 19 December 2010 (UTC)Reply
Thank you so much. I'll run a larger batch with these, and hopefully we can find some more patterns to load in next. John Vandenberg (chat) 14:00, 19 December 2010 (UTC)Reply

Patterns edit

To implement one of the patterns from Commons_talk:State_Library_of_Queensland/Subjects/Common, I used:

/\| Mt\. ([^(|]*) \(Qld\.\) \|\| \|\|/g
| Mt. $1 (Qld.) || [[:Category:Mount $1, Queensland]] ||

at Commons:State Library of Queensland/Subjects/M. --  Docu  at 16:58, 19 December 2010 (UTC)Reply

For people, the following worked fairly well at Commons:State Library of Queensland/Subjects/M:

/\| ([^,(|]*), ([^|(]*) \(Portraits\) \|\| \|\|/g
| $1, $2 (Portraits) || [[:Category:$2 $1]] ||

It could use some tweaks. --  Docu  at 17:07, 19 December 2010 (UTC)Reply

For ships:

/\| ([^(|]*) \(Ship\) \|\| \|\|/g
| $1 (Ship) || [[:Category:$1 (ship)]] ||

worked just fine. --  Docu  at 17:16, 19 December 2010 (UTC)Reply

  ships all done --  Docu  at 22:24, 20 December 2010 (UTC)Reply

Patters to handle different methods of disambiguation

/\| ([^(|]*) \(Qld.\) \|\|  \|\| *$/gm
| $1 (Qld.) || {{subst:#ifexist: Category:$1, Queensland | [[:Category:$1, Queensland|]] }} || 
/\| ([^(|]*) \(Qld.\) \|\|  \|\| *$/gm
| $1 (Qld.) || {{subst:#ifexist: Category:$1 | [[:Category:$1|]] }} || 
/\| ([^(|]*) \(Brisbane, Qld.\) \|\|  \|\| *$/gm
| $1 (Brisbane, Qld.) || {{subst:#ifexist: Category:$1, Queensland | [[:Category:$1, Queensland|]] }} || 

John Vandenberg (chat) 22:12, 20 December 2010 (UTC)Reply

As (Qld.) is used with place names, I'd add corresponding ", Queensland" categories even if they haven't been created yet. --  Docu  at 22:24, 20 December 2010 (UTC)Reply
There are a lot of prefixes which are unsuitable for category names. e.g. 'Wheeler, Mt (Qld.)' becomes 'Wheeler'. 'Woodstock district (Qld.)' and 'Wolfram region (Qld.)' would also need a special regex. Once these cases are handled, we could add "<prefix>, Queensland" redlinks with only minor corrections needed before saving. John Vandenberg (chat) 01:24, 29 December 2010 (UTC)Reply
Maybe we should split out categories for people and deal with them separately. The portraits conversions at Commons:State Library of Queensland/Subjects/M look ok and could be applied to other letters, but if someone wants to work with them more extensively, they could be improved (merge a few spellings, remove some of the prefixes, check for the exact spelling of existing WP articles, etc.). --  Docu  at 23:34, 20 December 2010 (UTC)Reply

This pattern adds a missing category wherever a word exists(in this case Toowoomba).

/^\| ([^|]*Toowoomba[^|]*) \|\| \|\| $/gm
| $1 || [[:Category:Toowoomba, Queensland]] ||

John Vandenberg (chat) 23:08, 10 January 2011 (UTC)Reply

There should be two spaces between the '|' in the first line; wiki eats them. John Vandenberg (chat) 23:13, 10 January 2011 (UTC)Reply

more about portraits edit

To implement that last suggestion from the previous section (20 December 2010), I started creating subcategories for Premiers and Governors and adding those to the list.
There are also a series of names that are being mapped to, e.g. Category:Politicians of Queensland. This is probably a good idea. The only backside there might be is that if a name isn't included in the description itself, it might get lost through this. A possible workaround could be to add {{Depicted person}} to descriptions. --  Docu  at 12:27, 7 January 2011 (UTC)Reply
In order to add {{Depicted person}} to descriptions based on the subject headings, I will need to know which subject headings refer to people.
IMO, mapping to Category:Politicians of Queensland is a good first step, as that category is a 'people' category.
It is unlikely that we will be loosing any information embedded within the subject headings, as we'll be able to see which subject headings don't have a one-to-one mapping with a category for the same person. John Vandenberg (chat) 10:01, 10 January 2011 (UTC)Reply
Somehow the names should still be available on the file description pages.
If we can avoid the template, all the better. --  Docu  at 20:18, 10 January 2011 (UTC)Reply
I've added this as a /Todo item. John Vandenberg (chat) 21:40, 10 January 2011 (UTC)Reply
I'm not sure what you guys just did, but somehow this messed up the mapping that was done for Category:William_McCormack at 07:44, 2010 December 21 and e.g. File:StateLibQld 1 103334 William McCormack.jpg ends up in less useful places. --  Docu  at 05:14, 11 January 2011 (UTC)Reply
I readded these categories with
/\| ([^,(|]*), ([^|(]*) \(Portraits\) \|\| \[\[:Category:Politicians of Queensland\|Politicians of Queensland\]\] \|\|/g
| $1, $2 (Portraits) || [[:Category:Politicians of Queensland|Politicians of Queensland]], [[:Category:$2 $1]] ||
Sorry if some of your work was lost in the process. John Vandenberg (chat) 10:28, 11 January 2011 (UTC)Reply

ships edit

It looks like we should recategorise the ships. See Commons_talk:Naming_categories#Ship_naming_conventions/policy. --John Vandenberg (chat) 08:27, 24 December 2010 (UTC)Reply

Sydney (Ship) edit

I'm wondering about this edit changing Category:Sydney (ship) => Category:HMAS Sydney (1912)

Can we be sure that this will apply to all future uploads with this subject? --  Docu  at 11:38, 28 December 2010 (UTC)Reply

This category may not always apply; the images could also be w:HMAS_Sydney_(D48) and w:HMAS Sydney (R17). I'll do an upload batch of all images with that subject heading so we can recategorise them quickly. The recategorisation will be useful information for the library. John Vandenberg (chat) 01:29, 29 December 2010 (UTC)Reply
I reverted the mapping for now and added a list at Category:Sydney (ship) instead. --  Docu  at 04:21, 29 December 2010 (UTC)Reply
I've completed a batch upload of images into Category:Sydney (ship). We shall soon know the answer to your question. John Vandenberg (chat) 06:05, 29 December 2010 (UTC)Reply
it could be more interesting. File:StateLibQld 1 169759 Sydney (ship).jpg looks like en:Sydney (ship). John Vandenberg (chat) 06:37, 29 December 2010 (UTC)Reply

File:StateLibQld 1 183259 Sydney (ship).jpg, File:StateLibQld 1 81175 Sydney (ship).jpg & File:StateLibQld 1 95792 Sydney (ship).jpg all look like the 1912 ship. File:StateLibQld 1 170487 Sydney (ship).jpg & File:StateLibQld 1 171979 Sydney (ship).jpg look like a vessel not mentioned on Wikipedia. File:StateLibQld 1 171239 Sydney (ship).jpg & File:StateLibQld 1 171987 Sydney (ship).jpg look like en:HMAS Sydney (R17). John Vandenberg (chat) 06:44, 29 December 2010 (UTC)Reply

Yes that's right and I've categorised the two warships accordingly. Nick-D (talk) 06:55, 29 December 2010 (UTC)Reply
I removed Category:Sydney (ship) from 5 images categorized in one of the other categories. --  Docu  at 12:16, 29 December 2010 (UTC)Reply


Summary edit

There is now a list of ships at Ships on images from the State Library of Queensland. --  Docu  at 21:01, 2 February 2013 (UTC)Reply

Category: Verandas edit

Thee are now ca 250 images double-categorised in Category:Verandas and Category:Verandas in Australia. Could the bot move these to the newly created Category:Verandas in Queensland ? --Elekhh (talk) 05:28, 6 January 2011 (UTC)Reply

You could do that by adding {{intersect categories|Verandas|Images from the State Library of Queensland}} to Category:Verandas in Queensland. Once it's done, you could redo the same with "Verandas in Australia".
Alternatively, it can be done quite quickly by using Cat-a-lot.
Ideally, we would attempt to create topical subcategories at Category:Verandas and categorize the images there into more specific topical subcategories while keeping them in Category:Verandas in Queensland. Afterall, we already know where they are located, but would want to know more about the type of veranda. --  Docu  at 05:42, 6 January 2011 (UTC)Reply
Oh wow, excellent tool. I am not aware of any subcategory system for verandas but I guess it could be made up based on building type (house/commercial), size (one/two storey) and construction material (wood, brick). Although most in QLD are house-one_story-wood --Elekhh (talk) 07:05, 6 January 2011 (UTC)Reply
Return to the project page "State Library of Queensland/Subjects".