Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yzhong52/ascii_chord
Print guitar chord with ascii characters given its name
https://github.com/yzhong52/ascii_chord
guitar guitar-chords rust rust-lang rust-language
Last synced: 6 days ago
JSON representation
Print guitar chord with ascii characters given its name
- Host: GitHub
- URL: https://github.com/yzhong52/ascii_chord
- Owner: yzhong52
- Created: 2022-09-16T11:26:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T13:15:23.000Z (about 2 years ago)
- Last Synced: 2024-10-19T14:00:49.004Z (19 days ago)
- Topics: guitar, guitar-chords, rust, rust-lang, rust-language
- Language: Rust
- Homepage: https://crates.io/crates/aschord
- Size: 41 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Ascii Chord
A command line tool for showing how to play guitar chords
## Usage
For a single chord:
```
$ aschord get GThis is how you play 'G' chord:
◯ ◯ ◯
┌─┬─┬─┬─┬─┐
│ │ │ │ │ │
├─┼─┼─┼─┼─┤
│ ◯ │ │ │ │
├─┼─┼─┼─┼─┤
◯ │ │ │ │ ◯
└─┴─┴─┴─┴─┘
```For multiple chords:
```
$ aschord list Em Esus4 Asus2 FEm Esus4 Asus2 F
◯ ◯ ◯ ◯ ◯ ◯ ◯ x ◯ ◯ ◯
╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ◯-------◯-◯
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ ◯ ◯ │ │ │ │ ◯ ◯ ◯ │ │ │ │ ◯ ◯ │ │ │ │ │ ◯ │ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ◯ ◯ │ │ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘
```For different ways to play the same chord:
```
$ aschord list Bm --style full-nameB minor B minor (no bar)
x x
╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕
│ │ │ │ │ │ │ │ │ │ │ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
◯-◯-------◯ │ │ │ │ │ ◯
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ │ │ ◯ │ │ │ │ │ ◯ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ ◯ ◯ │ │ │ │ ◯ ◯ │ │
└─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘
```For multiple chords with full names:
```
$ aschord list Em Esus4 Asus2 F --style full-nameE minor E suspended 4th A suspended 2nd F major
◯ ◯ ◯ ◯ ◯ ◯ ◯ x ◯ ◯ ◯
╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕ ╒═╤═╤═╤═╤═╕
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ◯-------◯-◯
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ ◯ ◯ │ │ │ │ ◯ ◯ ◯ │ │ │ │ ◯ ◯ │ │ │ │ │ ◯ │ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ◯ ◯ │ │ │
├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤ ├─┼─┼─┼─┼─┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘ └─┴─┴─┴─┴─┘
```For all support chords:
```
$ aschord all
```Also see all supported chords [here](all_supported_chords.md) (auto-generated, do not edit).
## Installation
Install local version:
```
git clone [email protected]:yzhong52/ascii_chord.git
cd ascii_chord
cargo install --path .
```Install from :
```
cargo install aschord
```## Development
### Build & Run
Show a single chord:
```
cargo run -- G
```Show multiple chords:
```
cargo run -- list Em Esus4 Asus2 Fm D Am
```Show all chords:
```
cargo run -- all
```### Unit Tests
```
cargo test
```### Release
```
cargo publish
```