Skip to content

Convert guitar chords scraped from various websites for the LaTeX songs package.

License

Notifications You must be signed in to change notification settings

kasnerz/chords2latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

chords2latex

Converts chords from:

to the notation used in the songs LaTeX package.

Usage

  1. Copy the chords and lyrics from a web page.
  2. Paste them into a text file.
  3. Use the script to convert the file into LaTeX:
  ./chords2latex.py <input_file> -n <name> -a <author> -o <output_file>`

Flags

  • -n name of the song
  • -a author of the song
  • -o path to the output .tex file
  • -e convert B and Bb to european notation (H and B)

Example

  • input (just a snippet, see sample.txt for the full version)
[Verse 1]
  C       Bm7          E7              Am     Am/G
Yesterday   all my troubles seemed so far away   
F       G7                    C           C/B Am   D7       F C C
Now it looks as though they're here to stay oh I believe in yesterday
  • command for converting the file
./chords2latex.py sample.txt -n "Yesterday" -a "The Beatles" -o yesterday.tex -e
  • result
\beginsong{Yesterday}[by={\normalsize The Beatles}]
\beginverse
Ye\[C]sterday \[Hm7]  all my trou\[E7]bles seemed so f\[A&]ar away\[Am/G]
\[F]Now it l\[G7]ooks as though they're\[C] here to sta\[C/H]y oh\[A&] I be\[D7]lieve in \[F]ye\[C]st\[C]erday
\endverse
\endsong

The file can be included in a LaTeX document and compiled with the songs package.

Disclaimer

The script works the best when used together with my songbook.

I made the script for my personal use and I provide no guarantees whatsoever that it's gonna work in your case. I hope it will help, though ;)

License: CC BY-NC-SA 4.0

About

Convert guitar chords scraped from various websites for the LaTeX songs package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages