Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mmllib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Projekt Hack-n-Fun
Libs
mmllib
Commits
5687aebd
Unverified
Commit
5687aebd
authored
3 years ago
by
mirabilos
Committed by
mirabilos
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add showmeta command
parent
51d99925
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mmllib/cmds.py
+16
-1
16 additions, 1 deletion
mmllib/cmds.py
with
16 additions
and
1 deletion
mmllib/cmds.py
+
16
−
1
View file @
5687aebd
...
@@ -26,6 +26,7 @@ __all__ = [
...
@@ -26,6 +26,7 @@ __all__ = [
"
mml2musicxml
"
,
"
mml2musicxml
"
,
"
mml2nxcmono
"
,
"
mml2nxcmono
"
,
"
mmllint
"
,
"
mmllint
"
,
"
showmeta
"
,
]
]
import
argparse
import
argparse
...
@@ -35,7 +36,7 @@ from pprint import pprint
...
@@ -35,7 +36,7 @@ from pprint import pprint
from
.musicxml
import
convert_mml_file
as
convert_mml_file_to_musicxml
from
.musicxml
import
convert_mml_file
as
convert_mml_file_to_musicxml
from
.mml
import
mml
from
.mml
import
mml
from
.nxc
import
convert_mml_track
as
convert_mml_track_to_nxc
from
.nxc
import
convert_mml_track
as
convert_mml_track_to_nxc
from
.parser
import
mml_file
from
.parser
import
mml_file
,
mml_file_meta
from
.playlist
import
convert_to_timedlist
,
timedlist_duration
,
timedlist_ntracks
from
.playlist
import
convert_to_timedlist
,
timedlist_duration
,
timedlist_ntracks
def
_filter
(
func
):
def
_filter
(
func
):
...
@@ -115,3 +116,17 @@ def mmllint():
...
@@ -115,3 +116,17 @@ def mmllint():
print
(
"
No errors.
"
)
print
(
"
No errors.
"
)
return
0
return
0
mmllint
.
_shortdesc
=
'
checks MML for some errors
'
mmllint
.
_shortdesc
=
'
checks MML for some errors
'
def
showmeta
():
"""
Entry point for displaying extended MML metadata
Returns 0 on success, >0 on error.
"""
# parse arguments
aparser
=
argparse
.
ArgumentParser
()
aparser
.
add_argument
(
"
path
"
,
help
=
"
path to the file to convert
"
)
args
=
aparser
.
parse_args
()
pprint
(
mml_file_meta
(
args
.
path
))
showmeta
.
_shortdesc
=
'
displays extended MML file metadata
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment