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
Hashes for python_chordpro-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b82841455ea29a9f0aa27b5abd2ce4adc255838ae11103aacf8ef3d1f7bd060 |
|
MD5 | 7847a83670797f47c7c7be5c3241fee9 |
|
BLAKE2b-256 | 7df077168bf6480c7aedad9c897a6feceea6e693be341be7248d29959a697380 |