From 345e1bfbf8b1cf057f885d841e2bd58f758392d0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 25 May 2011 00:49:33 +0000 Subject: Add man page and fix sordi help output. git-svn-id: http://svn.drobilla.net/sord/trunk@136 3d64ff67-21c5-427c-a301-fe4f08042e5a --- doc/sordi.1 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/sordi.c | 3 ++- wscript | 3 +++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 doc/sordi.1 diff --git a/doc/sordi.1 b/doc/sordi.1 new file mode 100644 index 0000000..504ac35 --- /dev/null +++ b/doc/sordi.1 @@ -0,0 +1,57 @@ +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH SORDI 1 "24 May 2011" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +.B sordi \- Load and re-serialise RDF data + +.SH SYNOPSIS +sordi [OPTIONS]... INPUT BASE_URI + +.SH OPTIONS +.TP +\fB\-h\fT, \fB\-\-help\fR +Print the command line options. + +.TP +\fB\-i SYNTAX\fR +Read input in SYNTAX (`turtle' or `ntriples'). + +.TP +\fB\-o SYNTAX\fR +Write output in SYNTAX (`turtle' or `ntriples'). + +.TP +\fB\-s INPUT\fR +Parse INPUT as a string (terminates options). + +.TP +\fB\-v\fR +Display version information and exit. + +.SH AUTHOR +Sordi was written by David Robillard + +.SH COPYRIGHT +Copyright \(co 2011 David Robillard. +.br +License: +.br +This is free software; you are free to change and redistribute it. +.br +There is NO WARRANTY, to the extent permitted by law. + +.SH "SEE ALSO" + diff --git a/src/sordi.c b/src/sordi.c index f2f3e59..9309e25 100644 --- a/src/sordi.c +++ b/src/sordi.c @@ -46,9 +46,10 @@ print_usage(const char* name, bool error) { FILE* const os = error ? stderr : stdout; fprintf(os, "Usage: %s [OPTION]... INPUT [BASE_URI]\n", name); - fprintf(os, "Load and re-serialise RDF syntax.\n"); + fprintf(os, "Load and re-serialise RDF data.\n"); fprintf(os, "Use - for INPUT to read from standard input.\n\n"); fprintf(os, " -h Display this help and exit\n"); + fprintf(os, " -i SYNTAX Input syntax (`turtle' or `ntriples')\n"); fprintf(os, " -o SYNTAX Output syntax (`turtle' or `ntriples')\n"); fprintf(os, " -s INPUT Parse INPUT as string (terminates options)\n"); fprintf(os, " -v Display version information and exit\n"); diff --git a/wscript b/wscript index 88df4ef..a0180d0 100644 --- a/wscript +++ b/wscript @@ -165,6 +165,9 @@ def build(bld): # Documentation autowaf.build_dox(bld, 'SORD', SORD_VERSION, top, out) + # Man page + bld.install_files('${MANDIR}/man1', 'doc/sordi.1') + bld.add_post_fun(autowaf.run_ldconfig) if bld.env['DOCS']: bld.add_post_fun(fix_docs) -- cgit v1.2.1