diff --git a/Makefile.am b/Makefile.am index 0d6e2df..2cb2f41 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,7 @@ EXTRA_DIST += ChangeLog \ AUTHORS \ NEWS \ README \ + README.org \ HACKING \ COPYING \ pre-inst-env.in \ diff --git a/bible-tools.scm b/bible-tools.scm index dc59c05..ce9666c 100644 --- a/bible-tools.scm +++ b/bible-tools.scm @@ -59,3 +59,4 @@ (define (call-with-chapter book chapter thunk) (lambda (bible) (thunk (get-chapter (string->number chapter) (get-book book bible))))) + diff --git a/doc/bible-tools.texi b/doc/bible-tools.texi index ec08db0..a924753 100644 --- a/doc/bible-tools.texi +++ b/doc/bible-tools.texi @@ -45,8 +45,13 @@ Edition @value{EDITION} @* This document describes Bible-Tools version @value{VERSION}. +Bible-Tools is a Guile scheme library for working with bibles in tsv +format. It includes two scripts (word-counter & bible2latex). + @menu * Introduction:: Why Bible-Tools? +* word-counter:: word-counter +* bible2latex:: bible2latex @end menu @c ********************************************************************* @@ -57,4 +62,29 @@ INTRODUCTION HERE This documentation is a stub. +@c********************************************************************* +@node word-counter +@chapter word-counter + +word-counter counts the occurrences of words in a book or chapter of +the bible. + +It takes the name of a bible book as the first argument and +additionally 3 flags: [-h, -v, -c]. + +@list +@item +-h shows a help message +@item +-v shows the version +@item +-c specifies a chapter +@end list + +@c********************************************************************* +@node bible2latex +@chapter bible2latex + +bible2latex exports (a part of) the bible to latex. + @bye diff --git a/scripts/word-counter.in b/scripts/word-counter.in index 83d2d07..41dcaf0 100644 --- a/scripts/word-counter.in +++ b/scripts/word-counter.in @@ -35,4 +35,5 @@ exec guile -e '(@ (word-counter) main)' -s "$0" "$@" ("-v" (version)) ("-c" (call-with-chapter (cadr args) (get "-c") show-meta)) - (else (call-with-book (cadr args) show-meta))))) + (else (if (< (length args) 2) (help) + (call-with-book (cadr args) show-meta))))))