Wikisource:Tools and scripts

From Wikisource
Jump to: navigation, search
Shortcut:
WS:TOOLS
WS:SCRIPTS

This page contain various tools, scripts, and tutorials intended to simplify, make more efficient, or provide additional functionality to Wikisourcers.

If you're having trouble with anything on this page, make sure you've copied the code exactly as it is on this page, and you followed the instructions carefully. Try refreshing your browser to reset the cache. Try starting over from step 1, in case you made an accidental change. If this fails, feel free to ask for help on the talk page.

Notes before using this page[edit]

Javascript[edit]

File formatting[edit]

The instructions on this page depend on Javascript pages and may not be formatted using <pre> or <nowiki> tags. These break the installation templates and prevent categorisation for opt-in automated updating. The best way to ensure correct formatting is to add at least one space at the start of every line (" //" for blank lines), which is the correct wikisyntax method for plaintext formatting.

Updating scripts[edit]

Many of the scripts on this page are being actively developed. This occasionally requires that users replace scripts they're using with updated versions, which can be tedious and irregular. Users can ignore these updates, but they will not benefit from recent bugfixes or new features. Additionally, many scripts depending on external code will cease to work if they are very outdated.

Automated updates
There is a bot which will automatically update scripts in users' script files as necessary. This keeps all users at the cutting-edge versions and ensures that latest bugfixes and features are implemented immediately. This is an opt-in service, and some users may wish to update manually if they extensively customise the scripts they use.

To subscribe, add the code below at the very top of the javascript file you'd like to update. A bot will periodically scan pages in this category for outdated scripts, and update them as necessary. All scripts listed on this page will be updated as necessary as long as they are copied and pasted as shown on this page.

You can subscribe to automated updates, but disable updates for one script in particular. To do so, change the update field in the script template to anything except "yes".

/* </pre>[[Category:Bots/Script files to update]] */

Scripts[edit]

These are typically added to [[User:USERNAME/monobook.js]]; for detailed help, see User styles on the Meta-Wiki.

InstaView[edit]

Update: last update February 14, 2006.

Author: Pilaf (Wikipedia)
Contributor: Pathoschild (ported to Wikisource)

Caution: This is an experimental script. It is not recommended for users unfamiliar with wikis.

InstaView is an extension to Wikipedia's edit page which allows you to generate instant previews of the page you're editing. Unlike the normal preview mode, you don't need to refresh the page; except for very large pages, there is no delay whatsoever. However, the script does not recognize templates or signatures.

  1. Copy and paste the code below into your javascript file.
  2. Fill in your username in the username field.
  3. See Updating scripts for details on the update field (usually doesn't need to be changed).
{{subst:Wikisource:Tools and scripts/InstaView
 |username=USERNAME
 |update=yes
}}

SoftRedirect[edit]

This script allows you to convert pages that are redirects to {{dated soft redirect}}. If no "#REDIRECT Blah" is found on the page, you will be prompted for the page that the soft redirect should point to.

Update: last update June 09, 2006.

Author: Jude

  1. Copy and paste the code into your Javascript file
{{subst:Wikisource:Tools and scripts/SoftRedirect}}

More editing buttons[edit]

This script includes more edit buttons in your editing toolbar, reducing time when writing and proofreading text.

Update: First version April 29, 2008.

Authors: Steve Sanbeg[1] (coding)
Contributor: Mtmelendez (individual buttons)

A full list of extra edit buttons is here.

Running header lookup[edit]

This script looks for a running header (i.e. an {{rh}} or {{runningHeader}}) template two pages before the current page (running headers typically repeat on a two-page basis), and fills in the current page.

It will increment an Arabic number (like "102") and Roman numerals ('CII' or 'cii'). If no number is found, the header will just be copied.

Update: First version August 22, 2010.
Authors: Phe, Inductiveload
  1. Copy and paste the code into your Javascript file
importScript('User:Inductiveload/Roman numerals.js');
importScript('User:Inductiveload/Running header.js');

Tools[edit]

Tools Labs-based
  • Intersection search tool, negative and positive searches. help
  • Direct uploading of one or more files to Commons (utilises OAuth)
  • Internet Archive upload tool (utilises OAuth)
  • Wikimedia file transfer to Commons
  • Dictionary of National Biography project tool
    Purpose:To identify pages that have been proofread with the Wikisource:WikiProject DNB and ancillary mainteance tasks.

    Usage:Click the link, no refinement available.

  • Article page history
    Purpose: Enables a deep look at the edits to a page, including when, who, size, statistics.

    Usage: Currently available as a link from the history of each page, or to paste in the name of the page of interest, eg. for this page Wikisource:Tools and scripts

  • Index: @ Page: transclusion check tool
    Purpose: Maintenance tool to check the transclusion status of the Page: namespace pages that are linked to from the overarching Index: page. Useful to find pages that may have been missed when transcluding a work to main namespace, or to identify pages that need to be managed following maintenance to the related djvu file.

    Usage: As a link from each Index: page for a work, or to paste in the name of the Index page with its namespace, eg. Index:The Dictionary of Australasian Biography.djvu.

  • Book scroll
    Purpose: Tool to scroll through a djvu file. Active links from the Index: page of works.

Text editors[edit]

Editing Wikisource may involve using a wide range of characters, some of which are not found on most English keyboards. Although it's possible to change one's keyboard language, this can be cumbersome for a few words. Many UTF-8 text editors allow the user to display a pop-up list of Unicode characters. Text strings in UTF-8 can be generated for pasting into Wikisource documents.

See also[edit]

  • w:Wikipedia:Tools has a large collection of tools, though most will not work on Wikisource without modification.