示例#1
0
This script outputs a report that shows the object breakdown when using 
the NWC2Clip and NWC2ClipItem objects to process NWC2 clip text. It uses
a special return code to signal NWC2 to display the results in STDOUT.

Copyright © 2006 by NoteWorthy Software, Inc.
All Rights Reserved

HISTORY:
================================================================================
[2010-02-27] Version 1.50: Add Fake item conversion for cleaner object report
[2006-05-12] Version 1.01: Code format cleanup
[2004-10-28] Version 1.00: Initial release
*******************************************************************************/
require_once "lib/nwc2clips.inc";
$clip = new NWC2Clip('php://stdin');
$gzf = gzopen('php://stdout', 'w');
gzwrite($gzf, "A text representation of the NWC2ClipItem object for each " . "clip line is shown below. This was generated using " . "NWC2Clip Version " . NWC2ClipLibVersion() . ".\n\n");
foreach ($clip->Items as $item) {
    $o = new NWC2ClipItem($item, true);
    gzwrite($gzf, preg_replace('/[\\r\\n]+/', "\n", print_r($o, true)) . "\n");
    unset($o);
}
gzclose($gzf);
$usermsg = <<<__EOMSG
See the standard output file for a text representation of the notation 
clip after processing into the NWC2Clip and NWC2ClipItem objects.
__EOMSG;
//
fputs(STDERR, $usermsg);
exit(NWC2RC_REPORT);
示例#2
0
	[X] Compress Input

Also Supports:
	[X] Clip Text

Optional command line arguments:
"/skip=<PROMPT:Skip:=*xXzy>"
	Defines the existing note heads that should be ignored during shape assignment


Copyright © 2010 by NoteWorthy Software, Inc.
All Rights Reserved

*******************************************************************************/
require_once "lib/nwc2clips.inc";
if (NWC2ClipLibVersion() < "2.491") {
    trigger_error("This tool requires the latest release of the starter kit library.", E_USER_ERROR);
}
$SHAPE_MODE = "7-shape";
$NOTEHEAD_IGNORE_LIST = "xXzy";
//
foreach ($argv as $k => $v) {
    if (preg_match('/^\\/mode\\=(.*)$/i', $v, $m)) {
        $SHAPE_MODE = $m[1];
    }
    if (preg_match('/^\\/skip\\=(.*)$/i', $v, $m)) {
        $NOTEHEAD_IGNORE_LIST = $m[1];
    }
}
$AllShapeNotes = array("4-shape" => "dfgdfgc", "7-shape" => "abcdfgh");
$ObjectsWithNotes = array('Note', 'Chord', 'RestChord');
示例#3
0
nwsw_About.php Version 1.5

This script shows the version of the Starter Kit that is installed. 
This is useful when checking for possible updates.

Copyright � 2009 by NoteWorthy Software, Inc.
All Rights Reserved

HISTORY:
================================================================================
[2009-10-02] Version 1.5: Added PHP version and phpinfo
[2006-05-12] Version 1.01: Code format cleanup
[2005-09-12] Version 1.00: Initial release
*******************************************************************************/
require_once "lib/nwc2clips.inc";
$libver = NWC2ClipLibVersion();
$phpver = phpversion();
$usermsg = <<<__EOMSG
Clip Library Version: {$libver}
PHP Version: {$phpver}

NWC2 User Tool Starter Kit is a free software package that includes a set of PHP scripts for use with the User Tool command in NoteWorthy Composer 2. Additional details about the starter kit can be found at our web site:

http://noteworthysoftware.com

You are currently using version {$libver} of the NWC2 User Tool Starter Kit.

__EOMSG;
//
fputs(STDOUT, $usermsg);
phpinfo();