A ChordPro parser, written in Python. https://igitar.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Raoul Snyman e55294c714
Add constants
12 months ago
src/igitar Add constants 12 months ago
.gitignore Update ignores 2 years ago
LICENSE Initial commit 2 years ago
README.rst Rename the project 2 years ago
pyproject.toml Add setuptools data for building a package 2 years ago
setup.cfg Rename the project 2 years ago
setup.py Add setuptools data for building a package 2 years ago

README.rst

igitar

igitar [ee-gee-tahr] isiXhosa, meaning guitar

igitar is a ChordPro parser, written in Python. The main difference between this module and other similar libraries is that igitar parses ChordPro files down to the syllable level, enabling finer-grained control of the formatted output.

Warning

This package is still in development. Only a subset of ChordPro is currently supported, and some key features are missing, like displaying song metadata.

Installation

You can use pip to install igitar:

$ pip install igitar

Example Usage

from igitar import Song

song = Song('path/to/song.chordpro')

for verse in song.verses:
    print(verse.title)

Rendering

igitar comes with two renders, HTML and Text.

from igitar.renderers.html import render

print(render(song))

Command Line Interface

igitar 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:

$ igitar path/to/song.chordpro -f text -o song.txt

License

igitar is licensed under the MIT license. See the LICENSE file for more information.