User:Gifted9/autowikibrowser: Difference between revisions
No edit summary |
|||
Line 53: | Line 53: | ||
# make list '''source''': category, '''category''': rotatable > '''make list''' |
# make list '''source''': category, '''category''': rotatable > '''make list''' |
||
# '''more''' tab > append/prepend text '''enabled''' checked, '''append''' selected |
# '''more''' tab > append/prepend text '''enabled''' checked, '''append''' selected |
||
# write the following in the textbox < |
# write the following in the textbox <syntaxhighlight lang="python"> |
||
==Rotated Views== |
==Rotated Views== |
||
<gallery> |
<gallery> |
||
Line 60: | Line 60: | ||
%%title%%se.png |
%%title%%se.png |
||
%%title%%ne.png |
%%title%%ne.png |
||
</gallery></ |
</gallery></syntaxhighlight> |
||
repeat step 1, then do the following |
repeat step 1, then do the following |
||
Line 79: | Line 79: | ||
# '''new rule''' > '''regular expression''' checked |
# '''new rule''' > '''regular expression''' checked |
||
# in '''find''' <code>File:(.+).png</code> |
# in '''find''' <code>File:(.+).png</code> |
||
# in '''replace''' textbox, write < |
# in '''replace''' textbox, write <syntaxhighlight lang="python"> |
||
|- |
|- |
||
|[[File:$1.png]] |
|[[File:$1.png]] |
||
<br>$1 |
<br>$1 |
||
|[[File:$1nw.png]][[File:$1sw.png]][[File:$1se.png]][[File:$1ne.png]] |
|[[File:$1nw.png]][[File:$1sw.png]][[File:$1se.png]][[File:$1ne.png]] |
||
</syntaxhighlight> |
|||
</nowiki></code> |
|||
# '''more''' tab > append/prepend text '''enabled''' checked, '''append''' selected |
# '''more''' tab > append/prepend text '''enabled''' checked, '''append''' selected |
||
# write the following in the textbox < |
# write the following in the textbox <syntaxhighlight lang="python"> |
||
{| class="greentable" width="70%" |
{| class="greentable" width="70%" |
||
|- align="left" |
|- align="left" |
||
!Item |
!Item |
||
!Rotations |
!Rotations |
||
</syntaxhighlight> |
|||
</nowiki></code> |
|||
# '''start''' tab > '''start''' |
# '''start''' tab > '''start''' |
||
# in the '''bottom right pane''', scroll all the way down and copy & paste the following: < |
# in the '''bottom right pane''', scroll all the way down and copy & paste the following: <syntaxhighlight lang="python"> |
||
|- |
|- |
||
! |
! |
||
! |
! |
||
|}</ |
|}</syntaxhighlight> |
||
# the names will be in Itemfullname format, you will need to manually correct them to Item Full Name format |
# the names will be in Itemfullname format, you will need to manually correct them to Item Full Name format |
||
⚫ | |||
⚫ | |||
=== task: create an item guide page skeleton from its picture guide page === |
=== task: create an item guide page skeleton from its picture guide page === |
||
[[User:Gifted9/autowikibrowser testing/pic to item]] |
example: [[User:Gifted9/autowikibrowser testing/pic to item]] |
||
# '''options''' tab > '''find and replace''' checked > '''advanced settings''' |
|||
difference between pic and item: http://webkinzpictureguide.shoutwiki.com/w/index.php?title=User%3AGifted9%2Fautowikibrowser_testing&type=revision&diff=57855&oldid=57854 |
|||
# click '''new rule''' six times to create six rules, then enter the following information into each rule |
|||
⚫ | |||
<code><nowiki> |
|||
⚫ | |||
{{WPG(?:|3|4|6) |
|||
! rule number !! find textbox !! replace textbox !! regular expression checked |
|||
|- |
|||
⚫ | |||
| 1 || <code><nowiki>{{Picture Guide}}</nowiki></code> || <syntaxhighlight lang="python">\n{|class="pinktable sortable" width="60%" |
|||
|- align="left" |
|- align="left" |
||
!Name |
!Name |
||
Line 119: | Line 117: | ||
!Last Available |
!Last Available |
||
!Tradeable |
!Tradeable |
||
</syntaxhighlight> || yes |
|||
|{{!}}[[File:(.+).png]]<br>(.+) |
|||
|- |
|- |
||
| 2 || <code><nowiki>{{Picture Guide}}</nowiki></code> || <code><nowiki>{{Item Guide}}</nowiki></code> || no |
|||
⚫ | |||
| |
|- |
||
| 3 || <code><nowiki>{{!}}\[\[File:(?:.+).png\]\]<br>(.+)</code></nowiki> || <syntaxhighlight lang="python">- |
|||
⚫ | |||
⚫ | |||
|x |
|||
⚫ | |||
|x |
|||
|x</syntaxhighlight> || yes |
|||
|- |
|- |
||
| 4 || <code><nowiki>\n}}\n</code></nowiki> || <syntaxhighlight lang="python">\n|- |
|||
! |
! |
||
! |
! |
||
Line 135: | Line 133: | ||
! |
! |
||
|- |
|- |
||
⚫ | |||
</syntaxhighlight> |
|||
|| yes |
|||
|- |
|||
| 5 || <code><nowiki>[[Webkinz Picture Guide | >> Click here to return to the Picture Guide's main page]]</code></nowiki> |
|||
|| <code><nowiki>[[Webkinz Item Guide | >> Click here to return to the Item Guide's main page]]</code></nowiki> |
|||
|| no |
|||
|- |
|||
| 6 || <code><nowiki>\[\[\(Item Guide\) (.+) \| >> Click here to view when these items were last available\]\]\n</code></nowiki> |
|||
|| <code><nowiki>[[(Picture Guide) $1 | >> Click here to view pictures of these items]]\n</code></nowiki> || yes |
|||
|} |
|} |
||
⚫ | |||
</nowiki></code> |
|||
⚫ | |||
=== task: create a picture guide page from its item guide page === |
=== task: create a picture guide page from its item guide page === |
Revision as of 03:40, 27 October 2021
i hate doing anything manually that i could potentially automate and you probably do too, so here are some instructions to use autowikibrowser on webkinz picture guide.
if you have requests, drop them on my talk page
toot oriole
- download the program per their instructions: https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser#(2)_Download
- options > preferences > site > set project as custom and website page as http://webkinzpictureguide.shoutwiki.com/w/
- file > log in/profiles > log in with your normal credentials
- left side: load the pages you want to change here. i typically use my watchlist or wikisearch (text) for specific edits, or random pages to show them all. ctrl-shift-a to keep the list alphabetized, ctrl-shift-u to remove duplicates
- middle: toggle settings in any of the four tabs, per the below instructions
- start tab > start button will run awb and present the suggested changes. review in the top pane, and if satisfactory, click save
other places to rtfm
https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser - autowikibrowser's documentation
http://www.shoutwiki.com/wiki/Help:AutoWikiBrowser - shoutwiki's documentation
https://regex101.com/ - formats and explains regex to human eyes
hypothesis successful
the following are tasks i've successfully configured with awb. duplicate these instructions to do the same.
task: replace a whole wkn external url with a number according to vanilla wiki formatting
- options tab > find and replace checked > advanced settings
- new rule > regular expression checked
- in find textbox, write
([^[])https://webkinznewz.ganzworld.com/(.+?)(''|)</ref>
- in replace textbox, write
$1[https://webkinznewz.ganzworld.com/$2]$3</ref>
task: remove reftags from numbered external links
- options tab > find and replace checked > advanced settings
- new rule > regular expression checked
- in find textbox, write
<ref>\[http(.+)\]</ref>
- in replace textbox, write
[http$1]
task: remove #comment from wkn external links
- options tab > find and replace checked > advanced settings
- new rule > regular expression checked
- in find textbox, write
https://webkinznewz.ganzworld.com/(.+)#comments
- in replace textbox, write
https://webkinznewz.ganzworld.com/$1
task: add rotated views in gallery to file page
this is a two-step process to add rotated views to every file in category: rotatable
- make list source: category, category: rotatable > make list
- more tab > append/prepend text enabled checked, append selected
- write the following in the textbox
==Rotated Views== <gallery> %%title%%nw.png %%title%%sw.png %%title%%se.png %%title%%ne.png </gallery>
repeat step 1, then do the following
- options tab > find and replace checked > advanced settings
- new rule > regular expression checked
- in find textbox, write
File:(.+).png(nw|sw|se|ne).png
- in replace textbox, write
File:$1$2.png
task: create collection page from all in category
example: Rotatable Collection
- in wpg, create a new blank page as a destination for the collection pag
- make list source: category, category: rotatable > make list
- select one of the list, ctrl-a to highlight all, ctrl-c to copy
- on the collection page in wpg, ctrl-v to paste
- return to awb > options tab > find and replace checked > advanced settings
- new rule > regular expression checked
- in find
File:(.+).png
- in replace textbox, write
|- |[[File:$1.png]] <br>$1 |[[File:$1nw.png]][[File:$1sw.png]][[File:$1se.png]][[File:$1ne.png]]
- more tab > append/prepend text enabled checked, append selected
- write the following in the textbox
{| class="greentable" width="70%" |- align="left" !Item !Rotations
- start tab > start
- in the bottom right pane, scroll all the way down and copy & paste the following:
|- ! ! |}
- the names will be in Itemfullname format, you will need to manually correct them to Item Full Name format
task: create an item guide page skeleton from its picture guide page
example: User:Gifted9/autowikibrowser testing/pic to item
- options tab > find and replace checked > advanced settings
- click new rule six times to create six rules, then enter the following information into each rule
rule number | find textbox | replace textbox | regular expression checked |
---|---|---|---|
1 | {{Picture Guide}} |
\n{|class="pinktable sortable" width="60%"
|- align="left"
!Name
!First Available
!Last Available
!Tradeable
|
yes |
2 | {{Picture Guide}} |
{{Item Guide}} |
no |
3 | {{!}}\[\[File:(?:.+).png\]\]<br>(.+)</code> |
-
|$1
|x
|x
|x
|
yes |
4 | \n}}\n</code> |
\n|-
!
!
!
!
|-
|}
|
yes |
5 | [[Webkinz Picture Guide | >> Click here to return to the Picture Guide's main page]]</code>
|
[[Webkinz Item Guide | >> Click here to return to the Item Guide's main page]]</code>
|
no |
6 | \[\[\(Item Guide\) (.+) \| >> Click here to view when these items were last available\]\]\n</code>
|
[[(Picture Guide) $1 | >> Click here to view pictures of these items]]\n</code> |
yes |
testing in progress
the below items are in progress, use at your own risk
task: create a picture guide page from its item guide page
difference between item and pic: http://webkinzpictureguide.shoutwiki.com/w/index.php?title=User%3AGifted9%2Fautowikibrowser_testing&type=revision&diff=57857&oldid=57856
User:Gifted9/autowikibrowser testing/item to pic
task: replace all duplicate single references with a multireference
User:Gifted9/autowikibrowser testing/singleref to multiref
duplicate unnamed references and duplicate named references are vanilla features in general fixes https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/General_fixes#Duplicate_Named_References_(DuplicateNamedReferences)
"The article must already have at least one named reference (to avoid a 'change in citation style' in the article per WP:CITEVAR). This means at least one named ref in short format (<ref name=a/>) as a full named ref by itself does not cause any references to display as combined."
find: \<ref\>This item was available on the \[\[\(Picture_Guide\)_(Mobile_Wheel_of_Wow|Community_Codes|Balloon_Darts)_Archive\#(.+?)\]\]\<\/ref\>{1}
\<ref\>This item was available on the \[\[\(Picture_Guide\)_(Mobile_Wheel_of_Wow|Community_Codes|Balloon_Darts)_Archive\#(.+?)\]\]\<\/ref\>{2,}
replace: <ref name="(.+?)"\/>This item was available on the [[(Picture_Guide)_($1$2$3)_(.+?)]]</ref>{1}
<ref name="$2"/>{2}