diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-07-08 23:02:16 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-07-08 23:02:16 -0400 |
| commit | b50e6f08aa3dc5662e728f81f791f71e8add6843 (patch) | |
| tree | bc897605bfc26e8a5c01f6c151efd9662e1a9296 /oebindex.awk | |
| parent | 2b7bfaf7cc3b0822ccb4322d73d16997dbeb4e11 (diff) | |
| download | cgi-bin-b50e6f08aa3dc5662e728f81f791f71e8add6843.tar.gz | |
oeb index: Create first version of this
Diffstat (limited to 'oebindex.awk')
| -rwxr-xr-x | oebindex.awk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oebindex.awk b/oebindex.awk new file mode 100755 index 0000000..e348c7e --- /dev/null +++ b/oebindex.awk @@ -0,0 +1,8 @@ +($1 == "\\h"){book = substr($0, 4); print "# " book; gsub(/ /, "%20", book)} +($1 == "\\c"){chapter = $2} +($1 == "\\v"){verse = $2} +($1 == "\\s"){ + print "=> oeb.py?" startref"-"verse":"chapter section; + section = substr($0, 3); + startref = book"%20"verse":"chapter +} |
