Difference between revisions of "User:Kynikos.bot"

From ArchWiki
Jump to: navigation, search
(new task)
(update)
(47 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[User:Kynikos|Kynikos]]' bot
 
[[User:Kynikos|Kynikos]]' bot
  
Powered by [[User:Kynikos/Wiki Monkey|Wiki Monkey]]
+
Powered by [[Wiki Monkey]]
  
  
'''Current tasks:'''
+
'''Requests:'''
*Migrate [[Template:Package Official]] to [[Template:Pkg]] and [[Template:Package AUR]] to [[Template:AUR]] (custom plugin)
+
* [[User talk:Kynikos.bot]]
{{hc|PkgAUR.js|<nowiki>
+
* [[ArchWiki:Requests#Bot requests]]
WM.Plugins.PkgAUR = new function () {
+
* [https://github.com/kynikos/wiki-monkey/issues Wiki Monkey's issue tracker]
    this.mainAuto = function (args, title) {
+
 
        var res = WM.MW.callAPIGet({action: "query",
+
 
                                    prop: "info|revisions",
+
'''Scheduled tasks:'''
                                    rvprop: "content|timestamp",
+
* Feb 24 (weekly) || Update [[Table of Contents]] (all translations) (see [https://github.com/kynikos/wiki-monkey/blob/development/src/configurations/WikiMonkey-archwikibot.user.js configuration], [https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/UpdateCategoryTree.js plugin source])
                                    intoken: "edit",
+
* Mar 1 (monthly) || Use HTTPS for links to archlinux.org, run on [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=0], [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=4], [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=6], [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=10], [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=12], [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=14] using the bot's [https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/SimpleReplace.js RegExp replace plugin] ({{ic|http:\/\/([a-z]+\.)?archlinux\.org(?!\.[a-z])}} {{ic|<nowiki>https://$1archlinux.org</nowiki>}})
                                    titles: encodeURIComponent(title)});
+
 
        var pages = res.query.pages;
+
 
       
+
'''Completed tasks:'''
        var pageid;
+
* 2012-12-06 || Use HTTPS for links to archlinux.org, run on [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=0] using the bot's [https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/SimpleReplace.js RegExp replace plugin] ({{ic|http:\/\/([a-z]+\.)?archlinux\.org(?!\.[a-z])}} {{ic|<nowiki>https://$1archlinux.org</nowiki>}})
        for each (pageid in pages) {
+
* 2012-12-05 || Wikify some types of external links, use HTTPS for links to archlinux.org, run on [https://wiki.archlinux.org/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.archlinux.org&namespace=0] (see [https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/ArchWikiFixLinks.js plugin source])
            break;
+
* 2012-06-20 || Remove instances of Template:Temporary i18n progressively
        }
+
* 2012-06-16 || Replace [[Template:i18n]] with local interlanguage links, see [[Help talk:I18n#"Dummy" interlanguage links and deprecation of Template:i18n]] ([https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/ArchWikiDummyInterlanguageLinks.js plugin source])
       
+
* 2012-04-24 || Remove the "'' (English)''" suffix from all the English categories, see [[Talk:Table of Contents#English Category Names: Capitalization and Conflict with i18n]] ([https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/ArchWikiRemoveCategorySuffix.js special plugin])
        var edittoken = pageid.edittoken;
+
* 2012-03-25 || Replace "http://aur.archlinux.org" with "https://aur.archlinux.org" (from [[Special:LinkSearch]] using the bot's [https://github.com/kynikos/wiki-monkey/blob/development/src/plugins/SimpleReplace.js RegExp replace plugin])
        var timestamp = pageid.revisions[0].timestamp;
+
* 2012-02-14 || Migrate Template:Package Official to [[Template:Pkg]] and Template:Package AUR to [[Template:AUR]] (custom plugin)
        var source = pageid.revisions[0]["*"];
+
* 2012-02-14 || Migrate Template:Filename to [[Template:ic]] (custom plugin)
       
+
* 2012-02-13 || Migrate Template:Codeline to [[Template:ic]] (custom plugin)
        var newtext = source.replace(/\{\{[Pp]ackage Official\|/g, "{{Pkg|");
+
        newtext = newtext.replace(/\{\{[Pp]ackage AUR\|/g, "{{AUR|");
+
       
+
        if (newtext != source) {
+
            var summary = "use new package templates, see [[Help:Style]]";
+
           
+
            res = WM.MW.callAPIPost({action: "edit",
+
                                    bot: "1",
+
                                    title: encodeURIComponent(title),
+
                                    summary: encodeURIComponent(summary),
+
                                    text: encodeURIComponent(newtext),
+
                                    basetimestamp: timestamp,
+
                                    token: encodeURIComponent(edittoken)});
+
       
+
            return (res.edit && res.edit.result == 'Success') ? true : false;
+
        }
+
        else {
+
            return true;
+
        }
+
    };
+
};
+
</nowiki>}}
+

Revision as of 06:07, 17 February 2013

Kynikos' bot

Powered by Wiki Monkey


Requests:


Scheduled tasks:


Completed tasks: