Difference between revisions of "Score2eps"
Line 16: | Line 16: | ||
| valign="top" | [[#m_option|<tt>-m</tt> <i>filename</i>]] || Write the SCORE macro file used to print the pages, but exit before running the macro file. A filename for writing the macrofile is required for this option. | | valign="top" | [[#m_option|<tt>-m</tt> <i>filename</i>]] || Write the SCORE macro file used to print the pages, but exit before running the macro file. A filename for writing the macrofile is required for this option. | ||
|- | |- | ||
− | | valign="top" | <tt>[[#r_option|-r]]</tt> || Replace any EPS files which already | + | | valign="top" | <tt>[[#r_option|-r]]</tt> || Replace any EPS files which already exist. (see also the <tt>-s</tt> option) |
|- | |- | ||
| valign="top" | <tt>[[#s_option|-s]]</tt> || Skip any existing EPS files. By default the program will exit with an error if it finds any pre-existing EPS files which it is asked to overwrite. (see also the <tt>-r</tt> option) | | valign="top" | <tt>[[#s_option|-s]]</tt> || Skip any existing EPS files. By default the program will exit with an error if it finds any pre-existing EPS files which it is asked to overwrite. (see also the <tt>-r</tt> option) |
Revision as of 00:47, 31 December 2011
The score2eps program is a PERL script for converting SCORE binary (.MUS, .PAG), ASCII (.pmx, .txt, etc), or ScoreXML files into Encapsulated PostScript (EPS) files using SCORE version 4 for MS-DOS running with dosemu in linux. |
Options
Option Name | Description |
---|---|
-d | Run in debug mode: the SCORE editor will be displayed while the printing process is running. This is useful to identify problems in the printing process, such as interacting with warning messages in SCORE for large pages. |
-l # | Limit the maximum lines in a PMX file (does not check binary SCORE files). The default maximum is 1150 lines. If a file contains too many objects which exceeds the display vectors in the SCORE editor, a warning message will appear in the editor which cannot be handled by automated processing (but can be manually dealt with using the -d option). ASCII page files larger than this size will be skipped and a warning message printed so that large page printing can be monitored using the -d option. |
-m filename | Write the SCORE macro file used to print the pages, but exit before running the macro file. A filename for writing the macrofile is required for this option. |
-r | Replace any EPS files which already exist. (see also the -s option) |
-s | Skip any existing EPS files. By default the program will exit with an error if it finds any pre-existing EPS files which it is asked to overwrite. (see also the -r option) |
-w dir | Set the working directory if not the current working directory. |
Description
Input data
Input data files can have three forms: (1) binary SCORE data files which usually end in .mus or .pag, (2) ASCII SCORE macro files describing one page of music, and (3) ScoreXML files which end in .xml or .sxml. Any file which does not end in .mus, .pag, or .*xml* is assumed to be type (2). Data files of these three types can be interleaved in the command-line arguments for score2eps:
score2eps file1.mus file2.pmx file3.sxml file4.pmx
The result will be at least three EPS files which match the input file(s) basename with an .eps ending:
file1.eps file2.eps file4.eps
ScoreXML files can contain multiple pages. Each page output will be stored in a separate .eps file based on the filename base found in the <name> sub-element of the <fileHead> element which proceeds the SCORE data.
Standard input can be used with ScoreXML data files. If standard input is used, then any other data files given as command-line arguments will be ignored.
cat data.sxml | score2eps
Handling existing EPS files
There are three methods of handing the EPS files which already exist before score2eps processes the input files. By default the score2eps program will exit with an error if it is asked to overwrite any pre-existing EPS files. If the -r option is given, then any pre-existing EPS files will be replaced with a new EPS file. Alternatively, the -s option can be used to skip over any EPS file which already exists.
For example, suppose a file 002.eps already exists. Then the following command will generate an error and no data processing will occur:
score2eps 001.mus 002.mus 003.mus ERROR: Delete EPS file to continue: ./002.eps
To replace 002.eps with a new version created from the 002.mus file, use the -s option:
score2eps -r 001.mus 002.mus 003.mus
This command will overwrite the old 002.eps file with a newly generated one using 002.mus.
To skip over EPS files which already exist, us the -s option:
score2eps -s 001.mus 002.mus 003.mus
This command will not process 002.mus, since 002.eps already exists. The -s option is useful when continuing to print a collection of files which was interrupted for some reason.
Debug mode
The score2eps program will run in debug mode if the -d option is given:
score2eps -d file.pmx
This option will prevent the graphical display of the SCORE editor from being supressed while the EPS files are being printed. This option is useful for identifying the cause when the score2eps program gets stuck within the dosemu virtual machine and cannot exit properly. In particular this will happen if there are too many objects on a page, and the SCORE editor runs out of display vectors. In that case the SCORE editor will prompt the user with a warning message which must be acknowledged manually (but the page will still be printed in full).
For ASCII SCORE files and data read from ScoreXML files, there is a default limit of 1150 lines of data when printing with score2eps. When ASCII SCORE files or pages within ScoreXML files exceed this limit, then that file/page will be ignored and a warning message will be printed:
score2eps bigfile.pmx WARNING: file too big: skipping bigfile.pmx
The files which are skipped over can be printed later, using the -d option to monitor the printing process for display vector error messages in the SCORE editor.
The limit of 1150 lines is arbitrary: the display vector limit depends on the graphical complexity of objects on the page, not the number of objects. If you know that all pages will not cause the display vector error message to occur in the SCORE editor, you can raise the limit with the -l option:
score2eps -l 5000 *.pmx