blob: 0d9c560f1c957d2fca144538660085861716c9eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# ChordPro Charts
In this repository you will find:
- `chordpro` files in `./src/`
- A global `JSON` file `./config.json`
- Song-specific `JSON` files in `./configs/`
- Helper scripts in `./scripts/`
As a standard, all file names should be lowercase and use `'-'`s instead of `' '`s between words.
# ChordPro format
The `chordpro` files follow the ChordPro 6 format.
See the [official website](https://www.chordpro.org/chordpro/index.html).
# Helper Scripts
## quick-sanitize.sh
This is a `sh` script intended to be used on `chordpro` files retrieved from the "Worship Online" service.
These files can be a good starting point for adding a song to this repository.
However, their syntax and directives differ slightly from what the base `chordpro` command supports.
This script will edit the given file in-place and make several changes.
#### Notable Examples:
- `{start_column}` and `{end_column}` directives don't exist and are thus removed by the script. Use `{column_break}` as needed.
- Song sections use the syntax `{c:Verse}` or similar. These are replaced with the appropriate opening directive `{sov:Verse}` or similar.
### Usage:
```sh
./scripts/quick-sanitize.sh ~/path-to/file.chordpro
```
#### *NOTE:*
*You will **NEED** to manually check the file after the script has run to fix any syntax issues the script failed to catch.*
*Here's some examples:*
- *closing `{c}` directives need to be manually replaced with the appropriate ending-tag. Ex: `{eoc}` for end-of-chorus.*
# Build Script
`./scripts/build.sh` is a `zsh` script that can build one or all songs in a requested format.
The script will automatically detect if a matching `configs/{song-name}.json` file exists and pass it to the `chordpro` executable to be mixed with/override the global `./config.json` file.
Once complete, the output file(s) can be found at `./out/{song-title}.{format}`.
For a list of all available output formats, see the official `chordpro` command [output documentation](https://www.chordpro.org/chordpro/using-chordpro/#output).
#### *NOTE:*
*If an unsupported format is requested, the output file will have the provided extension (`./out/song-title.format`), but will be a PDF internally and may only be opened as such.*
*Be sure to double-check the output file after building if using something other than PDF.*
## Usage:
```sh
./scripts/build.sh [song-title|all] [format]
```
## Build All Examples:
### As PDF
```sh
./scripts/build.sh
```
or
```sh
./scripts/build.sh all
```
or
```sh
./scripts/build.sh all pdf
```
### As HTML
```sh
./scripts/build.sh all html
```
### As ChordPro
```sh
./scripts/build.sh all cho
```
#### *NOTE:*
*This will output a functional equivalent to the input `./src/{song-name}.chordpro` file with some changes, including:*
- *removing comments*
- *expanding variables (composers, tempo, etc)*
- *transposing*
*This can be useful if you want a copy of the chordpro file with the Nashville numbers instead of notes from the original key*
## Build A Single Song
#### *NOTE:*
*Be sure to use the filename as it is found in the `./src/` directory without the file extension*
### As PDF
```sh
./scripts/build.sh is-he-worthy
```
or
```sh
./scripts/build.sh is-he-worthy pdf
```
### As HTML
```sh
./scripts/build.sh is-he-worthy html
```
### As ChordPro
```sh
./scripts/build.sh is-he-worthy cho
```
|