Difference between revisions of "User:BobBot"
Line 4: | Line 4: | ||
== 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 float-right" | {| 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 | ! Type | ||
Line 23: | Line 25: | ||
=== The Update Job === | === The Update Job === | ||
{| class="wikitable float-right" | {| class="wikitable float-right" | ||
− | ! Code: | + | ! rowspan="2" | Code: |
− | | [https://gist.github.com/xZise/8960127 gist] | + | | [https://github.com/xZise/bobbot/blob/master/updata.py current git] |
+ | |- | ||
+ | | [https://gist.github.com/xZise/8960127 old gist] | ||
|- | |- | ||
! Type | ! Type | ||
Line 42: | Line 46: | ||
=== The Language Job === | === The Language Job === | ||
{| class="wikitable float-right" | {| 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 | ! Type | ||
Line 59: | Line 65: | ||
=== The Data Template Job === | === The Data Template Job === | ||
{| class="wikitable float-right" | {| class="wikitable float-right" | ||
− | ! Code | + | ! rowspan="2" | Code: |
− | | [https://gist.github.com/xZise/8960037 gist] | + | | [https://github.com/xZise/bobbot/blob/master/data_template.py current git] |
+ | |- | ||
+ | | [https://gist.github.com/xZise/8960037 old gist] | ||
|- | |- | ||
! Type | ! Type | ||
Line 75: | Line 83: | ||
{| class="wikitable float-right" | {| class="wikitable float-right" | ||
! Code | ! Code | ||
− | | | + | | [https://github.com/xZise/bobbot/blob/master/thumbnails.py git] |
|- | |- | ||
! Type | ! Type | ||
Line 81: | Line 89: | ||
|- | |- | ||
! Status | ! Status | ||
− | | style="color:green;" | Finished | + | | style="color:green;" | Finished/Ready |
|} | |} | ||
− | I | + | I'm going through all small images and add them to [[User:BobBot/Thumbnails]] if they look like they could be a thumbnail. A human than can either set if this is a thumbnail or leave it. On the next execution I go through that list first and check which thumbnails have been marked, and will either mark them {{Tl|No thumbnails please}} or {{Tl|Is not thumbnail}}. I'll also remove all images which aren't there. Images that aren't a thumbnail get 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]]. If the hash has changed in the mean time, I reset the thumbnail status to "unknown". |
My criteria for small images are: | My criteria for small images are: | ||
Line 90: | Line 98: | ||
# 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. | # 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 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. | + | This job was 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 === | === The Type Job === | ||
{| class="wikitable float-right" | {| class="wikitable float-right" | ||
! Code | ! Code | ||
− | | | + | | [https://github.com/xZise/bobbot/blob/master/infobox_part.py git] |
|- | |- | ||
! Type | ! Type | ||
− | | Periodical | + | | Once/Periodical |
|- | |- | ||
! Status | ! Status | ||
− | | style="color: | + | | 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. | + | 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 === |
Revision as of 11:33, 4 May 2014
This is a bot owned by User:XZise.
Administrators: In the event I mess up, click the emergency stop button. |
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.
Contents
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)
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 add them to User:BobBot/Thumbnails if they look like they could be a thumbnail. A human than can either set if this is a thumbnail or leave it. On the next execution I go through that list first and check which thumbnails have been marked, and will either mark them {{No thumbnails please}} or {{Is not thumbnail}}. I'll also remove all images which aren't there. Images that aren't a thumbnail get 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. If the hash has changed in the mean time, I reset the thumbnail status to "unknown".
My criteria for small images are:
- Small file size up to 20 KiB (20·2¹⁰ or 20480 Bytes), I don't even look at larger images
- 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 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
- Another possibility would be to go through Category:Move requests and check what I can do there.
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.