Difference between revisions of "User:BobBot"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Possible others)
(The Update Job: Fix broken link)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{BlockBotButton|owner=[[User:XZise]]}}
 
{{BlockBotButton|owner=[[User:XZise]]}}
  
Hi, I'm [[Bob Kerman]] and actually a bot. Currently I don't have yet a bot flag, but my boss <s>[[Jebediah Kerman]]</s> ehrm [[User:XZise|xZise]] is handling this.
+
Hi, I'm [[Bob Kerman]] and actually a bot. Currently I don't have yet a bot flag, but my boss <s>[[Jebediah Kerman]]</s> ehrm [[User:XZise|xZise]] is handling this. I'm also quite a fan of [http://www.imdb.com/title/tt1103987 Leverage] as you might have guessed from my jobs.
  
 
== Jobs ==
 
== Jobs ==
If you have other tasks which I might can do, contact me on my [[User talk:BobBot|talk page]]. I'm not planning to run a task regularly like [[User:RoboJeb|Robo Jeb]] usually does.
+
If you have other tasks which I might can do, contact me on my [[User talk:BobBot|talk page]]. I'm not planning to run a task regularly like [[User:RoboJeb|Robo Jeb]] usually does. I'm basing on [[mw:Manual:Pywikibot|Pywikibot]]. All scripts are available on [https://github.com/xZise/bobbot GitHub]. Some scripts have been previously uploaded on [gist.github.com/ GitHub Gist] and are not introduced into the main repository (yet?).
  
 
===  The Configuration Job ===
 
===  The Configuration Job ===
{| class="wikitable"
+
{| class="wikitable float-right"
! Code:
+
! rowspan="2" | Code:
| [https://gist.github.com/xZise/8602652 gist]
+
| [https://github.com/xZise/bobbot/blob/master/partmove.py current git]
 +
|-
 +
| [https://gist.github.com/xZise/8602652 old gist]
 +
|-
 +
! Type
 +
| Once
 +
|-
 +
! Status
 +
| style="color:red;" | Needs to be updated
 
|}
 
|}
 
The Configuration Job will assists in moving all part configuration files. Basically all files in [[:Category:Part configuration files]] need to be moved if they are not in the new directory system which is <span style="white-space:nowrap;">''Parts/&#123;&#123;&#123;parent&#125;&#125;&#125;/&#123;&#123;&#123;part&#125;&#125;&#125;/part.cfg''</span>.
 
The Configuration Job will assists in moving all part configuration files. Basically all files in [[:Category:Part configuration files]] need to be moved if they are not in the new directory system which is <span style="white-space:nowrap;">''Parts/&#123;&#123;&#123;parent&#125;&#125;&#125;/&#123;&#123;&#123;part&#125;&#125;&#125;/part.cfg''</span>.
 +
 +
With the new part infobox system, where parts of the infobox are extracted into modules the code needs to be updated, that it also looks for the <tt>type</tt> parameter. This will most likely be executed after ''[[#The Type Job|The Type Job]]''.
  
 
=== The Update Job ===
 
=== The Update Job ===
 +
{| class="wikitable float-right"
 +
! rowspan="2" | Code:
 +
| [https://github.com/xZise/bobbot/blob/master/update.py current git]
 +
|-
 +
| [https://gist.github.com/xZise/8960127 old gist]
 +
|-
 +
! Type
 +
| On demand
 +
|-
 +
! Status
 +
| style="color:red;" | Testing
 +
|}
 
The Update Job is not completely finished and tested but will assist when a new version of Kerbal Space Program is released. It will do the following tasks:
 
The Update Job is not completely finished and tested but will assist when a new version of Kerbal Space Program is released. It will do the following tasks:
 
* Update {{Tl|Check version/Cur}}
 
* Update {{Tl|Check version/Cur}}
Line 23: Line 45:
  
 
=== The Language Job ===
 
=== The Language Job ===
{| class="wikitable"
+
{| class="wikitable float-right"
! Code:
+
! rowspan="2" | Code:
| [https://gist.github.com/xZise/8898990 gist]
+
| [https://github.com/xZise/bobbot/blob/master/add_language.py current git]
 +
|-
 +
| [https://gist.github.com/xZise/8898990 old gist]
 +
|-
 +
! Type
 +
| On demand
 +
|-
 +
! Status
 +
| style="color:yellow;" | Ready
 
|}
 
|}
 
The Language Job adds a language if needed to all required places. On [[Project:Adding a New Language]] is a list of tasks what to do. I also edit templates {{Tl|lang}}, {{Tl|if lang}} and {{Tl|if lang link}} if the language code is yet unknown. Currently there are two different types of how the templates work. To automatically add a template, add it to [[:Category:BobBot if lang type]] or [[:Category:BobBot lang type]]. (Both categories don't exist yet, but I'll create them, when I got the bot flag; They will be hidden)
 
The Language Job adds a language if needed to all required places. On [[Project:Adding a New Language]] is a list of tasks what to do. I also edit templates {{Tl|lang}}, {{Tl|if lang}} and {{Tl|if lang link}} if the language code is yet unknown. Currently there are two different types of how the templates work. To automatically add a template, add it to [[:Category:BobBot if lang type]] or [[:Category:BobBot lang type]]. (Both categories don't exist yet, but I'll create them, when I got the bot flag; They will be hidden)
Line 32: Line 62:
 
* ''lang'' type: Each language is listed like <tt>| <language code> = &#123;&#123;&#123;<language code>|&#125;&#125;&#125;</tt> in a large parameter list or switch case where each language returns it's own result.
 
* ''lang'' type: Each language is listed like <tt>| <language code> = &#123;&#123;&#123;<language code>|&#125;&#125;&#125;</tt> in a large parameter list or switch case where each language returns it's own result.
 
<small>(''lang'' and ''if lang link'' (might need to be edited to make it compatible) would be ''lang'' type, and ''if lang'' would be ''if lang'' type)</small>
 
<small>(''lang'' and ''if lang link'' (might need to be edited to make it compatible) would be ''lang'' type, and ''if lang'' would be ''if lang'' type)</small>
 +
 +
:''Just a small note:'' Currently my home is not available, so I can't do anything, but it seems like <tt>th</tt> needs to be added. This might be a chance to test the script in wild first time. So hopefully I don't forget to do that.
 +
 +
=== The Data Template Job ===
 +
{| class="wikitable float-right"
 +
! rowspan="2" | Code:
 +
| [https://github.com/xZise/bobbot/blob/master/data_template.py current git]
 +
|-
 +
| [https://gist.github.com/xZise/8960037 old gist]
 +
|-
 +
! Type
 +
| Periodical
 +
|-
 +
! Status
 +
| style="color:green;" | Finished
 +
|}
 +
With this script I automatically add {{Tl|Data template used}} to all data templates. I consider all pages data templates if their page name ends with <tt>[[Template:Infobox|/Box]]</tt>, <tt>[[Template:Infobox/Body|/Data]]</tt>, <tt>[[Template:Reference frames|/RefFrame]]</tt> or <tt>[[Template:Body data|/Params]]</tt>. This could actually be a periodical job.
 +
 +
This job was executed on 23<sup>rd</sup> April 2014 from about 09:45 — 10:08 UTC (with pauses in between). Although the current status is finished, a periodical execution, e.g. monthly or weekly, might happen.
 +
 +
=== The Thumbnail Job ===
 +
{| class="wikitable float-right"
 +
! Code
 +
| [https://github.com/xZise/bobbot/blob/master/thumbnails.py git]
 +
|-
 +
! Type
 +
| Periodical
 +
|-
 +
! Status
 +
| style="color:green;" | Finished/Ready
 +
|}
 +
I'm going through all small images and might mark them with {{Tl|No thumbnails please}}. I create then a log and add it to [[User:BobBot/The Thumbnail Job]]. A human than can check if the work I've done is okay or might fix it. Images that aren't a thumbnail need to be marked with {{Tl|Is not thumbnail}} so that I don't accidentally mark them as thumbnails on the next run. This are for example small graphics like [[:File:Col icon.png]].
 +
 +
My criteria for small images are:
 +
# Small file size up to 20 KiB (20·2¹⁰ or 20480 Bytes), I don't only look at larger images if they are in [[:Category:Image thumbnails]].
 +
# The smaller edge has at least 40 % of the length of the larger edge (s/l > 0.4)
 +
# One axis is smaller than 100 pixels. That means in conjunction with the second condition that the larger one is at most 250 pixels long.
 +
 +
This job was first executed on 23<sup>rd</sup> April 2014 from 10:22 — 10:49 UTC and then from 15:53 — 16:52 UTC with pauses in between both segments. It will be executed periodically and seek for new thumbnails.
 +
 +
=== The Type Job ===
 +
{| class="wikitable float-right"
 +
! Code
 +
| [https://github.com/xZise/bobbot/blob/master/infobox_part.py git]
 +
|-
 +
! Type
 +
| Once/Periodical
 +
|-
 +
! Status
 +
| style="color:green;" | Finished/Ready
 +
|}
 +
This job will go through all part infoboxes and check if there is either the type or role parameter set and tries to guess the type from the existing modules. It will be run at least once before the ''[[#The Configuration Job|The Configuration Job]]'' although a periodical execution is most likely. Similar to [[#The Thumbnail Job|The Thumbnail Job]] there is a list in [[User:BobBot/Types]] were I keep all infoboxes where I couldn't determine which type they are.
 +
 +
Previously I also changed any reference to ''Partbox'' with the corresponding ''Infobox/Part''. Because I'm only looking in pages which end with ''/Box'' I wasn't fixing pages which don't use this subpage. On each page I'm also sorting the parameters in the order they appear in the infobox. I don't sort them if I found a parameter which I don't know yet, although this happened only rarely.
  
 
=== Possible others ===
 
=== Possible others ===
* I might later also mark every small image with {{Tl|NoThumbnailsPlease}} to have some basis to work on. If new thumbnails get added later they can be marked manually.
 
 
* Another possibility would be to go through [[:Category:Move requests]] and check what I can do there.
 
* Another possibility would be to go through [[:Category:Move requests]] and check what I can do there.
* Also adding {{Tl|Data template used}} to all infobox pages (pages ending with /Box) should be possible.
 
  
 
== Problems? ==
 
== Problems? ==
 
If you think I messed up please contact me on my [[User talk:BobBot|talk page]] or my handler's [[User talk:XZise|one]]. You can see my [[Special:Contributions/BobBot|contributions here]].
 
If you think I messed up please contact me on my [[User talk:BobBot|talk page]] or my handler's [[User talk:XZise|one]]. You can see my [[Special:Contributions/BobBot|contributions here]].

Latest revision as of 17:18, 8 April 2018

Hi, I'm Bob Kerman and actually a bot. Currently I don't have yet a bot flag, but my boss Jebediah Kerman ehrm xZise is handling this. I'm also quite a fan of Leverage as you might have guessed from my jobs.

Jobs

If you have other tasks which I might can do, contact me on my talk page. I'm not planning to run a task regularly like Robo Jeb usually does. I'm basing on Pywikibot. All scripts are available on GitHub. Some scripts have been previously uploaded on [gist.github.com/ GitHub Gist] and are not introduced into the main repository (yet?).

The Configuration Job

Code: current git
old gist
Type Once
Status Needs to be updated

The Configuration Job will assists in moving all part configuration files. Basically all files in Category:Part configuration files need to be moved if they are not in the new directory system which is Parts/{{{parent}}}/{{{part}}}/part.cfg.

With the new part infobox system, where parts of the infobox are extracted into modules the code needs to be updated, that it also looks for the type parameter. This will most likely be executed after The Type Job.

The Update Job

Code: current git
old gist
Type On demand
Status Testing

The Update Job is not completely finished and tested but will assist when a new version of Kerbal Space Program is released. It will do the following tasks:

  • Update {{Check version/Cur}}
  • Add the (possibly) next version to {{Check version/Rev}}
  • Create a category for the (possibly) next version. Category:Check version/X, where X is the version number.
  • Go through all part files in GameData/Squad/Parts and check them with the version on the wiki
  • Create a new page with the name of the version which redirects to version history, like 0.23 is redirecting.

There is no code uploaded yet.

The Language Job

Code: current git
old gist
Type On demand
Status Ready

The Language Job adds a language if needed to all required places. On Project:Adding a New Language is a list of tasks what to do. I also edit templates {{lang}}, {{if lang}} and {{if lang link}} if the language code is yet unknown. Currently there are two different types of how the templates work. To automatically add a template, add it to Category:BobBot if lang type or Category:BobBot lang type. (Both categories don't exist yet, but I'll create them, when I got the bot flag; They will be hidden)

  • if lang type: Each language is listed like | <language code> in a switch case where multiple languages share one result.
  • lang type: Each language is listed like | <language code> = {{{<language code>|}}} in a large parameter list or switch case where each language returns it's own result.

(lang and if lang link (might need to be edited to make it compatible) would be lang type, and if lang would be if lang type)

Just a small note: Currently my home is not available, so I can't do anything, but it seems like th needs to be added. This might be a chance to test the script in wild first time. So hopefully I don't forget to do that.

The Data Template Job

Code: current git
old gist
Type Periodical
Status Finished

With this script I automatically add {{Data template used}} to all data templates. I consider all pages data templates if their page name ends with /Box, /Data, /RefFrame or /Params. This could actually be a periodical job.

This job was executed on 23rd April 2014 from about 09:45 — 10:08 UTC (with pauses in between). Although the current status is finished, a periodical execution, e.g. monthly or weekly, might happen.

The Thumbnail Job

Code git
Type Periodical
Status Finished/Ready

I'm going through all small images and might mark them with {{No thumbnails please}}. I create then a log and add it to User:BobBot/The Thumbnail Job. A human than can check if the work I've done is okay or might fix it. Images that aren't a thumbnail need to be marked with {{Is not thumbnail}} so that I don't accidentally mark them as thumbnails on the next run. This are for example small graphics like File:Col icon.png.

My criteria for small images are:

  1. Small file size up to 20 KiB (20·2¹⁰ or 20480 Bytes), I don't only look at larger images if they are in Category:Image thumbnails.
  2. The smaller edge has at least 40 % of the length of the larger edge (s/l > 0.4)
  3. One axis is smaller than 100 pixels. That means in conjunction with the second condition that the larger one is at most 250 pixels long.

This job was first executed on 23rd April 2014 from 10:22 — 10:49 UTC and then from 15:53 — 16:52 UTC with pauses in between both segments. It will be executed periodically and seek for new thumbnails.

The Type Job

Code git
Type Once/Periodical
Status Finished/Ready

This job will go through all part infoboxes and check if there is either the type or role parameter set and tries to guess the type from the existing modules. It will be run at least once before the The Configuration Job although a periodical execution is most likely. Similar to The Thumbnail Job there is a list in User:BobBot/Types were I keep all infoboxes where I couldn't determine which type they are.

Previously I also changed any reference to Partbox with the corresponding Infobox/Part. Because I'm only looking in pages which end with /Box I wasn't fixing pages which don't use this subpage. On each page I'm also sorting the parameters in the order they appear in the infobox. I don't sort them if I found a parameter which I don't know yet, although this happened only rarely.

Possible others

Problems?

If you think I messed up please contact me on my talk page or my handler's one. You can see my contributions here.