Skip to main content

[mus]escore [d]own[l]oader, ported from TypeScript

Project description

musdl

logo

NOTE:

The author of musdl does NOT condone piracy in any way, and is not responsible for anything that happens as a result of piracy arising from the use of musdl.

musdl (musscore downloader) is a Python script that I wrote to make downloading scores from Musescore easy.

It is meant to be used as a command-line tool, but can also be imported and used as a module:

from musdl import Score

my_score = Score(...)  # the Musescore url goes here
data = my_score.download("mp3")  # download as mp3, returns as bytes

Why?

musdl was inspired by musescore-downloader, which is written in TypeScript. But, what if you wanted to run it without a web browser? That's why I made a Python equivalent.

cough cough takedown request something something cough cough

Take a look at this issue in the same repo.

Requirements

  • requests - Downloader.
  • beautifulsoup4 - Powerful HTML parser.

For downloading PDFs:

  • reportlab - Make PDFs.
  • svglib - Convert SVGs into Reportlab drawings.

Hacking

All my python projects now use flit to build and publish. So you need to python3 -m pip install flit first.

git clone https://github.com/onyxware/musdl
cd musdl
flit build

Install

(python3 -m) pip install musdl

If you want to download PDFs, you need to install the pdf extra:

(python3 -m) pip install musdl[pdf]

License

MIT.

Todo

  • add multiprocessing support (for faster PDF downloads).

Changelog

2.2.2

Fixed PDF scaling issue on Windows.

2.2.1

Made PDF downloading a extra feature (because svglib and reportlab dependencies are not pure-Python).

2.2.0

Fixed PDF support for Windows. Now musdl uses svglib as the backend for adding SVGs to PDFs.

2.1.1-2.1.2

Added PDF support.

2.0.0

Added -O option to use the score's title as the output filename (y'know, like curl -O). Refactored code to be object-oriented, in the form of the Score class. This should make adding new features easier. (Plus, you can use musdl more programmatically!)

1.1.2

Version bump, use Flit to build instead of setup.py. Updated README too.

1.1.0

Added MusicXML download option, thanks to JPFrancoia for the update!

1.0.0

Initial version.

Project details


Download files

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

Source Distribution

musdl-2.2.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

musdl-2.2.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file musdl-2.2.2.tar.gz.

File metadata

  • Download URL: musdl-2.2.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for musdl-2.2.2.tar.gz
Algorithm Hash digest
SHA256 91005c9518fdf8af3a96347e34a3110ea7d0f5e214d73198ed89418f44f7e6aa
MD5 7dab4d71fc427af0657df2daaa6cc8d0
BLAKE2b-256 d9e428715a1437a3ae1f0a6bff5231afb45b398da58fbeb31c4fa3e1170a83f1

See more details on using hashes here.

File details

Details for the file musdl-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: musdl-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for musdl-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c44557c3591af61fffedee4b58ff21b5bed52f56c0f8c6a4cca105af9d5cae
MD5 49a222d754fb146703179dd515dec3c2
BLAKE2b-256 67f8af7810b0031311c6886506449b271058255b814755a97abe9617c84ea6cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page