From 03e754e04ab81fe075a139d5321b7131abd3e547 Mon Sep 17 00:00:00 2001 From: marco candrian Date: Tue, 8 Apr 2008 03:56:03 +0200 Subject: [PATCH] [doc] Initial rc skeleton generator Signed-off-by: Julien Danjou --- Makefile.am | 7 +- awesomerc.5.txt | 8 +- build-utils/extractrcskeleton.py | 142 +++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 2 deletions(-) create mode 100755 build-utils/extractrcskeleton.py diff --git a/Makefile.am b/Makefile.am index 1bc689e0..e4dde6ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -222,6 +222,7 @@ SUFFIXES += .1.xml .1 SUFFIXES += .5.xml .5 EXTRA_DIST += build-utils/extractuicbdoc.py EXTRA_DIST += build-utils/extractoptsdoc.py +EXTRA_DIST += build-utils/extractrcskeleton.py if HAVE_XMLTO .1.xml.1: $(XMLTO) man $< @@ -234,16 +235,20 @@ SUFFIXES += .5.txt .5.xml if HAVE_ASCIIDOC if HAVE_PYTHON CLEANFILES += optsdocgen.txt +CLEANFILES += rcskeletongen.txt CLEANFILES += uicbdocgen.txt optsdocgen.txt: common/configopts.c $(PYTHON) $(top_srcdir)/build-utils/extractoptsdoc.py \ $(top_srcdir)/common/configopts.c > optsdocgen.txt +rcskeletongen.txt: common/configopts.c + $(PYTHON) $(top_srcdir)/build-utils/extractrcskeleton.py \ + $(top_srcdir)/common/configopts.c > rcskeletongen.txt uicbdocgen.txt: $(awesome_SOURCES) $(PYTHON) $(top_srcdir)/build-utils/extractuicbdoc.py \ $(top_srcdir)/*.c > uicbdocgen.txt .1.txt.1.xml: $(ASCIIDOC) -d manpage -b docbook -o $@ $< -awesomerc.5.xml: optsdocgen.txt uicbdocgen.txt +awesomerc.5.xml: optsdocgen.txt rcskeletongen.txt uicbdocgen.txt .5.txt.5.xml: $(ASCIIDOC) -d manpage -b docbook -o $@ $< endif diff --git a/awesomerc.5.txt b/awesomerc.5.txt index 3471a8aa..8e4e9320 100644 --- a/awesomerc.5.txt +++ b/awesomerc.5.txt @@ -193,12 +193,18 @@ $ chmod a+x ~/bin/awesome-diskusage ~/.xsession-errors or the terminal where X got started. .............................................. +AWESOMERC SKELETON +------------------ +Following skeleton lists all available configuration options in *awesomerc*. + +.......................... +include::rcskeletongen.txt[] +.......................... SEE ALSO -------- awesome(1) awesome-client(1) awesome-menu(1) awesome-message(1) - AUTHORS ------- This man page was written by Julien Danjou , Marco Candrian diff --git a/build-utils/extractrcskeleton.py b/build-utils/extractrcskeleton.py new file mode 100755 index 00000000..6af264d9 --- /dev/null +++ b/build-utils/extractrcskeleton.py @@ -0,0 +1,142 @@ +#!/usr/bin/env python +# +# extractuicbdoc.py - extract uicb documentation from awesome source code +# Copyright (C) 2008 Marco Candrian +# +# This indeed crappy. Any better version, even with awk, would be welcome. + + +print """Note: when there is no whitespace, quotes are optional. + + -> "true" or "false" + -> #ff9933 (hexadecimal color notation: #red green blue) + -> 0.3, 0,8 (often values between 0 and 1 are useful) + -> Pango font: sans 10, sans italic 10, fixed 12, ... + -> foobar (choose a name/string) + -> "/home/awesome/pics/icon.png" (path to image) + -> 1, 10, -3 (positive numbers are required mostly) + -> a, 1, F10 (see /usr/include/X11/keysymdef.h w/o XK_ or 'xev') + or a keycode beginning with # + -> "Mod1", "Mod4", "Control" (modifiers) + -> regular expression + -> "foo bar" + -> prog, 3... (argument to a uicb function, where required) + -> spawn, exec, client_tag... (see UICB FUNCTIONS above) + -> list of position: off, top, right, left, bottom, auto +