Skip to main content

Musescore file management

A CLI interface for managing Musescore files and their PNG exports. It can normalize Musescore files, export PNGs, and synchronize them to Google Drive or S3-compatible services.

Installation

Install the project and the providers you use:

uv sync --extra drive --extra s3 --group dev
make init

Google Drive uses the drive extra. S3 and S3-compatible services use the s3 extra.

Configuration

Create ~/.msm/configs:

[default]
LOCAL_MSCZ_DIRECTORY=/path/to/scores
LOCAL_PNG_DIRECTORY=/path/to/pngs
MSCORE_CMD=mscore
JOBS=4
DEFAULT_SCORES_TARGET=archive
DEFAULT_PNGS_TARGET=gallery

[target.archive]
TYPE=s3
BUCKET=my-score-bucket
PREFIX=scores
ENDPOINT_URL=https://s3.example.com

[target.gallery]
TYPE=google-drive
FOLDER_ID=<Google Drive folder ID>
CREDENTIALS_PATH=~/.config/msm/google-client.json

The [default] section is a profile. Select another profile with --profile NAME. Normal application environment variables override profile values.

Profiles can be managed interactively. With no subcommand, profiles prints its help and the current profile list:

uv run msm profiles
uv run msm profiles add work
uv run msm profiles edit work
uv run msm profiles clear work

The add and edit wizards explain each setting, allow optional settings to be skipped, and show the complete proposed profile for confirmation before changing ~/.msm/configs.

Each [target.NAME] section defines a reusable destination. Select one with --target NAME, regardless of whether it uses Google Drive or S3. Target fields can be overridden with MSM_TARGET_<NAME>_<FIELD>, with punctuation in the name replaced by underscores. For example, MSM_TARGET_ARCHIVE_BUCKET overrides BUCKET for archive.

Targets can also be created interactively:

uv run msm targets add archive

The wizard asks for the provider's required settings, offers optional settings individually, and confirms the complete target before changing ~/.msm/configs.

S3 targets support BUCKET, PREFIX, ENDPOINT_URL, ACCESS_KEY_ID, and SECRET_ACCESS_KEY. Standard AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_ENDPOINT_URL_S3 values are used as fallbacks, so the normal boto3 credential chain remains available.

Google Drive targets support FOLDER_ID, CREDENTIALS_PATH, and an optional TOKEN_PATH. By default, OAuth tokens are stored per target at ~/.msm/tokens/google-drive-<target>.json. The first use can open a browser for authorization.

Commands

Local operations use normalize and export:

uv run msm normalize scores
uv run msm normalize scores --path ./scores
uv run msm export scores --path ./scores --output ./pngs --jobs 2

Remote operations use sync:

uv run msm sync scores
uv run msm sync scores --target gallery
uv run msm sync pngs --target archive
uv run msm --dryrun sync pngs --target gallery

Score commands default to LOCAL_MSCZ_DIRECTORY; PNG commands default to LOCAL_PNG_DIRECTORY. A path can be one file or a directory. Directory scans are non-recursive.

sync is one-way and non-deleting. It creates missing remote files, updates older managed files, skips unchanged files, and leaves remote-newer or conflicting files untouched. Conflicts and remote-newer results produce a nonzero exit code. --dryrun prevents remote mutations but still reads remote state and can authorize Google Drive or refresh its token.

The former flat invocations msm normalize, msm export-pngs, msm sync-pngs, msm upload, and msm upload-scores have been removed.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

musescore_manager-0.0.3.tar.gz (117.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

musescore_manager-0.0.3-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file musescore_manager-0.0.3.tar.gz.

File metadata

  • Download URL: musescore_manager-0.0.3.tar.gz
  • Upload date:
  • Size: 117.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for musescore_manager-0.0.3.tar.gz
Algorithm Hash digest
SHA256 751a68185db75a199f75eeffaacadab9d37c0ee88300d5a1d8f95cdbe609b777
MD5 e49319a49b01596c64af743981e97a01
BLAKE2b-256 7ecdbbc5001ca3d50dc248952131a73985bede7a8ad890c118c5c5b43068b930

See more details on using hashes here.

File details

Details for the file musescore_manager-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: musescore_manager-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for musescore_manager-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 92c825171b5c6882eb8cb0a66cffc1a543160e0cd24e4b943668376426ecf6de
MD5 9e5de2e91250b18664c1378471e46956
BLAKE2b-256 c20bf4c4fa09043696832a5e552bf9611ac57b81489e004ddb97092f00837130

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page