Skip to content

Commit

Permalink
Less output in --help
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Feb 4, 2024
1 parent ea503d7 commit 0fb90cf
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 491 deletions.
272 changes: 61 additions & 211 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,65 @@ The output of the code example is very long, so here is a shortened version:
... edit the meta data of a score file?
---------------------------------------

metatag
^^^^^^^

XML structure of a meta tag:

.. code-block:: xml
<metaTag name="tag"></metaTag>
All meta tags:

- arranger
- audioComUrl (new in v4)
- composer
- copyright
- creationDate
- lyricist
- movementNumber
- movementTitle
- mscVersion
- platform
- poet (not in v4)
- source
- sourceRevisionId
- subtitle
- translator
- workNumber
- workTitle

vbox
^^^^

XML structure of a vbox tag:

.. code-block:: xml
<VBox>
<Text>
<style>Title</style>
<text>Some title text</text>
</Text>
All vbox tags:

- title (v2,3: Title)
- subtitle (v2,3: Subtitle)
- composer (v2,3: Composer)
- lyricist (v2,3: Lyricist)

This command line tool bundles some meta data informations:

Combined meta data fields:
^^^^^^^^^^^^^^^^^^^^^^^^^^

- title (1. vbox_title 2. metatag_work_title)
- subtitle (1. vbox_subtitle 2. metatag_movement_title)
- composer (1. vbox_composer 2. metatag_composer)
- lyricist (1. vbox_lyricist 2. metatag_lyricist)

Set the meta tag ``composer``:

.. code-block:: xml
Expand Down Expand Up @@ -413,59 +472,7 @@ CLI Usage
file (*.mscz).

meta:
Deal with meta data informations stored in the MuseScore file. MuseScore can store meta data informations in different places:

# metatag

## XML structure of a meta tag:

<metaTag name="tag"></metaTag>

## All meta tags:

- arranger
- audioComUrl (new in v4
- composer
- copyright
- creationDate
- lyricist
- movementNumber
- movementTitle
- mscVersion
- platform
- poet (not in v4)
- source
- sourceRevisionId
- subtitle
- translator
- workNumber
- workTitle

# vbox

## XML structure of a vbox tag:

<VBox>
<Text>
<style>Title</style>
<text>Some title text</text>
</Text>

## All vbox tags:

- title (v2,3: Title)
- subtitle (v2,3: Subtitle)
- composer (v2,3: Composer)
- lyricist (v2,3: Lyricist)

This command line tool bundles some meta data informations:

# Combined meta data fields:

- title (1. vbox_title 2. metatag_work_title)
- subtitle (1. vbox_subtitle 2. metatag_movement_title)
- composer (1. vbox_composer 2. metatag_composer)
- lyricist (1. vbox_lyricist 2. metatag_lyricist)
Deal with meta data informations stored in the MuseScore file.

-c META_CLEAN, --clean-meta META_CLEAN
Clean the meta data fields. Possible values: „all“ or a
Expand Down Expand Up @@ -533,164 +540,7 @@ CLI Usage
correct hyphenation ("la - la - la")

rename:
Rename the “*.msc[zx]” files. Fields and functions you can use in the path template string (-r, --rename):
Functions
=========

alpha
-----

%alpha{text}
This function first ASCIIfies the given text, then all non alphabet
characters are replaced with whitespaces.

alphanum
--------

%alphanum{text}
This function first ASCIIfies the given text, then all non alpanumeric
characters are replaced with whitespaces.

asciify
-------

%asciify{text}
Translate non-ASCII characters to their ASCII equivalents. For
example, “café” becomes “cafe”. Uses the mapping provided by the
unidecode module.

delchars
--------

%delchars{text,chars}
Delete every single character of “chars“ in “text”.

deldupchars
-----------

%deldupchars{text,chars}
Search for duplicate characters and replace with only one occurrance
of this characters.

first
-----

%first{text} or %first{text,count,skip} or
%first{text,count,skip,sep,join}
Returns the first item, separated by ; . You can use
%first{text,count,skip}, where count is the number of items (default
1) and skip is number to skip (default 0). You can also use
%first{text,count,skip,sep,join} where sep is the separator, like ; or
/ and join is the text to concatenate the items.

if
--

%if{condition,truetext} or %if{condition,truetext,falsetext}
If condition is nonempty (or nonzero, if it’s a number), then returns
the second argument. Otherwise, returns the third argument if
specified (or nothing if falsetext is left off).

ifdef
-----

%ifdef{field}, %ifdef{field,text} or %ifdef{field,text,falsetext}
If field exists, then return truetext or field (default). Otherwise,
returns falsetext. The field should be entered without $.

ifdefempty
----------

%ifdefempty{field,text} or %ifdefempty{field,text,falsetext}
If field exists and is empty, then return truetext. Otherwise, returns
falsetext. The field should be entered without $.

ifdefnotempty
-------------

%ifdefnotempty{field,text} or %ifdefnotempty{field,text,falsetext}
If field is not empty, then return truetext. Otherwise, returns
falsetext. The field should be entered without $.

initial
-------

%initial{text}
Get the first character of a text in lowercase. The text is converted
to ASCII. All non word characters are erased.

left
----

%left{text,n}
Return the first “n” characters of “text”.

lower
-----

%lower{text}
Convert “text” to lowercase.

nowhitespace
------------

%nowhitespace{text,replace}
Replace all whitespace characters with replace. By default: a dash (-)
%nowhitespace{$track,_}

num
---

%num{number,count}
Pad decimal number with leading zeros.
%num{$track,3}

replchars
---------

%replchars{text,chars,replace}
Replace the characters “chars” in “text” with “replace”.
%replchars{text,ex,-} > t--t

right
-----

%right{text,n}
Return the last “n” characters of “text”.

sanitize
--------

%sanitize{text}
Delete in most file systems not allowed characters.

shorten
-------

%shorten{text} or %shorten{text,max_size}
Shorten “text” on word boundarys.
%shorten{$title,32}

time
----

%time{date_time,format,curformat}
Return the date and time in any format accepted by strftime. For
example, to get the year some music was added to your library, use
%time{$added,%Y}.

title
-----

%title{text}
Convert “text” to Title Case.

upper
-----

%upper{text}
Convert “text” to UPPERCASE.
Rename the “*.msc[zx]” files.
--rename <path-template>
A path template string to set the destination location.
Expand Down
59 changes: 59 additions & 0 deletions README_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,65 @@ The output of the code example is very long, so here is a shortened version:
... edit the meta data of a score file?
---------------------------------------

metatag
^^^^^^^

XML structure of a meta tag:

.. code-block:: xml
<metaTag name="tag"></metaTag>
All meta tags:

- arranger
- audioComUrl (new in v4)
- composer
- copyright
- creationDate
- lyricist
- movementNumber
- movementTitle
- mscVersion
- platform
- poet (not in v4)
- source
- sourceRevisionId
- subtitle
- translator
- workNumber
- workTitle

vbox
^^^^

XML structure of a vbox tag:

.. code-block:: xml
<VBox>
<Text>
<style>Title</style>
<text>Some title text</text>
</Text>
All vbox tags:

- title (v2,3: Title)
- subtitle (v2,3: Subtitle)
- composer (v2,3: Composer)
- lyricist (v2,3: Lyricist)

This command line tool bundles some meta data informations:

Combined meta data fields:
^^^^^^^^^^^^^^^^^^^^^^^^^^

- title (1. vbox_title 2. metatag_work_title)
- subtitle (1. vbox_subtitle 2. metatag_movement_title)
- composer (1. vbox_composer 2. metatag_composer)
- lyricist (1. vbox_lyricist 2. metatag_lyricist)

Set the meta tag ``composer``:

.. code-block:: xml
Expand Down
Loading

0 comments on commit 0fb90cf

Please sign in to comment.