Giter Site home page Giter Site logo

kynikos / wiki-monkey Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 5.0 74.02 MB

MediaWiki-compatible bot and editor assistant running directly in the browser and expandable with plugins.

Home Page: https://github.com/kynikos/wiki-monkey/wiki

License: GNU General Public License v3.0

JavaScript 99.78% Sass 0.22%
wiki mediawiki wikipedia arch-linux-wiki archwiki bot mediawiki-bot wikipedia-bot editor-assistant user-script

wiki-monkey's Introduction

Wiki Monkey is a MediaWiki user script that provides editor-assisting and bot functionality.

License: GPLv3 (see LICENSE).

Read the Wiki in order to get started.

The optional database server is hosted in the separate wiki-monkey-server repository.

wiki-monkey's People

Contributors

dependabot[bot] avatar kynikos avatar lahwaacz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wiki-monkey's Issues

Function-specific interfaces

Write a UI_function for each UF_function in order to let each function define its own interface (provide buttons, input fields etc.).
The UI_functions should be called at page load, and the UF_functions should be called as specified by the interfaces.

Simple bot substitutions

Make it possible to do simple regexp substitutions from Category pages, WhatLinksHere pages and similar lists.

Info area

Use an area on the screen (position static, absolute or even fixed) to display messages from user functions instead of alerts (currently only UF_archWikiNewTemplates() outputs a warning).
This requires also API functions to write to the area.

Quick report button

The "Append to patrol list" button should better be renamed "Add quick report" or just "Quick report". Also consider changing the namespace and the filename

Update license

Update license description and year in every file header

Pass arguments to user functions

(not exactly related to the API, but still involves changing the core script)

The top level of main's multidimensional input array should accept an additional array to let the user pass some arguments to user functions.
For example instead of the current:

[UF_myFunction, "myFunction", false]

it should be:

[UF_myFunction8, [arg1, arg2, arg3, ...], "myFunction8", true]

If a user function doesn't accept arguments, an empty array must be used (or null?)

Note that using the second index would break backward compatibility, so all users must be warned.

ArchWikiQuickReport more flexible

Make ArchWikiQuickReport support a variable number of fields in the table.
It would be good if the interface could support also select elements.

Fix article header

Recognize elements in article headers (categories, i18n...), reorder them and add what's missing

Semi-automatic bot operations

Scriptish can keep an array of simple values across page-loads by using GM_setValue(), GM_listValues(), GM_getValue() and GM_deleteValue(). The idea is combining this feature with javascript redirections over a stored list of wiki articles to perform a series of semi-automatic edits (with preview and manual saving).
The buttons to access bot functions may be put in position:fixed in the bottom-left corner of each page.

Get user name dynamically

Get logged user name with api.php?action=query&meta=userinfo instead of writing it explicitly even if in the user.js file

Warn about common mistakes

Warn about common mistakes in the log:
"pacman -S", "yaourt", aur links, HTML comments and so on

This could be merged with #46

Common messages for talk pages

Editor: add common messages to talk pages like "please add a signature...", "please use the edit summary..." and so on.

Rename category

Rename a category, thus updating all its members to use the new name, not the redirect

Dynamically disable shortcut buttons

Dynamically disable the Execute row button when there is only one button in the row.
Dynamically disable the Execute all button when there is only one button in the page.

Expand contractions

Expand contractions like don't, you're...
Note that 's contractions must be previewed!

Set buttons in pages separately

Instead of passing an argument directly to WM.main(), create WM.setEditorUI(rows) and WM.setDiffUI(rows) and call WM.main() at the end of the main script.
This way it will be easier in the future to add buttons to other pages.

Complete wiki documentation

Complete wiki documentation:

  • ------Bot interface------ done
  • ------Custom configuration: update and expand------ done
  • ------(Plugin pages): create Configuration sections to explain the parameters------ done
  • Plugin development: update and expand

Maintain interlanguage links

Implement a user function that can keep all the interlanguage links for an article up-to-date among the various internal translations of the same article

Include modules from core

Include the modules from the core script, without the @require keys in the header of the .user.js script.

This will require JQuery unless I want to start messing with HTTP requests...

This will prevent Scriptish from caching the modules, which is probably bad...

MultipleLineBreaks removes useful line breaks

MultipleLineBreaks should be smart and avoid removing multiple line breaks in code templates.

This one is hard to fix because the function should parse the source text and understand when it's inside a template (or space-initial lines) or not.

Configurations are ArchWiki-specific

The current configurations contain ArchWiki-specific functions, and this should be reflected in their id and version number.

Note that this would break the updates for the current ids! A method for assisting the migration would be to display a warning to users still using the old name and point them to the installation link of the correct script.

Bot operations

Automatically execute functions over a series of articles taken from a list page (what links here, category...).
If the user doesn't have bot authorizations increase the interval time (edit rate)

Filter guide: each article in the list will be evaluated with each row in the text area, as regular expressions. If a line starts with "!" and the article matches, it will be excluded. For a literal "!" at the beginning of the line, escape it with "". The evaluations are made in a cascading way, so between two conflicting rules the last one prevails.

Disable other bots
Force start

Use JSON

Don't be lazy and migrate all complex arrays to JSON.

Use JSON also for MediaWiki queries?

Recent changes helper

Bot-assisted functions for patrolling the recent changes with more ease and speed

Advanced filtering (replace the enhanced recent changes?)

Test bot on Sandbox

Option in bot for testing on Sandbox

It's necessary to define the sandbox page dynamically according to the visited wiki

An alternative would be to use the bot on the category that contains the sandbox (requires enabling the bot in category pages)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.