Metadata-Version: 2.1
Name: chartparse
Version: 0.2.0
Summary: A library for parsing Guitar Hero .chart files.
Home-page: https://github.com/AWConant/chartparse/
Author: AWConant
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: black (==22.3.0) ; extra == 'test'
Requires-Dist: codecov (==2.1.12) ; extra == 'test'
Requires-Dist: coverage (==6.4.1) ; extra == 'test'
Requires-Dist: flake8 (==4.0.1) ; extra == 'test'
Requires-Dist: gitchangelog (==3.0.4) ; extra == 'test'
Requires-Dist: isort (==5.10.1) ; extra == 'test'
Requires-Dist: mypy (==0.961) ; extra == 'test'
Requires-Dist: pytest (==7.1.2) ; extra == 'test'
Requires-Dist: pytest-cov (==3.0.0) ; extra == 'test'
Requires-Dist: pytest-mock (==3.8.1) ; extra == 'test'
Requires-Dist: sphinx (==4.5.0) ; extra == 'test'
Requires-Dist: sphinx-rtd-theme (==1.0.0) ; extra == 'test'
Requires-Dist: sphinx-toolbox (==3.1.1) ; extra == 'test'

---
# chartparse

[![codecov](https://codecov.io/gh/AWConant/chartparse/branch/main/graph/badge.svg?token=chartparse_token_here)](https://codecov.io/gh/AWConant/chartparse)
[![CI](https://github.com/AWConant/chartparse/actions/workflows/main.yml/badge.svg)](https://github.com/AWConant/chartparse/actions/workflows/main.yml)

## Install it from PyPI

```bash
pip install chartparse
```

## Usage

```py
from chartparse.chart import Chart
from chartparse.instrument import Instrument, Difficulty

c = Chart.from_filepath("/path/to/file.chart")

# the first 7 BPM changes
c.sync_track.bpm_events[:7]

# the first 8 time signature changes
c.sync_track.time_signature_events[:8]

expert_guitar = c.instrument_tracks[Instrument.GUITAR][Difficulty.EXPERT]

# the first 10 notes of the expert guitar chart
expert_guitar.note_events[:10]

# the first 3 star power phrases of the expert guitar chart
expert_guitar.star_power_events[:3]
```

Note: this software is tested only with .chart files that are written by
[Moonscraper](https://github.com/FireFox2000000/Moonscraper-Chart-Editor).
Files written by other editors or are handwritten may produce undefined
behavior.

## Development

Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.

