From 5d7fb6f8b452b0ca52f76b6a5cecceb5013dd6f8 Mon Sep 17 00:00:00 2001 From: Vlasta Vesely Date: Thu, 26 Jul 2018 14:43:38 +0200 Subject: [PATCH] add man page --- .gitignore | 1 + Makefile | 9 +++++- doc/iast.1.adoc | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 doc/iast.1.adoc diff --git a/.gitignore b/.gitignore index 8002458..a674747 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iast +/doc/*.gz /*.o /*.d diff --git a/Makefile b/Makefile index a4d8a12..81610e0 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ SRCFILES := $(shell find . -type f -name "*.c") OBJFILES := $(patsubst %.c, %.o, $(SRCFILES)) +all: iast doc/iast.1.gz + iast: main.o $(OBJFILES) $(CC) $^ -o $@ $(CFLAGS) @@ -16,11 +18,16 @@ test: iast %.o: %.c $(CC) -MMD -MP -c $< -o $@ $(CFLAGS) +doc/%.gz: doc/%.adoc + asciidoctor -d manpage -b manpage $< -o $(<:.adoc=) && gzip -f $(<:.adoc=) + install: install -m 0755 iast $(PREFIX)/bin + install -m 644 doc/iast.1.gz $(PREFIX)/share/man/man1 uninstall: rm -f $(PREFIX)/bin/iast + rm -f $(PREFIX)/share/man/man1/$(PROGNAME).1.gz clean: - $(RM) iast *.o *.d + $(RM) iast *.o *.d doc/*.gz diff --git a/doc/iast.1.adoc b/doc/iast.1.adoc new file mode 100644 index 0000000..05b0ba5 --- /dev/null +++ b/doc/iast.1.adoc @@ -0,0 +1,75 @@ +iast(1) +======= +:manmanual: sanskrit-iast + +NAME +---- +iast - a helper for Sanskrit transliteration + + +SYNOPSIS +-------- +-------------------------------------------------------------------------------- +iast [-h] [-v] [-e] [-c] [--] [text arguments] +-------------------------------------------------------------------------------- + +OPTIONS +------- +*-h*:: +show help and exit + +*-v*:: +show version number and exit + +*-c*:: +use Czech transliteration instead of plain IAST scheme + +*-e*:: +convert symbolic ASCII text to IAST representation + +*--*:: +read data from the standard input + + +DESCRIPTION +----------- +iast is a tool for the lossless transliteration of Sanskrit terms written in +Devanagari into Latin using the International Alphabet of Sanskrit +Transliteration (IAST). + +By default, the program takes all input arguments written in Devanagari and +transliterates them to IAST version. + + +ENCODING +-------- +When the flag "-e" is set on, the program converts purely ASCII-encoded strings +into the special characters of the IAST alphabet. For example, it converts +"sam.skr.tam" to "saṃskṛtam" or "s,a-stram" to "śāstram". + +The encoding scheme is based on the following principle: characters "-", ".", +"," and "~" are considered to be modifiers that modify a letter that stands +before the modifier. For example, if the string to be encoded contains "a-", +it will be encoded as "ā" and sequence "n~" as "ñ". The only exception from +the rule is the letter "n" because it can be encoded both with an over-dot (ṅ) +and under-dot (ṇ). For the over-dot variant, the conversion sequence is "n^.". + +Alternatively, the Czech characters "á", "í", "ú", "š" and "ň" can be used as +shortcuts to encode the letters "ā", "ī", "ū", "ś" and "ñ" respectively. + + +COPYRIGHT +--------- +Copyright (c) 2018 Vlasta Vesely + + +LICENSING AND WARRANTY +---------------------- +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details.