-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-abcjs.sh
More file actions
executable file
·46 lines (34 loc) · 1.5 KB
/
Copy pathstart-abcjs.sh
File metadata and controls
executable file
·46 lines (34 loc) · 1.5 KB
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
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
PORT="${PORT:-8080}"
cat <<'USAGE'
abcjs — local server
─────────────────────────────────────────────────────
Usage:
./start-abcjs.sh Start server on port 8080
PORT=3000 ./start-abcjs.sh Use a custom port
UI (recommended):
python3 app.py ABC editor + live sheet music
Pages:
http://localhost:PORT/app.html ABC Sheet Music UI
http://localhost:PORT/ Usage guide + sample render
http://localhost:PORT/abcjs/examples/basic.html
http://localhost:PORT/abcjs/examples/printable.html
http://localhost:PORT/abcjs/examples/editor.html
ABC → sheet music (no LLM, no images):
./abc2sheet.py coker.abc -o out/coker.html --open
cat tune.abc | ./abc2sheet.py -o out/tune.html
Print:
Open the usage page and press the Print button, or use
Cmd+P → Save as PDF for formatted sheet music.
Press Ctrl+C to stop.
─────────────────────────────────────────────────────
USAGE
cd "$ROOT"
if command -v python3 >/dev/null 2>&1; then
echo "Serving $ROOT on http://localhost:$PORT"
exec python3 -m http.server "$PORT"
fi
echo "Serving $ROOT on http://localhost:$PORT (npx http-server)"
exec npx --yes http-server -p "$PORT" -c-1