Repository navigation
Importing Lyrics
github-actions[bot] edited this page Jan 26, 2026
·
2 revisions
Import lyrics from PDF/DOCX/images into a ChordPro skeleton that you can edit and add chords to later.
The modern ingestion workflow lives under scripts/ingest/ and supports OCR, staging, normalization, and compare reports.
cd scripts/ingest
npm i
npm run build
# drop files into scripts/ingest/_ingest_inbox/
npx gc-ingest
# single file
npx gc-ingest ingest /path/to/song.pdfStaged output lands in scripts/ingest/_ingest_staging/<slug>/ with drafts/, normalized/, and HTML previews.
See Ingestion-CLI for full usage details.
# DOCX → ChordPro (default output to public/songs/)
npm run ingest -- path/to/file.docx
# PDF → ChordPro
npm run ingest -- path/to/file.pdf
# Multiple files (custom directory)
npm run ingest -- file1.docx file2.pdf --out path/to/dir
# Emit plain headers instead of directives
npm run ingest -- song.pdf --plain- DOCX:
npm i -D mammoth - PDF:
npm i -D pdf-parse
Images (OCR) are not enabled by default in the legacy CLI. Use gc-ingest for OCR support.
- Title is guessed from the first non‑header line.
- The tool emits a ChordPro skeleton with meta lines (
{title: …},{key: }, etc.). - Section headers are wrapped with short ChordPro directives (default):
- Verse →
{sov: Verse N}…{eov} - Chorus (incl. Pre‑Chorus label) →
{soc: Chorus|Pre-Chorus}…{eoc} - Other labels (Intro, Tag, Instrumental, etc.) →
{sob: <Label>}…{eob} - Use
--plainto output readable headers instead (e.g.,Verse 1,Pre‑Chorus).
- Verse →
- Normalize and update the index after importing:
npm run normalize && npm run build-index- Default output directory:
public/songs/(must already exist). Use--out <dir>to override. - Default section mode: ChordPro directives. Use
--plainto emit readable headers instead. - On filename conflicts the tool will prompt you to Overwrite, Rename, Skip, or Abort.
- The tool removes leading duplicate title lines and recognizes lines like
(Key of Am)to populate{key: Am}while removing that line from the lyrics. Chord-only lines are ignored. - Output filenames use underscores (e.g.,
above_all.chordpro).
-
User Guide
-
Editing & Admin
-
Developer Guide
-
Infrastructure
-
Mobile