A ChordPro parser, written in Python
Project description
python-chordpro is a ChordPro parser, written in Python. The main difference between this module and other similar libraries is that python-chordpro parses ChordPro files down to the syllable level, enabling finer-grained control of the formatted output.
Installation
You can use pip to install python-chordpro:
$ pip install python-chordpro
Example Usage
from chordpro import Song
song = Song('path/to/song.chordpro')
for verse in song.verses:
print(verse.title)
Rendering
python-chordpro comes with two renders, HTML and Text.
from chordpro.renderers.html import render
print(render(song))
Command Line Interface
python-chordpro also ships with a built-in command line interface which will read a ChordPro file and then render it using either the text or HTML renderer.
For example:
$ python-chordpro path/to/song.chordpro -f text -o song.txt
License
python-chordpro is licensed under the MIT license. See the LICENSE file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-chordpro-0.0.2.tar.gz
.
File metadata
- Download URL: python-chordpro-0.0.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13263e171831e8c96ea703564e063d7fc00ff0a58ff5b7d4a780b3e9e05f6efe |
|
MD5 | 0924908eb5e9b8f88cb33f5852d32174 |
|
BLAKE2b-256 | 8132240281e132d9742a031dcd7c89f2a71b012a5d0588a74c7222b96e0a5a4d |
Provenance
File details
Details for the file python_chordpro-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: python_chordpro-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b82841455ea29a9f0aa27b5abd2ce4adc255838ae11103aacf8ef3d1f7bd060 |
|
MD5 | 7847a83670797f47c7c7be5c3241fee9 |
|
BLAKE2b-256 | 7df077168bf6480c7aedad9c897a6feceea6e693be341be7248d29959a697380 |