Difference between revisions of "Wiki Monkey"

From ArchWiki
Jump to: navigation, search
(Tour of the features: update for 1.13.1)
(Installation: rm old note)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Internet Applications]]
+
[[Category:Internet applications]]
 
[https://github.com/kynikos/wiki-monkey/wiki Wiki Monkey] is a MediaWiki-compatible bot and editor assistant that can be used directly within wiki pages in the browser as a user script. Currently it is tested on [[Firefox]], [[Chromium]] and [[Opera]], but it is very likely to work also on other browsers out of the box or with minor adaptations. Wiki Monkey can also be easily extended through the creation of plugins, exploiting its API.
 
[https://github.com/kynikos/wiki-monkey/wiki Wiki Monkey] is a MediaWiki-compatible bot and editor assistant that can be used directly within wiki pages in the browser as a user script. Currently it is tested on [[Firefox]], [[Chromium]] and [[Opera]], but it is very likely to work also on other browsers out of the box or with minor adaptations. Wiki Monkey can also be easily extended through the creation of plugins, exploiting its API.
  
 
The project is currently focused on ArchWiki, and as such most plugins address ArchWiki-specific problems.
 
The project is currently focused on ArchWiki, and as such most plugins address ArchWiki-specific problems.
  
==Installation==
+
== Installation ==
  
Follow [https://github.com/kynikos/wiki-monkey/wiki/Getting-started the upstream documentation].
+
Start by installing a user script engine for your browser:
  
{{Note|since the ArchWiki is served through HTTPS, Opera users will have to follow the instructions in the related note.}}
+
* '''Firefox:''' [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey]
 +
* '''Chromium:''' [https://chrome.google.com/webstore/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo Tampermonkey]
 +
* '''Opera:''' [https://addons.opera.com/en/extensions/details/violent-monkey Violentmonkey]
  
{{Tip|the names of ArchWiki-specific configurations appear in the configurations table with an "ArchWiki-" prefix.}}
+
Now just click on the following link and your browser should ask you to install the ArchWiki version of Wiki Monkey: [https://raw.github.com/kynikos/wiki-monkey/master/scripts/WikiMonkey-ArchWiki.user.js install].
  
==Tour of the features==
+
Follow [https://github.com/kynikos/wiki-monkey/wiki/Getting-started Getting started] for more information.
  
Discover the features of Wiki Monkey by following this tour. See [https://github.com/kynikos/wiki-monkey/wiki/Bundled-plugins Bundled plugins] for more detailed information.
+
== Tour of the features ==
  
{{Tip|at the bottom of Wiki Monkey's interface you will always find a log area, on dark background, where Wiki Monkey and its plugins will output their messages.}}
+
Discover the features of Wiki Monkey by following this tour. See [https://github.com/kynikos/wiki-monkey/wiki/Usage Usage] and [https://github.com/kynikos/wiki-monkey/wiki/Bundled-plugins Bundled plugins] for more detailed information.
  
===Editor pages===
+
{{Tip|At the bottom of Wiki Monkey's interface you will always find a log area, on dark background, where Wiki Monkey and its plugins will output their messages.}}
  
If you have installed the ''ArchWiki-Editor'', ''ArchWiki-Patrol'' or ''ArchWiki-Bot'' configuration, in every ''editor'' page (e.g. [https://wiki.archlinux.org/index.php?title=ArchWiki:Sandbox&action=submit ArchWiki:Sandbox's]) you will find Wiki Monkey's interface right below the ''Save page'' button row. As you can see there are some buttons, each of which will execute a plugin action:
+
=== Editor pages ===
  
* ''Fix header'' reorders the elements in the header, warns about possible problems (e.g. lack of category) and tries to fix some.
+
In every ''editor'' page (e.g. [https://wiki.archlinux.org/index.php?title=ArchWiki:Sandbox&action=submit ArchWiki:Sandbox's]) you will find Wiki Monkey's interface right below the ''Save page'' button row. As you can see there are some buttons, each of which either represents a plugin or a group of plugins accessible in a submenu; clicking on the labeled buttons will execute the associated plugin or the whole group of plugins sequentially; clicking on the ">" button next to a submenu button will open the submenu; clicking on the "*" button in the root menu will execute all the plugins; clicking on the "<" button in a submenu will return to the parent menu.
* ''Fix headings'' tries to fix the levels of section headings so that they start from level 2 and do not increase by more than 1 level with relation to the parent section.
+
 
* ''Fix external links'' tries to turn external links into proper internal/interwiki links (e.g. Wikipedia), or templates (e.g. [[Template:Pkg]]).
+
By executing a plugin, the text in the editor will be modified, but note that the page will not be saved, so you will still be able to see the diff or the preview and perform other modifications manually.
* ''Fix section links'' checks links to sections ({{ic|<nowiki>[[#Section]]</nowiki>}}) and tries to fix them if broken.
+
 
* ''Use code templates'' replaces {{ic|&lt;pre>}}, {{ic|&lt;code>}} and {{ic|&lt;tt>}} with [[Template:bc]] and [[Template:ic]], taking care of adding numbered parameters or {{ic|&lt;nowiki>}} tags when necessary.
+
* ''Text plugins'' groups all plugins that act immediately on the source text.
* ''Expand contractions'' expands some common English contractions, e.g. "don't" becomes "do not".
+
** ''Fix header'' reorders the elements in the header, warns about possible problems (e.g. lack of category) and tries to fix some.
* ''Squash multiple line breaks'' compresses multiple empty lines into one.
+
** ''Fix headings'' tries to fix the levels of section headings so that they start from level 2 and do not increase by more than 1 level with relation to the parent section.
 +
** ''Fix external links'' tries to turn external links into proper internal/interwiki links (e.g. Wikipedia), or templates (e.g. [[Template:Pkg]]).
 +
** ''Fix section links'' checks links to sections ({{ic|<nowiki>[[#Section]]</nowiki>}}) and tries to fix them if broken.
 +
** ''Use code templates'' replaces {{ic|&lt;pre>}}, {{ic|&lt;code>}} and {{ic|&lt;tt>}} with [[Template:bc]] and [[Template:ic]], taking care of adding numbered parameters or {{ic|&lt;nowiki>}} tags when necessary.
 +
** ''Expand contractions'' expands some common English contractions, e.g. "don't" becomes "do not".
 +
** ''Squash multiple line breaks'' compresses multiple empty lines into one.
 +
** ''Convert summary to related'' starts the conversion discussed in [[Help talk:Style/Article summary templates#Deprecation of summaries and overviews]]; the user will have to finish it manually.
 
* ''RegExp substitution'' lets you perform a regular expression substitution.
 
* ''RegExp substitution'' lets you perform a regular expression substitution.
* ''Sync interlanguage links'' synchronizes the interlanguage links of the edited page with those of its translations (the Chromium-native, Opera and standalone configurations can only synchronize local languages).
+
* ''Query plugins'' groups all the plugins that need to query external pages in order to obtain the information needed to update the page.
* ''Fix old AUR links'' converts direct AUR-1.x package links to instances of [[Template:AUR]] (or [[Template:Pkg]] if the package has been moved to the official repositories) (available only for the Scriptish/Greasemonkey/Tampermonkey configurations).
+
** ''Fix external section links'' checks links to sections of other articles ({{ic|<nowiki>[[Article#Section]]</nowiki>}}) and tries to fix them if broken; it also supports [[Template:Related]] and [[Template:Related2]].
* ''Update package templates'' checks the existence of the packages and groups linked through [[Template:Pkg]], [[Template:AUR]] and [[Template:Grp]] and tries to update any broken template (available only for the Scriptish/Greasemonkey/Tampermonkey configurations).
+
** ''Sync interlanguage links'' synchronizes the interlanguage links of the edited page with those of its translations.
 +
** ''Fix old AUR links'' converts direct AUR-1.x package links to instances of [[Template:AUR]] (or [[Template:Pkg]] if the package has been moved to the official repositories).
 +
** ''Update package templates'' checks the existence of the packages and groups linked through [[Template:Pkg]], [[Template:AUR]] and [[Template:Grp]] and tries to update any broken template.
 +
 
 +
In addition to these plugins, Wiki Monkey also suppresses the default browser behavior of saving a page when — usually accidentally — pressing {{ic|Enter}} in the Summary field of an editor page; this functionality can however be re-enabled in Wiki Monkey's configuration.
 +
 
 +
=== Diff pages ===
  
By pressing one of them, the text in the editor will be modified, but note that the page will not be saved, so you will still be able to see the diff or the preview and perform other modifications manually. The ''Execute row'' and ''Execute all'' buttons are used to execute more plugins one after the other, thus saving some clicks.
+
In every ''diff'' page (e.g. [https://wiki.archlinux.org/index.php?title=ArchWiki:Sandbox&diff=262475&oldid=261738 one from ArchWiki:Sandbox's history]) you will find Wiki Monkey's interface right below the two diff panes. Here the only bundled plugin is ''Quick report'', which adds a row with a link to the visited diff in the specialized table of [[ArchWiki:Reports]]. See also [[ArchWiki:Maintenance Team]].
  
===Diff pages===
+
=== Page lists (Bot) ===
  
If you have installed the ''ArchWiki-Patrol-Lite'', ''ArchWiki-Patrol'' or ''ArchWiki-Bot'' configuration, in every ''diff'' page (e.g. [https://wiki.archlinux.org/index.php?title=ArchWiki:Sandbox&diff=262475&oldid=261738 one from ArchWiki:Sandbox's history]) you will find Wiki Monkey's interface right below the two diff panes. Here the only bundled plugin is ''Quick report'', which adds a row with a link to the visited diff in the specialized table of [[ArchWiki:Reports]]. See also [[ArchWiki:Maintenance Team]].
+
You will find Wiki Monkey's Bot interface in many pages that show lists of pages (e.g. [[Special:Categories|Category pages]], [[Special:WhatLinksHere|What Links Here pages]] and many [[Special:SpecialPages|Special pages]]; see [[:Category:Sandbox]] for a specific example). The usage of the Bot interface is explained in [https://github.com/kynikos/wiki-monkey/wiki/Usage#bot-interface the upstream documentation]. The actions that can be executed by the bot are:
  
===Page lists (Bot)===
+
* Substituting text through regular expressions.
 +
* Checking and trying to fix any broken links (including [[Template:Related]] and [[Template:Related2]]) to specific sections of a target article, which can be specified through a text field and in [[Special:WhatLinksHere|What Links Here pages]] defaults to the linked page.
 +
* Synchronizing the interlanguage links of pages with those of their translations.
 +
* Checking the existence of the packages and groups linked through [[Template:Pkg]], [[Template:AUR]] and [[Template:Grp]] and trying to update any broken templates.
 +
* Converting direct AUR-1.x package links to instances of [[Template:AUR]] (or [[Template:Pkg]] if the package has been moved to the official repositories) (the Bot is shown only if there is at least one item in the list).
  
If you have installed the ''ArchWiki-Bot'' configuration you will find Wiki Monkey's Bot interface in many pages that show lists of pages (e.g. [[Special:Categories|Category pages]], [[Special:WhatLinksHere|What Links Here pages]] and many [[Special:SpecialPages|Special pages]]; see [[:Category:Sandbox]] for a specific example). The usage of the Bot interface is explained in [https://github.com/kynikos/wiki-monkey/wiki/Bot-interface the upstream documentation].
+
{{Note|The Bot interface is hidden by default, you will have to show it by clicking on the dedicated link.}}
  
{{Note|the Bot interface is hidden by default, you will have to show it by clicking on the dedicated link.}}
+
=== Special functions ===
  
The available plugins for the Bot are a regular expression substitution function and a tool for synchronizing the interlanguage links of the pages with those of their translations (the Chromium-native, Opera and standalone configurations can only synchronize local languages).
+
You will also find Wiki Monkey's interface at the top of [[Special:SpecialPages]]: here you will be able to access those plugins that have a generic purpose and are not based on a specific page. The available plugins are a function to update [[Table of contents]] pages, and a function to fix [[Special:DoubleRedirects|double redirects]].
  
[[Special:WhatLinksHere]] also provides a plugin that checks and tries to fix any broken links to specific sections of the target article; it also provides  a plugin that checks the existence of the packages and groups linked through [[Template:Pkg]], [[Template:AUR]] and [[Template:Grp]] and tries to update any broken template (available only for the Scriptish/Greasemonkey/Tampermonkey configurations).
+
=== Recent Changes and New Pages ===
  
[[Special:LinkSearch]] also provides a plugin for converting direct AUR-1.x package links to instances of [[Template:AUR]] (or [[Template:Pkg]] if the package has been moved to the official repositories) (the Bot is shown only if there is at least one item in the list; available only for the Scriptish/Greasemonkey/Tampermonkey configurations).
+
At the top of [[Special:RecentChanges]] and [[Special:NewPages]] you will find Wiki Monkey's filter: currently the bundled filter only groups the list entries by the language of the respective article.
  
===Special functions===
+
{{Note|The default filter is designed to work on top of MediaWiki's Recent Changes filter, which can be enabled in [[Special:Preferences#mw-prefsection-rc]]. This also means that you must be logged on in order to use it.}}
  
If you have installed the ''ArchWiki-Bot'' configuration you will also find Wiki Monkey's interface at the top of [[Special:SpecialPages]]: here you will find those plugins that have a generic purpose and are not based on a specific page. The available plugins are a function to update [[Table of Contents]] pages, and a function to fix [[Special:DoubleRedirects|double redirects]].
+
Also, ''rollback'' links are hidden by default in [[Special:RecentChanges]] pages; they can be reenabled in the configuration.
  
===Recent Changes===
+
=== Contributions ===
  
If you have installed the ''ArchWiki-Patrol-Lite'', ''ArchWiki-Patrol'' or ''ArchWiki-Bot'' configuration, at the top of [[Special:RecentChanges]] you will find Wiki Monkey's Recent Changes filter. Currently the bundled filter only groups the changes by the language of the affected article.
+
''Rollback'' links are hidden by default in [[Special:Contributions]] pages; they can be reenabled in the configuration.
  
{{Note|the default filter is designed to work on top of MediaWiki's Recent Changes filter, which can be enabled in [[Special:Preferences#mw-prefsection-rc]]. This also means that you must be logged on in order to use it.}}
+
== See also ==
  
==See also==
+
* [https://github.com/kynikos/wiki-monkey/wiki/Configuration Configuration]
 +
* [https://github.com/kynikos/wiki-monkey/wiki/Changelog Changelog]
 
* [https://github.com/kynikos/wiki-monkey/wiki/Troubleshooting Troubleshooting]
 
* [https://github.com/kynikos/wiki-monkey/wiki/Troubleshooting Troubleshooting]
 
* [https://github.com/kynikos/wiki-monkey/issues Bug reports, feature requests, questions]
 
* [https://github.com/kynikos/wiki-monkey/issues Bug reports, feature requests, questions]

Latest revision as of 13:56, 11 January 2016

Wiki Monkey is a MediaWiki-compatible bot and editor assistant that can be used directly within wiki pages in the browser as a user script. Currently it is tested on Firefox, Chromium and Opera, but it is very likely to work also on other browsers out of the box or with minor adaptations. Wiki Monkey can also be easily extended through the creation of plugins, exploiting its API.

The project is currently focused on ArchWiki, and as such most plugins address ArchWiki-specific problems.

Installation

Start by installing a user script engine for your browser:

Now just click on the following link and your browser should ask you to install the ArchWiki version of Wiki Monkey: install.

Follow Getting started for more information.

Tour of the features

Discover the features of Wiki Monkey by following this tour. See Usage and Bundled plugins for more detailed information.

Tip: At the bottom of Wiki Monkey's interface you will always find a log area, on dark background, where Wiki Monkey and its plugins will output their messages.

Editor pages

In every editor page (e.g. ArchWiki:Sandbox's) you will find Wiki Monkey's interface right below the Save page button row. As you can see there are some buttons, each of which either represents a plugin or a group of plugins accessible in a submenu; clicking on the labeled buttons will execute the associated plugin or the whole group of plugins sequentially; clicking on the ">" button next to a submenu button will open the submenu; clicking on the "*" button in the root menu will execute all the plugins; clicking on the "<" button in a submenu will return to the parent menu.

By executing a plugin, the text in the editor will be modified, but note that the page will not be saved, so you will still be able to see the diff or the preview and perform other modifications manually.

  • Text plugins groups all plugins that act immediately on the source text.
    • Fix header reorders the elements in the header, warns about possible problems (e.g. lack of category) and tries to fix some.
    • Fix headings tries to fix the levels of section headings so that they start from level 2 and do not increase by more than 1 level with relation to the parent section.
    • Fix external links tries to turn external links into proper internal/interwiki links (e.g. Wikipedia), or templates (e.g. Template:Pkg).
    • Fix section links checks links to sections ([[#Section]]) and tries to fix them if broken.
    • Use code templates replaces <pre>, <code> and <tt> with Template:bc and Template:ic, taking care of adding numbered parameters or <nowiki> tags when necessary.
    • Expand contractions expands some common English contractions, e.g. "don't" becomes "do not".
    • Squash multiple line breaks compresses multiple empty lines into one.
    • Convert summary to related starts the conversion discussed in Help talk:Style/Article summary templates#Deprecation of summaries and overviews; the user will have to finish it manually.
  • RegExp substitution lets you perform a regular expression substitution.
  • Query plugins groups all the plugins that need to query external pages in order to obtain the information needed to update the page.
    • Fix external section links checks links to sections of other articles ([[Article#Section]]) and tries to fix them if broken; it also supports Template:Related and Template:Related2.
    • Sync interlanguage links synchronizes the interlanguage links of the edited page with those of its translations.
    • Fix old AUR links converts direct AUR-1.x package links to instances of Template:AUR (or Template:Pkg if the package has been moved to the official repositories).
    • Update package templates checks the existence of the packages and groups linked through Template:Pkg, Template:AUR and Template:Grp and tries to update any broken template.

In addition to these plugins, Wiki Monkey also suppresses the default browser behavior of saving a page when — usually accidentally — pressing Enter in the Summary field of an editor page; this functionality can however be re-enabled in Wiki Monkey's configuration.

Diff pages

In every diff page (e.g. one from ArchWiki:Sandbox's history) you will find Wiki Monkey's interface right below the two diff panes. Here the only bundled plugin is Quick report, which adds a row with a link to the visited diff in the specialized table of ArchWiki:Reports. See also ArchWiki:Maintenance Team.

Page lists (Bot)

You will find Wiki Monkey's Bot interface in many pages that show lists of pages (e.g. Category pages, What Links Here pages and many Special pages; see Category:Sandbox for a specific example). The usage of the Bot interface is explained in the upstream documentation. The actions that can be executed by the bot are:

  • Substituting text through regular expressions.
  • Checking and trying to fix any broken links (including Template:Related and Template:Related2) to specific sections of a target article, which can be specified through a text field and in What Links Here pages defaults to the linked page.
  • Synchronizing the interlanguage links of pages with those of their translations.
  • Checking the existence of the packages and groups linked through Template:Pkg, Template:AUR and Template:Grp and trying to update any broken templates.
  • Converting direct AUR-1.x package links to instances of Template:AUR (or Template:Pkg if the package has been moved to the official repositories) (the Bot is shown only if there is at least one item in the list).
Note: The Bot interface is hidden by default, you will have to show it by clicking on the dedicated link.

Special functions

You will also find Wiki Monkey's interface at the top of Special:SpecialPages: here you will be able to access those plugins that have a generic purpose and are not based on a specific page. The available plugins are a function to update Table of contents pages, and a function to fix double redirects.

Recent Changes and New Pages

At the top of Special:RecentChanges and Special:NewPages you will find Wiki Monkey's filter: currently the bundled filter only groups the list entries by the language of the respective article.

Note: The default filter is designed to work on top of MediaWiki's Recent Changes filter, which can be enabled in Special:Preferences#mw-prefsection-rc. This also means that you must be logged on in order to use it.

Also, rollback links are hidden by default in Special:RecentChanges pages; they can be reenabled in the configuration.

Contributions

Rollback links are hidden by default in Special:Contributions pages; they can be reenabled in the configuration.

See also