diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-07-08 23:45:05 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-07-08 23:45:05 -0400 |
| commit | 15468f524a6a29401960ff52b6417cc6124330ed (patch) | |
| tree | 0819e3d3c60c7609c211cb15fafa546502b206d9 /oebindex.awk | |
| parent | b50e6f08aa3dc5662e728f81f791f71e8add6843 (diff) | |
| download | cgi-bin-15468f524a6a29401960ff52b6417cc6124330ed.tar.gz | |
oeb index: Fix reference order
Diffstat (limited to 'oebindex.awk')
| -rwxr-xr-x | oebindex.awk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/oebindex.awk b/oebindex.awk index e348c7e..ba9c351 100755 --- a/oebindex.awk +++ b/oebindex.awk @@ -1,8 +1,8 @@ -($1 == "\\h"){book = substr($0, 4); print "# " book; gsub(/ /, "%20", book)} -($1 == "\\c"){chapter = $2} +($1 == "\\h"){book = substr($0, 4); print "# " book; gsub(/ /, "%20", book); verse = 1; chapter = 1} +($1 == "\\c"){chapter = $2; verse = 1} ($1 == "\\v"){verse = $2} ($1 == "\\s"){ - print "=> oeb.py?" startref"-"verse":"chapter section; + print "=> oeb.py?" startref"-"chapter"%3A"verse section; section = substr($0, 3); - startref = book"%20"verse":"chapter + startref = book"%20"chapter"%3A"verse } |
