jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/370305 )
Change subject: Update documentation
..
Update documentation
Rendered the installation guide up-to-date and matched the
documentation of the tag attributes to the code. Made other (than
`raw`) boolean attributes consistant with `raw`.
Bug: T113046
Change-Id: Ie4818d6a9edc18c1cefdbcbff217ed0721130f1c
---
M README
M Score.body.php
2 files changed, 20 insertions(+), 33 deletions(-)
Approvals:
jenkins-bot: Verified
Nikerabbit: Looks good to me, approved
diff --git a/README b/README
index bece82e..a9b2a4d 100644
--- a/README
+++ b/README
@@ -9,30 +9,28 @@
The extension is also capable of creating Ogg/Vorbis files from the MIDI files
generated by LilyPond. If you want to make use of this functionality, you need
-to have the OggHandler extension installed, see
+to have the TimedMediaHandler extension installed, see
-https://www.mediawiki.org/wiki/Extension:OggHandler
+https://www.mediawiki.org/wiki/Extension:TimedMediaHandler
for more information.
-This extension was tested with LilyPond 2.12.3.
+This extension was tested with LilyPond 2.12.3 through 2.18.2.
Setup
=
1. Change to the "extensions" directory of your MediaWiki installation.
-2. Create a new subdirectory named "Score".
-3. Copy the files Score.php, Score.body.php and Score.i18n.php into the new
- subdirectory. Make sure they are readable by your webserver.
-4. Create a subdirectory named "lilypond" in your $wgUploadDirectory (usually
+2. Clone this repository.
+3. Create a subdirectory named "lilypond" in your $wgUploadDirectory (usually
the directory named "images" in in your MediaWiki directory). Make sure
the directory is writable by your webserver. If you do not create this
directory, the Score extension will attempt to create it for you with the
rights available to it.
-5. Add the lines
+4. Add the lines
- require_once("$IP/extensions/Score/Score.php");
+ wfLoadExtension( 'score' );
$wgScoreLilyPond = '/path/to/your/lilypond/executable'; /* required */
$wgScoreAbc2Ly = '/path/to/your/abc2ly/executable'; /* if you want ABC to
LilyPond conversion
*/
@@ -79,9 +77,8 @@
.
* Attribute: midi
- Allowed values: 0 (default), 1
- Effect: If set to 1, the rendered image(s) will be embedded into a hyperlink
- to an appropriate MIDI file.
+ Effect: If included in the tag, the rendered image(s) will be embedded into a
+ hyperlink to an appropriate MIDI file.
* Attribute: override_ogg
Allowed values: Known file name, that is, if override_ogg="name" is given,
@@ -95,16 +92,13 @@
page, if you prefer.
* Attribute: raw
- Allowed valued: 0 (default), 1
- Effect: If set to 1, the score code is interpreted as a complete LilyPond
- file. Use this option if you want to create more complex scores.
- If the score language (lang attribute) is not set to lilypond, this
- attribute is ignored.
+ Effect: If included in the tag, the score code is interpreted as a complete
+ LilyPond file. Use this option if you want to create more complex
+ scores. If the score language (lang attribute) is not set to
+ lilypond, this attribute is ignored.
* Attribute: vorbis
- Allowed values: 0 (default), 1
- Effect: If set to 1, an Ogg/Vorbis file will be generated for the score,
- provided you installed and configured the OggHandler extension.
- An Ogg/Vorbis player will be embedded in the HTML below the score
- image(s).
-
+ Effect: If included in the tag, an Ogg/Vorbis file will be generated for the
+ score, provided you installed and configured the OggHandler
+ extension. An Ogg/Vorbis player will be embedded in the HTML below
+ the score image(s).
diff --git a/Score.body.php b/Score.body.php
index 0a6517f..ea1cd3e 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -236,11 +236,7 @@
$options['raw'] = array_key_exists( 'raw', $args );
/* Midi linking? */
- if ( array_key_exists( 'midi', $args ) ) {
- $options['link_midi'] = $args['midi'];
- } else {
- $options['link_midi'] = false;
- }
+ $options['link_midi'] = array_key_exists( 'midi', $args
);
/* Override OGG file? */
if ( array_key_exists( 'override_ogg', $args ) ) {
@@ -260,11 +256,8 @@
}
/* Vorbis rendering? */
- if ( array_key_exists( 'vorbis', $args ) ) {
- $options['generate_ogg'] = $args['vorbis'];
- } el