Added a bit of documentation

This commit is contained in:
Silas Vedder 2022-10-20 15:13:02 +02:00
parent 230a6a9432
commit 834bc25705
4 changed files with 34 additions and 1 deletions

View File

@ -61,6 +61,7 @@ EXTRA_DIST += ChangeLog \
AUTHORS \
NEWS \
README \
README.org \
HACKING \
COPYING \
pre-inst-env.in \

View File

@ -59,3 +59,4 @@
(define (call-with-chapter book chapter thunk)
(lambda (bible) (thunk (get-chapter (string->number chapter)
(get-book book bible)))))

View File

@ -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

View File

@ -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))))))