-h,--help | print short help and exit |
-H,--Help | print full documentation via less and exit |
-V,--version | print version and exit |
-c,--clean | remove all files that can be re-created |
-f,--full | re-create all files |
-s,--sync[=STR] | synchronize the lug page at www.ntg.nl/STR |
with the current directory; the default for STR is lug |
If you run lug for the first time, do so in a directory containging the script only; it wil then create all needed files and directories in it.
Recreate all files:
$ lug --full
Apply corrections sent by email:
$ lug < paste the email contents to standard input > ^D
When people send new data by using the forms of the site, they do so by submitting the form, which causes an email with raw data to be sent to the administrator(s).
An administrator should verify the password reported in the email and then cd to this directory, or to a copy of it on his own computer, and he should then run:
$ ./lug
lug waits for data, which it can be given by cut (from the email) and paste (to standard input). By ending the input with ^D
, lug corrects the data in the directory `lugs'
It is of course also possible to save the contents of the email into a file and then run:
$ ./lug <file
The administrator can make small correction to one country by giving the necessary input on the command line. For example, to change the email address of the treasurer of The Netherlands he can run:
$ ./lug code=nl [email protected] ^D
Synchronize the website (www.ntg.nl/lug
) with the current directory:
$ ./lug --sync
Of course, this action makes no sense if you are operating in the web directory itself.
Or, for testing purposes, synchronize www.ntg.nl/lugtest
:
$ ./lug --sync=lugtest
or, shorter:
$ ./lug -slugtest
Remove everything that can be regenerated:
$ ./lug --clean
This stores any changes made in the README.md
file, the lugs.rb
script, and the images
en lugs
directories in the script. After this operation only the script will be there, and you can simply restore everything by running it with the --full
option.
Regenerate everything:
$ ./lug --full
synopsis: | excheck executable1 [executable2...] |
description: | check if all needed execs are there and getopt is GNU |
synopsis: | syncwww [dir] |
description: | synchronize web page (lug by default) with current dir |
globals user: | webdir |
synopsis: | handle_options "$@" |
description: | Handle the options |
globals used: | Myname Version webdir |
synopsis: | country_codea ;-replacement &-replacement |
description: | Set the keys hash to the values taken from the file lugs/$1 . |
globals set: | keys |
synopsis: | clean |
description: | Remove files created but not needed for the web site or for |
lug functioning. |
synopsis: | Clean |
description: | Remove all files that can be re-created and store them back in lug. |
synopsis: | makeMakefile |
description: | Create the file Makefile |
globals used: | db |
synopsis: | makelinks.inc |
description: | Create the file links.inc |
synopsis: | makexx country_code |
description: | Create the file lugs/$1 |
globals set: | (via setkeys): keys |
globals used: | db keys adminemail |
synopsis: | makeindex.html |
description: | Create the file index.html |
globals used: | db fullname adminemail |
synopsis: | makelugs.html |
description: | Create the file lugs.html |
globals set: | (via setkeys) keys |
globals used: | db keys fullname |
synopsis: | urlit string |
description: | if argument is not empty, print it surrounded with \url{...} , |
synopsis: | stackit string |
description: | if argument is empty, print newline, |
if not, replace semicolons with double backslashes and print it surrounded with \Longunderstack[l]{...}\strut |
synopsis: | makelugs.pdf |
description: | Create the files lugs.tex and lugs.pdf |
globals set: | (via setkeys) keys |
globals used: | keys db fullname |
synopsis: | makelabels.pdf |
description: | Create the files labels.tex and labels.pdf |
globals set: | (via setkeys) keys |
globals used: | keys db |