Repository navigation
Ingestion CLI
github-actions[bot] edited this page Jan 26, 2026
·
2 revisions
Standalone ingestion CLI for GraceChords. Handles DOCX/PDF/images, OCR, staging, normalization, and comparison against the song library.
cd scripts/ingest
npm i
npm run buildOptional dependencies:
- Python 3 +
pdfplumberorpymupdffor PDF text extractionpython3 -m pip install pdfplumber
- PyMuPDF for scanned PDF rendering (OCR fallback)
python3 -m pip install pymupdf
- Tesseract for OCR
- macOS:
brew install tesseract
- macOS:
- Inbox:
scripts/ingest/_ingest_inbox/ - Staging:
scripts/ingest/_ingest_staging/<slug>/-
source/original input drafts/<slug>_draft.chordpronormalized/<slug>.chordpro-
report.json,report.html,preview.html
-
# ingest everything in the inbox
npx gc-ingest
# ingest a single file
npx gc-ingest ingest /path/to/song.pdf
# batch ingest a folder
npx gc-ingest batch /path/to/folder --concurrency 2
# normalize a staging folder
npx gc-ingest normalize scripts/ingest/_ingest_staging/<slug>
# approve normalized output into public/songs
npx gc-ingest approve scripts/ingest/_ingest_staging/<slug> --to public/songs --run-index
# compare staged output to the library
npx gc-ingest compare
npx gc-ingest compare --do-ingest
npx gc-ingest compare --strict-chords
npx gc-ingest compare --chords --lyrics --sections
npx gc-ingest compare --export-json --export-md
# export all normalized outputs to a flat folder
npx gc-ingest export
npx gc-ingest export --clean
# cleanup inbox + staging (keeps folders)
npx gc-ingest --cleanup- HTML report:
scripts/ingest/_ingest_staging/compare_report.html - JSON/MD exports when enabled:
compare_report.jsoncompare_summary.md
- Flat export directory:
scripts/ingest/_ingest_exports/
- Use
gc-ingest compareto iterate on alignment and normalization heuristics. - Chord matching is loose by default; use
--strict-chordsto require exact matches.
See also: Importing-Lyrics Adding-and-Editing-Songs Development-Commands
-
User Guide
-
Editing & Admin
-
Developer Guide
-
Infrastructure
-
Mobile