Extension:ABCjs

ABCjs

Release status: beta

Implementation Page action, Edit page
Description provide support for rendering abc music notation on mediawiki pages
using the abcjs javascipt package, and for setting tune related categories
when editing pages.
Author(s) Lawrie Brown
Latest Version 0.6
License CC By NC SA
MediaWiki tested on 1.26+
Download http://bushtraditions.wiki/tunes/extensions/ABCjs.zip

The ABCjs extension provides support for rendering abc music notation on mediawiki pages using Paul Rosen and Gregory Dyke's abcjs javascipt package, and for setting tune related categories when editing pages.

This extension is likely used along with the abcExport extension that supports exporting content from pages containing abc music notation as an abc notation file or as a pdf of the rendered score.

Contents

Installation


Installation of ABCjs requires installing the extension code and the supporting abcjs javascipt package into your wiki.

Configuration


You can then redefine any of the following globals after the require_once statement in your LocalSettings.php:

$wgABCjs_plugin
name of abcjs plugin file (in this extension dir) to use
$wgABCjs_abcTag
string marking usage of abc notation in wiki page
$wgABCjs_abcTagEnd
string marking end of abc notation in wiki page
$wgABCjs_abcCat
Category tag used to indicate abc notation used on page after which additional key, meter & rhythm category tags are added
$wgABCjs_abcHide
Namespace where abc notation hidden, just score shows
$wgABCjs_abcMax
max count of abc tunes to render when notation hidden
$wgABCjs_debug
set true for debug diagnostic display when running
$wgABCjs_UserDebug
set true for abcjs debug diagnostic on User pages

See ABCjs/ABCjs.php in your extensions/ folder for the default values of these variables.

Usage


Once installed, the extension operates automatically whenever pages are displayed or edited.

More specifically, the inclusion of the abcjs_plugin used to render abc music notation on the page as a score occurs when any page, other than '''Special''' pages, is displayed.

The edit checks occur whenever pages in the (Main) and User namespaces are edited, which is where tune content that should be rendered is assumed to be located. These scan for any abc notation content surrounded by $wgABCjs_abcTag (<pre id=abc>) and $wgABCjs_abcTagEnd (</pre>) tags on pages in category $wgABCjs_abcCat (Tune). It locates any key, meter and rhythm abc tags, and generates suitable mediawiki category tags for each of these, placing them after the existing $wgABCjs_abcCat category tag.

See also


Acknowledgements

Copyright © 2017 Lawrie Brown