[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: command line options in the pcb manual



kai-martin knaak wrote:

> Here comes the pile of patches

Oups, forgot to attach!
Second try ...

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Ãffentlicher PGP-SchlÃssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53
From 1e4e0e33e30ff34a2405a4a24e1183d3bb1504a7 Mon Sep 17 00:00:00 2001
From: Kai-Martin Knaak <kmk@xxxxxxxxxxxx>
Date: Sun, 18 Apr 2010 23:34:45 +0200
Subject: [PATCH] expand the syntax of documentating comments

Adds special comments to the definitions of command line options. These are 
inserted to the texi source of the manual on build time by extract-docs.
Removes the obsolete options from the manual and adds a command to include 
the extracted option comments. 
---
 doc/pcb.texi                 |  303 ++------------
 src/hid/bom/bom.c            |   28 ++-
 src/hid/gerber/gerber.c      |   28 ++-
 src/hid/gtk/gui-top-window.c |   24 +
 src/hid/lpr/lpr.c            |   13 +-
 src/hid/nelma/nelma.c        |   38 ++-
 src/hid/png/png.c            |  111 +++++-
 src/hid/ps/eps.c             |   44 ++-
 src/hid/ps/ps.c              |  170 +++++++-
 src/main.c                   | 1013 +++++++++++++++++++++++++++++++++++++++---
 10 files changed, 1407 insertions(+), 365 deletions(-)

diff --git a/doc/pcb.texi b/doc/pcb.texi
index 2eeaeb0..1de56fa 100644
--- a/doc/pcb.texi
+++ b/doc/pcb.texi
@@ -2506,295 +2506,44 @@ see what actions are available.
 @cindex starting @code{Pcb}
 @cindex command-line options
 
-There are several resources which may be set or reset in addition to the
-standard toolkit command-line options. For a complete list refer to
-@ref{Resources}.
-
-The synopsis is:
-
-@code{pcb [-option ...] [-toolkit_option ...] [layout-file]}
-
-or
-
-@code{pcb -specialoption}
-
-@menu
-* Options::                @code{Pcb} command-line options.
-* Special Options::        Version and copyright information.
-@end menu
-
-@node Options
-@section Options
-
-@table @samp
-
-@vindex allDirectionLines
-@cindex line clipping
-@cindex clipping of lines
-@findex -alldirections
-@findex +alldirections
-@item -alldirections/+alldirections
-Disables or enables line clipping to 45 degree angles. Overwrites the
-resource @emph{allDirectionLines}.
-
-@vindex backgroundImage
-@cindex background
-@findex -background
-@item -background file
-Selects a PPM file to be displayed as the board background (for tracing).
-See backgroundImage in @ref{Resources} for details.
-
-@vindex backupInterval
-@cindex backup
-@findex -backup
-@item -backup value
-Time between two backups in seconds. Passing zero disables the backup feature.
-Overwrites the resource @emph{backupInterval}.
-
-@vindex charactersPerLine
-@cindex characters per line
-@cindex length of outputline
-@cindex outputline, length of
-@findex -c
-@item -c value
-Number of characters per output line. The resource @emph{charactersPerLine} is
-overwritten.
-
-@vindex fontFile
-@vindex default font
-@findex -fontfile
-@cindex default font
-@cindex symbols
-@item -fontfile filename
-The default set of symbols (font) for a new layout is read from this file.
-All directories as defined by the resource @emph{fontPath} are scanned
-for the file. The scan is only performed if the filename doesn't contain
-a directory component. The @emph{fontFile} resource is changed.
-
-@vindex elementCommand
-@findex -lelement
-@cindex element, command
-@cindex element, files
-@cindex loading elements
-@cindex preprocessing element data
-@cindex unix command
-@item -lelement command-line
-Sets the command to be executed when an element is loaded from a file to the
-paste buffer. The command may contain %f and %p to pass the requested filename
-and the searchpath to the command. It must write the data to its
-standard output. The related resource is @emph{elementCommand}.
-
-@vindex fileCommand
-@findex -lfile
-@cindex file load command
-@cindex layout files
-@cindex loading layouts
-@cindex preprocessing layout data
-@cindex unix command
-@item -lfile command-line
-Sets the command to be executed when a new layout is loaded from a file.
-The command may contain %f and %p to pass the requested filename
-and the searchpath to the command. It must write the data to its
-standard output. The related resource is @emph{fileCommand}.
-
-@vindex fontCommand
-@cindex font command
-@cindex font files
-@cindex loading fonts
-@cindex loading symbols
-@cindex preprocessing font data
-@cindex unix command
-@findex -lfont
-@item -lfont command-line
-Sets the command to be executed when a font is loaded from a file.
-The command may contain %f and %p to pass the requested filename
-and the searchpath to the command. It must write the data to its
-standard output. The related resource is @emph{fontCommand}.
-
-@vindex layerGroups
-@cindex layers, groups
-@cindex groups
-@findex -lg
-@item -lg layergroups
-This option overwrites the resource @emph{layerGroups}. See its description
-for more information. The value is used for new layouts only.
-
-@vindex libraryFilename
-@findex -libname
-@cindex library name
-@item -libname filename
-The default filename for the library. Overwrites the resource
-@emph{libraryFilename}.
-
-@vindex libraryPath
-@findex -libpath
-@cindex library search path
-@item -libpath path
-The default search path for the the library. Overwrites the resource
-@emph{libraryPath}.
-
-@vindex libraryCommand
-@cindex library command
-@cindex loading elements
-@cindex preprocessing element data
-@cindex unix command
-@findex -llib
-@item -llib command-line
-Sets the command to be executed when an element is loaded from the library.
-The command may contain %f and %p to pass the requested filename
-and the searchpath to the command. %a is replaces by the three arguments
-@emph{template}, @emph{value} and @emph{package}. The command must write
-the data to its standard output. The related resource is @emph{libraryCommand}.
-
-@vindex libraryContentsCommand
-@cindex library contents command
-@cindex listing libraries
-@cindex unix command
-@findex -llibcont
-@item -llibcont command-line
-The command lists the contents of the library.
-The command may contain %f and %p to pass the library filename
-and the searchpath to the command. Also refer to @ref{Library File}
-and @ref{Library Contents File}.
-The related resource is @emph{libraryContentsCommand}.
-
-@cindex log window
-@cindex messages
-@findex -loggeometry
-@item -loggeometry geometry
-Determines the geometry of the log window.
-
-@vindex pinoutNameLength
-@findex -pnl
-@cindex namelength of pins
-@cindex pin, name of
-@cindex length of a pin name
-@item -pnl value
-Restricts the displayed length of the name of a pin in the pinout window to
-the passed value. See also, the resource @emph{pinoutNameLength}.
-
-@vindex pinoutZoom
-@cindex pinout, zoomfactor of display
-@cindex zoom of pinout window
-@findex -pz
-@item -pz value
-Sets the zoom factor for the pinout window according to the formula:
-scale = 1:(2 power value). The related resource is @emph{pinoutZoom}.
-
-@vindex resetAfterElement
-@findex -reset
-@findex +reset
-@cindex connections, reseting after element
-@cindex reseting found connections
-@item -reset/+reset
-If enabled, all connections are reset after each element is scanned.
-This feature is only used while scanning connections to all elements.
-See also, @emph{resetAfterElement}.
-
-@vindex ringBellWhenFinished
-@findex -ring
-@findex +ring
-@cindex keyboard bell
-@item -ring/+ring
-Overrides the resource @emph{ringBellWhenFinished}. If enabled, the bell
-sounds when connection searching has finished.
-
-@vindex routeStyle
-@findex -rs
-@cindex routing style
-@item -rs string
-Overrides the resource @emph{routeStyle}. The string defines a colon
-separated list of route styles. The route styles consist of a
-comma separated list of name, line thickness, via diameter, and via drill size.
-e.g. "Fat,50,100,40:Skinny,8,35,20:75Ohm,110,110,20"
 
-@vindex saveLastCommand
-@cindex saving last entered user command
-@cindex inputfield, saving entered command-line
-@findex -s
-@findex +s
-@item -s/+s
-Enables/Disables the saving of the previous commandline. Overrides the
-@emph{saveLastCommand} resource.
+The synopsis of the pcb command is:
 
-@vindex saveInTMP
-@findex -save
-@findex +save
-@cindex backup
-@cindex saving layouts
-@cindex preventing loss of data
-@cindex temporary files
-@cindex /tmp
-@cindex directory /tmp
-@item -save/+save
-See the resource description of @emph{saveInTMP} for details.
-
-@vindex saveCommand
-@cindex file save command
-@cindex layout files
-@cindex saving layouts
-@cindex postprocessing layout data
-@cindex unix command
-@findex -sfile
-@item -sfile command-line
-Sets the command to be executed when an layout file is saved.
-The command may contain %f which is replaced by the filename. The command
-must read its data from the standard input.
-The resource @emph{saveCommand} is overwritten.
-
-@vindex scriptFilename
-@findex -script
-@cindex startup actions script
-@item -script filename
-Specifies a script file containing PCB actions to be executed
-upon startup.  Overwrites the resource
-@emph{scriptFilename}.
+@code{pcb [OPTION ...] [LAYOUT-FILE.pcb]} to start the application in GUI mode,
 
-@vindex size
-@cindex size of a layout
-@cindex layout size
-@findex -size
-@item -size <width>x<height>
-Overrides the resource @emph{size} which determines the maximum size
-of a layout.
+@noindent or
 
-@vindex volume
-@cindex speaker volume
-@cindex volume of speaker
-@findex -v
-@item -v value
-Sets the volume of the X speaker. The value is passed to @code{XBell()} and
-must be in the range -100..100.
+@code{pcb [-h | -V | --copyright]} for a list of options, version, and copyright,
 
-@end table
+@noindent or
 
+@code{pcb -p [OPTION ...] [LAYOUT-FILE.pcb]} to print a layout,
 
-@node Special Options
-@section Special Options
+@noindent or
 
-There are some special options available in addition to normal command line
-options. Each of these must be the only option specified on a command line.
-The available special options are:
+@code{pcb -x HID [OPTION ...] [LAYOUT-FILE.pcb]} to export.
 
+@noindent Possible values for the parameter @samp{HID} are:
 @table @samp
+   @item bom
+    Export a bill of materials
+   @item gerber
+    Export RS-274X (Gerber)
+   @item nelma
+    Numerical analysis package export
+   @item png
+    export GIF/JPEG/PNG
+   @item ps
+    export postscript
+   @item eps
+    export encapsulated postscript
+@end table
 
-@findex -copyright
-@findex --copyright
-@cindex copyright
-@item -copyright
-Prints out the copyright notice and terminates.
-
-@findex -version
-@cindex release, current
-@cindex version, current
-@item -version
-Prints out the version ID and terminates.
-
-@findex -help
-@item -help
-Prints out the usage message and terminates.
+@noindent There are several resources which may be set or reset in addition to the
+standard toolkit command-line options. For a complete list refer to
+@ref{Resources}.
 
-@end table
+@include options.texi
 
 
 @c --------------------------- chapter 5 -------------------------------
diff --git a/src/hid/bom/bom.c b/src/hid/bom/bom.c
index 08d4328..d4cab46 100644
--- a/src/hid/bom/bom.c
+++ b/src/hid/bom/bom.c
@@ -25,12 +25,36 @@
 RCSID ("$Id$");
 
 static HID_Attribute bom_options[] = {
-  {"bomfile", "BOM output file",
+
+/* %start-doc options "8 BOM Creation"
+@ftable @code
+@item --bomfile <string>
+Name of the BOM output file.
+@end ftable
+%end-doc
+*/
+  {"bomfile", "Name of the BOM output file",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_bomfile 0
-  {"xyfile", "XY output file",
+
+/* %start-doc options "8 BOM Creation"
+@ftable @code
+@item --xyfile <string>
+Name of the XY output file.
+@end ftable
+%end-doc
+*/
+  {"xyfile", "Name of the XY output file",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_xyfile 1
+
+/* %start-doc options "8 BOM Creation"
+@ftable @code
+@item --xy-in-mm
+XY dimensions in mm instead of mils.
+@end ftable
+%end-doc
+*/
   {"xy-in-mm", "XY dimensions in mm instead of mils",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_xymm 2
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index e68026d..8094ed9 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -273,13 +273,37 @@ static int print_layer[MAX_LAYER];
 static int lastX, lastY;	/* the last X and Y coordinate */
 
 static HID_Attribute gerber_options[] = {
+
+/* %start-doc options "90 Gerber Export"
+@ftable @code
+@item --gerberfile
+Gerber output file prefix. Can include a path.
+@end ftable
+%end-doc
+*/
   {"gerberfile", "Gerber output file base",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_gerberfile 0
-  {"all-layers", "Print all layers, even empty ones",
+
+/* %start-doc options "90 Gerber Export"
+@ftable @code
+@item --all-layers
+Output contains all layers, even empty ones.
+@end ftable
+%end-doc
+*/
+  {"all-layers", "Output all layers, even empty ones.",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_all_layers 1
-  {"verbose", "print file names and aperture counts",
+
+/* %start-doc options "90 Gerber Export"
+@ftable @code
+@item --verbose
+Print file names and aperture counts on stdout.
+@end ftable
+%end-doc
+*/
+  {"verbose", "Print file names and aperture counts on stdout.",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_verbose 2
 };
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index b950a25..0b07f12 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2592,10 +2592,27 @@ ghid_create_listener (void)
 /* ------------------------------------------------------------ */
 static int stdin_listen = 0;
 HID_Attribute ghid_attribute_list[] = {
+
+/* %start-doc options "11 Top Window Options"
+@ftable @code
+@item --listen
+Listen for actions on stdin.
+@end ftable
+%end-doc
+*/
   {"listen", "Listen for actions on stdin",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, &stdin_listen},
 #define HA_listen 0
 
+/* %start-doc options "11 Top Window Options"
+@ftable @code
+@item --bg-image <string>
+File name of an image to put into the background of the GUI canvas. The image must
+be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
+automatically scaled to fit the canvas.
+@end ftable
+%end-doc
+*/
   {"bg-image", "Background Image",
    HID_String, 0, 0, {0, 0, 0}, 0, &bg_image_file},
 #define HA_bg_image 1
@@ -2903,6 +2920,13 @@ REGISTER_ACTIONS (gtk_topwindow_action_list)
 static char *pcbmenu_path = "gpcb-menu.res";
 
 static HID_Attribute pcbmenu_attr[] = {
+/* %start-doc options "11 Top Window Options"
+@ftable @code
+@item --pcb-menu <string>
+Location of the @file{gpcb-menu.res} file which defines the menu for the GTK GUI.
+@end ftable
+%end-doc
+*/
 {"pcb-menu", "Location of gpcb-menu.res file",
    HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
 };
diff --git a/src/hid/lpr/lpr.c b/src/hid/lpr/lpr.c
index cf35d8b..9a2529e 100644
--- a/src/hid/lpr/lpr.c
+++ b/src/hid/lpr/lpr.c
@@ -27,7 +27,18 @@ RCSID ("$Id$");
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented PS function %s.\n", __FUNCTION__); abort()
 
 static HID_Attribute base_lpr_options[] = {
-  {"lprcommand", "Command to print",
+
+/* %start-doc options "98 lpr Printing Options"
+@ftable @code
+@item --lprcommand <string>
+Command to use for printing. Defaults to @code{lpr}. This can be used to produce 
+PDF output with a virtual PDF printer. Example: @* 
+@code{--lprcommand "lp -d CUPS-PDF-Printer"}.
+@end ftable
+@noindent In addition, all postscript options are valid. 
+%end-doc
+*/
+  {"lprcommand", "Command to use for printing",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_lprcommand 0
 };
diff --git a/src/hid/nelma/nelma.c b/src/hid/nelma/nelma.c
index ee3a896..3de1d1d 100644
--- a/src/hid/nelma/nelma.c
+++ b/src/hid/nelma/nelma.c
@@ -150,22 +150,58 @@ static const double nelma_air_epsilon = 8.85e-12;
 
 HID_Attribute   nelma_attribute_list[] = {
 	/* other HIDs expect this to be first.  */
+  
+/* %start-doc options "nelma Options"
+@ftable @code
+@item -- basename <string>
+File name prefix.
+@end ftable
+%end-doc
+*/
 	{"basename", "File name prefix",
 	HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_basename 0
-
+  
+/* %start-doc options "nelma Options"
+@ftable @code
+@item --dpi <num>
+Horizontal scale factor (grid points/inch).
+@end ftable
+%end-doc
+*/
 	{"dpi", "Horizontal scale factor (grid points/inch).",
 	HID_Integer, 0, 1000, {100, 0, 0}, 0, 0},
 #define HA_dpi 1
 
+/* %start-doc options "nelma Options"
+@ftable @code
+@item --copper-height <num>
+Copper layer height (um).
+@end ftable
+%end-doc
+*/
 	{"copper-height", "Copper layer height (um).",
 	HID_Integer, 0, 200, {100, 0, 0}, 0, 0},
 #define HA_copperh 2
 
+/* %start-doc options "nelma Options"
+@ftable @code
+@item --substrate-height <num>
+Substrate layer height (um).
+@end ftable
+%end-doc
+*/
 	{"substrate-height", "Substrate layer height (um).",
 	HID_Integer, 0, 10000, {2000, 0, 0}, 0, 0},
 #define HA_substrateh 3
 
+/* %start-doc options "nelma Options"
+@ftable @code
+@item --substrate-epsilon <num>
+Substrate relative epsilon.
+@end ftable
+%end-doc
+*/
 	{"substrate-epsilon", "Substrate relative epsilon.",
 	HID_Real, 0, 100, {0, 0, 4.0}, 0, 0},
 #define HA_substratee 4
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index c407840..89bb97b 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -139,58 +139,161 @@ static const char *filetypes[] = {
 
 HID_Attribute png_attribute_list[] = {
   /* other HIDs expect this to be first.  */
+
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --outfile <string>
+Name of the file to be exported to. Can contain a path.
+@end ftable
+%end-doc
+*/
   {"outfile", "Graphics output file",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_pngfile 0
 
-  {"dpi", "Scale factor (pixels/inch). 0 to scale to fix specified size",
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --dpi
+Scale factor in pixels/inch. Set to 0 to scale to size specified in the layout.
+@end ftable
+%end-doc
+*/
+  {"dpi", "Scale factor (pixels/inch). 0 to scale to specified size",
    HID_Integer, 0, 1000, {100, 0, 0}, 0, 0},
 #define HA_dpi 1
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --x-max
+Width of the png image in pixels. No constraint, when set to 0.
+@end ftable
+%end-doc
+*/
   {"x-max", "Maximum width (pixels).  0 to not constrain.",
    HID_Integer, 0, 10000, {0, 0, 0}, 0, 0},
 #define HA_xmax 2
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --y-max
+Height of the png output in pixels. No constraint, when set to 0.
+@end ftable
+%end-doc
+*/
   {"y-max", "Maximum height (pixels).  0 to not constrain.",
    HID_Integer, 0, 10000, {0, 0, 0}, 0, 0},
 #define HA_ymax 3
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --xy-max
+Maximum width and height of the PNG output in pixels. No constraint, when set to 0.
+@end ftable
+%end-doc
+*/
   {"xy-max", "Maximum width and height (pixels).  0 to not constrain.",
    HID_Integer, 0, 10000, {0, 0, 0}, 0, 0},
 #define HA_xymax 4
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --as-shown
+Export layers as shown on screen.
+@end ftable
+%end-doc
+*/
   {"as-shown", "Export layers as shown on screen",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_as_shown 5
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --monochrome
+Convert output to monochrome.  
+@end ftable
+%end-doc
+*/
   {"monochrome", "Convert to monochrome",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_mono 6
 
-  {"only-visible", "Limit the bounds of the PNG file to the visible items",
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --only-vivible
+Limit the bounds of the exported PNG image to the visible items.
+@end ftable
+%end-doc
+*/
+  {"only-visible", "Limit the bounds of the PNG image to the visible items",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_only_visible 7
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --use-alpha
+Make the background and any holes transparent.
+@end ftable
+%end-doc
+*/
   {"use-alpha", "Make the background and any holes transparent",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_use_alpha 8
 
-  {"format", "Graphics file format",
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --format <string>
+File format to be exported. Parameter @code{<string>} can be @samp{PNG}, @samp{GIF}, 
+or @samp{JPEG}.
+@end ftable
+%end-doc
+*/
+  {"format", "Export file format",
    HID_Enum, 0, 0, {2, 0, 0}, filetypes, 0},
 #define HA_filetype 9
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --png-bloat <num><dim>
+Amount of extra thickness to add to traces, pads, or pin edges. The parameter 
+@samp{<num><dim>} is a number, appended by a dimension @samp{mm}, @samp{mil}, or
+@samp{pix}. If no dimension is given, the default dimension is 1/100 mil.
+@end ftable
+%end-doc
+*/
   {"png-bloat", "Amount (in/mm/mil/pix) to add to trace/pad/pin edges (1 = 1/100 mil)",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_bloat 10
 
-  {"photo-mode", "Photo-realistic mode",
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@cindex photo-mode
+@item --photo-mode
+Export a photo realistic image of the layout.
+@end ftable
+%end-doc
+*/
+  {"photo-mode", "Photo-realistic export mode",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_photo_mode 11
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --photo-flip-x
+In photo-realistic mode, export the reverse side of the layout. Left-right flip.
+@end ftable
+%end-doc
+*/
   {"photo-flip-x", "Show reverse side of the board, left-right flip",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_photo_flip_x 12
 
+/* %start-doc options "93 PNG Options"
+@ftable @code
+@item --photo-flip-y
+In photo-realistic mode, export the reverse side of the layout. Up-down flip.
+@end ftable
+%end-doc
+*/
   {"photo-flip-y", "Show reverse side of the board, up-down flip",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_photo_flip_y 13
diff --git a/src/hid/ps/eps.c b/src/hid/ps/eps.c
index 2115b47..89515e9 100644
--- a/src/hid/ps/eps.c
+++ b/src/hid/ps/eps.c
@@ -47,18 +47,60 @@ static int fast_erase = -1;
 
 static HID_Attribute eps_attribute_list[] = {
   /* other HIDs expect this to be first.  */
+
+/* %start-doc options "92 Encapsulated Postscript Export"
+@ftable @code
+@item --eps-file <string>
+Name of the encapsulated postscript output file. Can contain a path.
+@end ftable
+%end-doc
+*/
   {"eps-file", "Encapsulated Postscript output file",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_psfile 0
+
+/* %start-doc options "92 Encapsulated Postscript Export"
+@ftable @code
+@item --eps-scale <num>
+Scale EPS output by the parameter @samp{num}.
+@end ftable
+%end-doc
+*/
   {"eps-scale", "EPS scale",
    HID_Real, 0, 100, {0, 0, 1.0}, 0, 0},
 #define HA_scale 1
+
+/* %start-doc options "92 Encapsulated Postscript Export"
+@ftable @code
+@cindex as-shown (EPS)
+@item --as-shown
+Export layers as shown on screen.
+@end ftable
+%end-doc
+*/
   {"as-shown", "Export layers as shown on screen",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_as_shown 2
-  {"monochrome", "Convert to monochrome (like the ps export)",
+
+/* %start-doc options "92 Encapsulated Postscript Export"
+@ftable @code
+@item --monochrome
+Convert output to monochrome.
+@end ftable
+%end-doc
+*/
+  {"monochrome", "Convert to monochrome.",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_mono 3
+
+/* %start-doc options "92 Encapsulated Postscript Export"
+@ftable @code
+@cindex only-visible
+@item --only-visible
+Limit the bounds of the EPS file to the visible items.
+@end ftable
+%end-doc
+*/
   {"only-visible", "Limit the bounds of the EPS file to the visible items",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_only_visible 4
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index fdbf7ac..1be608e 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -153,57 +153,211 @@ static MediaType media_data[] = {
 
 HID_Attribute ps_attribute_list[] = {
   /* other HIDs expect this to be first.  */
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --psfile <string>
+Name of the postscript output file. Can contain a path.
+@end ftable
+%end-doc
+*/
   {"psfile", "Postscript output file",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_psfile 0
-  {"drill-helper", "Prints a centering target in large drill holes",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex drill-helper
+@item --drill-helper
+Print a centering target in large drill holes.
+@end ftable
+%end-doc
+*/
+  {"drill-helper", "Print a centering target in large drill holes",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_drillhelper 1
-  {"align-marks", "Prints alignment marks on each layer",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex align-marks
+@item --align-marks
+Print alignment marks on each sheet. This is meant to ease alignment during exposure.
+@end ftable
+%end-doc
+*/
+  {"align-marks", "Print alignment marks on each sheet",
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_alignmarks 2
-  {"outline", "Prints outline on each layer",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --outline
+Print the contents of the outline layer on each sheet.
+@end ftable
+%end-doc
+*/
+  {"outline", "Print outline on each sheet",
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_outline 3
-  {"mirror", "Prints mirror image of each layer",
+  /* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --mirror
+Print mirror image.
+@end ftable
+%end-doc
+*/
+  {"mirror", "Print mirror image of every page",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_mirror 4
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --fill-page
+Scale output to make the board fit the page.
+@end ftable
+%end-doc
+*/
   {"fill-page", "Scale board to fill page",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_fillpage 5
-  {"auto-mirror", "Prints mirror image of appropriate layers",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --auto-mirror
+Print mirror image of appropriate layers.
+@end ftable
+%end-doc
+*/
+  {"auto-mirror", "Print mirror image of appropriate layers",
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_automirror 6
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --ps-color
+Postscript output in color.
+@end ftable
+%end-doc
+*/
   {"ps-color", "Prints in color",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_color 7
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex ps-bloat
+@item --ps-bloat <num>
+Amount to add to trace/pad/pin edges (1 = 1/100 mil).
+@end ftable
+%end-doc
+*/
   {"ps-bloat", "Amount to add to trace/pad/pin edges (1 = 1/100 mil)",
    HID_Integer, -10000, 10000, {0, 0, 0}, 0, 0},
 #define HA_psbloat 8
-  {"ps-invert", "Draw images as white-on-black",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex ps-invert
+@item --ps-invert
+Draw objects as white-on-black.
+@end ftable
+%end-doc
+*/
+ {"ps-invert", "Draw objects as white-on-black",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_psinvert 9
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --media <media-name>
+Size of the media, the postscript is fitted to. The parameter @code{<media-name>} 
+can be any of the standard names for paper size: @samp{A0} to @samp{A10}, 
+@samp{B0} to @samp{B10}, @samp{Letter}, @samp{11x17}, @samp{Ledger}, @samp{Legal}, 
+@samp{Executive}, @samp{A-Size}, @samp{B-size}, @samp{C-Size}, @samp{D-size}, 
+@samp{E-size}, @samp{US-Business_Card}, @samp{Intl-Business_Card}.
+@end ftable
+%end-doc
+*/
   {"media", "media type",
    HID_Enum, 0, 0, {22, 0, 0}, medias, 0},
 #define HA_media 10
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex psfade
+@item --psfade <num>
+Fade amount for assembly drawings (0.0=missing, 1.0=solid).
+@end ftable
+%end-doc
+*/
   {"psfade", "Fade amount for assembly drawings (0.0=missing, 1.0=solid)",
    HID_Real, 0, 1, {0, 0, 0.40}, 0, 0},
 #define HA_psfade 11
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --scale <num>
+Scale value to compensate for printer sizing errors (1.0 = full scale).
+@end ftable
+%end-doc
+*/
   {"scale", "Scale value to compensate for printer sizing errors (1.0 = full scale)",
    HID_Real, 0.01, 4, {0, 0, 1.00}, 0, 0},
 #define HA_scale 12
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex multi-file
+@item --multi-file
+Produce multiple files, one per page, instead of a single multi page file.
+@end ftable
+%end-doc
+*/
   {"multi-file", "Produce multiple files, one per page, instead of a single file.",
    HID_Boolean, 0, 0, {0, 0, 0.40}, 0, 0},
 #define HA_multifile 13
-  {"xcalib", "X-Axis calibration (paper width).",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --xcalib <num>
+Paper width. Used for x-Axis calibration.
+@end ftable
+%end-doc
+*/
+  {"xcalib", "Paper width. Used for x-Axis calibration.",
    HID_Real, 0, 0, {0, 0, 1.0}, 0, 0},
 #define HA_xcalib 14
-  {"ycalib", "Y-Axis calibration (paper height).",
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --ycalib <num>
+Paper height. Used for y-Axis calibration.
+@end ftable
+%end-doc
+*/
+  {"ycalib", "Paper height. Used for y-Axis calibration .",
    HID_Real, 0, 0, {0, 0, 1.0}, 0, 0},
 #define HA_ycalib 15
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@item --drill-copper
+Draw drill holes in pins / vias, instead of leaving solid copper.
+@end ftable
+%end-doc
+*/
   {"drill-copper", "Draw drill holes in pins / vias, instead of leaving solid copper.",
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_drillcopper 16
+
+/* %start-doc options "91 Postscript Export"
+@ftable @code
+@cindex show-legend
+@item --show-legend
+Print file name and scale on printout.
+@end ftable
+%end-doc
+*/
   {"show-legend", "Print file name and scale on printout",
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_legend 17
diff --git a/src/main.c b/src/main.c
index b25093e..87d86fd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -378,52 +378,276 @@ static int show_actions = 0;
 static int do_dump_actions = 0;
 
 HID_Attribute main_attribute_list[] = {
-  {"help", "Show Help", HID_Boolean, 0, 0, {0, 0, 0}, 0, &show_help},
-  {"version", "Show Version", HID_Boolean, 0, 0, {0, 0, 0}, 0, &show_version},
-  {"verbose", "Be verbose", HID_Boolean, 0, 0, {0, 0, 0}, 0,
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --help
+Show help on command line options.
+@end ftable
+%end-doc
+*/
+  {"help", "Show help on command line options.", HID_Boolean, 0, 0, {0, 0, 0}, 0, 
+  &show_help},
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --version
+Show version.
+@end ftable
+%end-doc
+*/
+  {"version", "Show version", HID_Boolean, 0, 0, {0, 0, 0}, 0, &show_version},
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --verbose
+Be verbose on stdout.
+@end ftable
+%end-doc
+*/
+  {"verbose", "Be verbose on stdout.", HID_Boolean, 0, 0, {0, 0, 0}, 0,
    &Settings.verbose},
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --copyright
+Show copyright.
+@end ftable
+%end-doc
+*/
   {"copyright", "Show Copyright", HID_Boolean, 0, 0, {0, 0, 0}, 0,
    &show_copyright},
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --show-defaults
+Show option defaults.
+@end ftable
+%end-doc
+*/
   {"show-defaults", "Show option defaults", HID_Boolean, 0, 0, {0, 0, 0}, 0,
    &show_defaults},
-  {"show-actions", "Show actions", HID_Boolean, 0, 0, {0, 0, 0}, 0,
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --show-actions
+Show available actions and exit.
+@end ftable
+%end-doc
+*/
+  {"show-actions", "Show available actions.", HID_Boolean, 0, 0, {0, 0, 0}, 0,
    &show_actions},
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --dump-actions
+Dump actions (for documentation).
+@end ftable
+%end-doc
+*/
   {"dump-actions", "Dump actions (for documentation)", HID_Boolean, 0, 0,
    {0, 0, 0}, 0,
    &do_dump_actions},
 
-  BSET (grid_units_mm, 0, "grid-units-mm", 0),
 
-  COLOR (BlackColor, "#000000", "black-color", "color for black"),
-  COLOR (WhiteColor, "#ffffff", "white-color", "color for white"),
+/* %start-doc options "1 Options"
+@ftable @code
+@item --grid-units-mm
+Grid units are metric on start-up.
+@end ftable
+%end-doc
+*/
+  BSET (grid_units_mm, 0, "grid-units-mm", "Grid units are metric on start-up."),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --black-color <string>
+Color value for black. Default: @samp{#000000}
+@end ftable
+%end-doc
+*/
+  COLOR (BlackColor, "#000000", "black-color", "color value of 'black'."),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --black-color <string>
+Color value for white. Default: @samp{#ffffff}
+@end ftable
+%end-doc
+*/
+  COLOR (WhiteColor, "#ffffff", "white-color", "color value for white"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --background-color <string>
+Color of the background of the canvas. Default: @samp{#e5e5e5}
+@end ftable
+%end-doc
+*/
   COLOR (BackgroundColor, "#e5e5e5", "background-color",
 	 "color for background"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --crosshair-color <string>
+Color of the crosshair. Default: @samp{#ff0000}
+@end ftable
+%end-doc
+*/
   COLOR (CrosshairColor, "#ff0000", "crosshair-color",
 	 "color for the crosshair"),
-  COLOR (CrossColor, "#cdcd00", "cross-color", "color for cross"),
-  COLOR (ViaColor, "#7f7f7f", "via-color", "color for vias"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --cross-color <string>
+Color of the cross. Default: @samp{#cdcd00}
+@end ftable
+%end-doc
+*/
+  COLOR (CrossColor, "#cdcd00", "cross-color", "color of the cross"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --via-color <string>
+Color of vias. Default: @samp{#7f7f7f}
+@end ftable
+%end-doc
+*/
+  COLOR (ViaColor, "#7f7f7f", "via-color", "color of vias"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --via-selected-color <string>
+Color of selected vias. Default: @samp{#00ffff}
+@end ftable
+%end-doc
+*/
   COLOR (ViaSelectedColor, "#00ffff", "via-selected-color",
 	 "color for selected vias"),
-  COLOR (PinColor, "#4d4d4d", "pin-color", "color for pins"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --pin-color <string>
+Color of pins. Default: @samp{#4d4d4d}
+@end ftable
+%end-doc
+*/
+  COLOR (PinColor, "#4d4d4d", "pin-color", "color of pins"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --pin-selected-color <string>
+Color of selected pins . Default: @samp{#00ffff}
+@end ftable
+%end-doc
+*/
   COLOR (PinSelectedColor, "#00ffff", "pin-selected-color",
-	 "color for selected pins"),
+	 "color of selected pins"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --pin-name-color <string>
+Color of pin names and pin numbers. Default: @samp{#ff0000}
+@end ftable
+%end-doc
+*/
   COLOR (PinNameColor, "#ff0000", "pin-name-color",
-	 "color for pin names and numbers"),
-  COLOR (ElementColor, "#000000", "element-color", "color for elements"),
-  COLOR (RatColor, "#b8860b", "rat-color", "color for ratlines"),
+	 "color for pin names and pin numbers"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --element-color <string>
+Color of components. Default: @samp{#000000}
+@end ftable
+%end-doc
+*/
+  COLOR (ElementColor, "#000000", "element-color", "color of components"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --rat-color <string>
+Color of ratlines. Default: @samp{#b8860b}
+@end ftable
+%end-doc
+*/
+  COLOR (RatColor, "#b8860b", "rat-color", "color of ratlines"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --invisible-objects-color <string>
+Color of invisible objects. Default: @samp{#cccccc}
+@end ftable
+%end-doc
+*/
   COLOR (InvisibleObjectsColor, "#cccccc", "invisible-objects-color",
-	 "color for invisible objects"),
+	 "color of invisible objects"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --invisible-mark-color <string>
+Color of invisible marks. Default: @samp{#cccccc}
+@end ftable
+%end-doc
+*/
   COLOR (InvisibleMarkColor, "#cccccc", "invisible-mark-color",
-	 "color for invisible marks"),
+	 "color of invisible marks"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --element-selected-color <string>
+Color of selected components. Default: @samp{#00ffff}
+@end ftable
+%end-doc
+*/
   COLOR (ElementSelectedColor, "#00ffff", "element-selected-color",
-	 "color for selected elements"),
+	 "color of selected components"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --rat-selected-color <string>
+Color of selected rats. Default: @samp{#00ffff}
+@end ftable
+%end-doc
+*/
   COLOR (RatSelectedColor, "#00ffff", "rat-selected-color",
-	 "color for selected rats"),
+	 "color of selected rats"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --connected-color <string>
+Color to indicate connections. Default: @samp{#00ff00}
+@end ftable
+%end-doc
+*/
   COLOR (ConnectedColor, "#00ff00", "connected-color",
-	 "color for connections"),
+	 "color to indicate connections"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --off-limit-color <string>
+Color of off-canvas area. Default: @samp{#cccccc}
+@end ftable
+%end-doc
+*/
   COLOR (OffLimitColor, "#cccccc", "off-limit-color",
-	 "color for off-limits areas"),
-  COLOR (GridColor, "#ff0000", "grid-color", "color for the grid"),
+	 "color of off-canvas area"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --grid-color <string>
+Color of the grid. Default: @samp{#ff0000}
+@end ftable
+%end-doc
+*/
+  COLOR (GridColor, "#ff0000", "grid-color", "color of the grid"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --layer-color-<n> <string>
+Color of layer @code{<n>}, where @code{<n>} is an integer from 1 to 16.
+@end ftable
+%end-doc
+*/
   LAYERCOLOR (1, "#8b2323"),
   LAYERCOLOR (2, "#3a5fcd"),
   LAYERCOLOR (3, "#104e8b"),
@@ -440,6 +664,13 @@ HID_Attribute main_attribute_list[] = {
   LAYERCOLOR (14, "#8b7355"),
   LAYERCOLOR (15, "#00868b"),
   LAYERCOLOR (16, "#228b22"),
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --layer-selected-color-<n> <string>
+Color of layer @code{<n>}, when selected. @code{<n>} is an integer from 1 to 16.
+@end ftable
+%end-doc
+*/
   LAYERSELCOLOR (1),
   LAYERSELCOLOR (2),
   LAYERSELCOLOR (3),
@@ -456,100 +687,744 @@ HID_Attribute main_attribute_list[] = {
   LAYERSELCOLOR (14),
   LAYERSELCOLOR (15),
   LAYERSELCOLOR (16),
-  COLOR (WarnColor, "#ff8000", "warn-color", "color for warnings"),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --warn-color <string>
+Color of offending objects during DRC. Default value is @code{"#ff8000"}
+@end ftable
+%end-doc
+*/
+  COLOR (WarnColor, "#ff8000", "warn-color", "Color of offending objects during DRC."),
+
+/* %start-doc options "3 Colors"
+@ftable @code
+@item --mask-color <string>
+Color of the mask layer. Default value is @code{"#ff0000"}
+@end ftable
+%end-doc
+*/
   COLOR (MaskColor, "#ff0000", "mask-color", "color for solder mask"),
 
-  ISET (ViaThickness, 6000, "via-thickness", 0),
-  ISET (ViaDrillingHole, 2800, "via-drilling-hole", 0),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --via-thickness <num>
+Default diameter of vias in 1/100 mil. Default value is @code{6000}
+@end ftable
+%end-doc
+*/
+  ISET (ViaThickness, 6000, "via-thickness", 
+             "Default diameter of vias in 1/100 mil"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --via-drilling-hole <num>
+Default diameter of holes in 1/100 mil. Default value is @code{2800}
+@end ftable
+%end-doc
+*/
+  ISET (ViaDrillingHole, 2800, "via-drilling-hole", "Default diameter of holes"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --line-thickness <num>
+Default thickness of new lines in 1/100 mil. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
   ISET (LineThickness, 1000, "line-thickness",
 	"Initial thickness of new lines."),
-  ISET (RatThickness, 1000, "rat-thickness", 0),
-  ISET (Keepaway, 1000, "keepaway", 0),
-  ISET (MaxWidth, 600000, "default-PCB-width", 0),
-  ISET (MaxHeight, 500000, "default-PCB-height", 0),
-  ISET (TextScale, 100, "text-scale", 0),
-  ISET (AlignmentDistance, 200, "alignment-distance", 0),
-  ISET (Bloat, 1000, "bloat", 0),
-  ISET (Shrink, 1000, "shrink", 0),
-  ISET (minWid, 1000, "min-width", "DRC minimum copper spacing"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --rat-thickness <num>
+Thickness of rats. Values from 1 to 19 are fixed width in screen pixels.
+Anything larger means PCB units (i.e. 100 means "1 mil"). Default value
+is @code{1000}.
+@end ftable
+%end-doc
+*/
+  ISET (RatThickness, 1000, "rat-thickness", "Thickness of rats."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --keepaway <num>
+Default minimum distance between a track and adjacent copper in 1/100 mil.
+Default value is @code{1000}.
+@end ftable
+%end-doc
+*/
+  ISET (Keepaway, 1000, "keepaway", "Minimum distance between adjacent copper"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --default-PCB-width <num>
+Default width of the canvas in 1/100 mil. Default value is @code{600000}
+@end ftable
+%end-doc
+*/
+  ISET (MaxWidth, 600000, "default-PCB-width", "Default width of the canvas"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --default-PCB-height <num>
+Default height of the canvas in 1/100 mil. Default value is @code{500000}
+@end ftable
+%end-doc
+*/
+  ISET (MaxHeight, 500000, "default-PCB-height", "Default height of the canvas"),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --text-scale <num>
+Default text scale. Default value is @code{100}
+@end ftable
+%end-doc
+*/
+  ISET (TextScale, 100, "text-scale", "Default text scale." ),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --alignment-distance <num>
+Specifies the distance between the boards outline and alignment targets.
+Default value is @code{200}
+@end ftable
+%end-doc
+*/
+  ISET (AlignmentDistance, 200, "alignment-distance", 
+  "distance between the boards outline and alignment targets"),
+
+/* %start-doc options "7 DRC Options"
+The unit of all design rule options (DRC) is 1/100 mil.
+%end-doc
+*/
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --bloat <num>
+Minimum spacing. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
+  ISET (Bloat, 1000, "bloat", "DRC minimum spacing in 1/100 mil."),
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --shrink <num>
+Minimum touching overlap. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
+  ISET (Shrink, 1000, "shrink", "DRC minimum overlap in 1/100 mils"),
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --min-width <num>
+Minimum width of copper. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
+  ISET (minWid, 1000, "min-width", "DRC minimum copper width"),
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --min-silk <num>
+Minimum width of lines in silk. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
   ISET (minSlk, 1000, "min-silk", "DRC minimum silk width"),
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --min-drill <num>
+Minimum diameter of holes. Default value is @code{100}
+@end ftable
+%end-doc
+*/
   ISET (minDrill, 1500, "min-drill", "DRC minimum drill diameter"),
+
+/* %start-doc options "7 DRC Options"
+@ftable @code
+@item --min-ring <num>
+ Minimum width of annular ring. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
   ISET (minRing, 1000, "min-ring", "DRC minimum annular ring"),
 
-  RSET (Grid, 1000, "grid", 0),
-  RSET (grid_increment_mm, 0.1, "grid-increment-mm", 0),
-  RSET (grid_increment_mil, 5.0, "grid-increment-mil", 0),
-  RSET (size_increment_mm, 0.2, "size-increment-mm", 0),
-  RSET (size_increment_mil, 10.0, "size-increment-mil", 0),
-  RSET (line_increment_mm, 0.1, "line-increment-mm", 0),
-  RSET (line_increment_mil, 5.0, "line-increment-mil", 0),
-  RSET (clear_increment_mm, 0.05, "clear-increment-mm", 0),
-  RSET (clear_increment_mil, 2.0, "clear-increment-mil", 0),
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --grid <num>
+Initial grid size in 1/100 mil. Default value is @code{1000}
+@end ftable
+%end-doc
+*/
+  RSET (Grid, 1000, "grid", "Initial grid size in 1/100 mil."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --grid-increment-mm <num>
+Metric grid increment in mm. Default value is @code{0.1}
+@end ftable
+%end-doc
+*/
+  RSET (grid_increment_mm, 0.1, "grid-increment-mm", 
+                             "Metric grid increment in mm."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --grid-increment-mil <num>
+Imperial grid increment in mil. Default value is @code{5.0}
+@end ftable
+%end-doc
+*/
+  RSET (grid_increment_mil, 5.0, "grid-increment-mil", 
+                          "Imperial grid increment in mil."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --size-increment-mm <num>
+Metric increment of object size in mm. Default value is @code{0.2}
+@end ftable
+%end-doc
+*/
+  RSET (size_increment_mm, 0.2, "size-increment-mm", 
+                  "Metric increment of object size in mm."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --size-increment-mil <num>
+Imperial increment of object size in mil. Default value is @code{10.0}
+@end ftable
+%end-doc
+*/
+  RSET (size_increment_mil, 10.0, "size-increment-mil", 
+                "Imperial increment of object size in mil."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --line-increment-mm <num>
+Metric increment of line width in mm. Default value is @code{0.1}
+@end ftable
+%end-doc
+*/
+  RSET (line_increment_mm, 0.1, "line-increment-mm", 
+                      "Metric increment of line width in mm."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --line-increment-mil <num>
+Imperial increment of line width in mil. Default value is @code{5.0}
+@end ftable
+%end-doc
+*/
+  RSET (line_increment_mil, 5.0, "line-increment-mil", 
+                    "Imperial increment of line width in mil."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --clear-increment-mm <num>
+Metric increment of track clearence in mm. Default value is @code{0.05}
+@end ftable
+%end-doc
+*/
+  RSET (clear_increment_mm, 0.05, "clear-increment-mm", 
+                  "Metric increment of track clearence in mm."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --clear-increment-mil <num>
+Imperial increment of track clearence in mil. Default value is @code{2.0}
+@end ftable
+%end-doc
+*/
+  RSET (clear_increment_mil, 2.0, "clear-increment-mil", 
+                "Imperial increment of track clearence in mil."),
+
+/* %start-doc options "5 Sizes"
+@ftable @code
+@item --minimum polygon area <num>
+Minimum polygon area in 1/100 mil.
+@end ftable
+%end-doc
+*/
   RSET (IsleArea, 200000000, "minimum polygon area", 0),
 
-  ISET (BackupInterval, 60, "backup-interval", 0),
-
+/* %start-doc options "1 Options"
+@ftable @code
+@item --backup-interval 
+Time between automatic backups in seconds. Set to @code{60} to disable.
+The default value is @code{60}.
+@end ftable
+%end-doc
+*/
+  ISET (BackupInterval, 60, "backup-interval", 
+              "Time between automatic backups in seconds. Set to 0 to disable."),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-1 <string>
+Name of the 1st Layer. Default is @code{"component"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (1, "component"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-2 <string>
+Name of the 2nd Layer. Default is @code{"solder"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (2, "solder"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-3 <string>
+Name of the 3rd Layer. Default is @code{"GND"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (3, "GND"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-4 <string>
+Name of the 4th Layer. Default is @code{"power"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (4, "power"),
+ 
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-5 <string>
+Name of the 5th Layer. Default is @code{"signal1"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (5, "signal1"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-6 <string>
+Name of the 6th Layer. Default is @code{"signal2"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (6, "signal2"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-7 <string>
+Name of the 7th Layer. Default is @code{"signal3"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (7, "signal3"),
+
+/* %start-doc options "4 Layer Names"
+@ftable @code
+@item --layer-name-8 <string>
+Name of the 8th Layer. Default is @code{"signal4"}.
+@end ftable
+%end-doc
+*/
   LAYERNAME (8, "signal4"),
 
+/* %start-doc options "6 Commands"
+pcb uses external commands for input output operations. These commands can be
+configured at start-up to meet local requirements. The command string may include
+special sequences @code{%f}, @code{%p} or @code{%a}. These are replaced when the
+command is called. The sequence @code{%f} is replaced by the file name,
+@code{%p} gets the path and @code{%a} indicates a package name. 
+%end-doc
+*/
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --font-command <string>
+Command to load a font.
+@end ftable
+%end-doc
+*/
   SSET (FontCommand, "",
-	"font-command", 0),
+	"font-command", "Command to load a font."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --file-command <string>
+Command to read a file.
+@end ftable
+%end-doc
+*/
   SSET (FileCommand, "", "file-command", "Command to read a file."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --element-command <string>
+Command to read a footprint. @*
+Defaults to @code{"M4PATH='%p';export M4PATH;echo 'include(%f)' | m4"}
+@end ftable
+%end-doc
+*/
   SSET (ElementCommand,
 	"M4PATH='%p';export M4PATH;echo 'include(%f)' | " GNUM4,
-	"element-command", 0),
-  SSET (PrintFile, "%f.output", "print-file", 0),
-  SSET (LibraryCommandDir, PCBLIBDIR, "lib-command-dir", 0),
+	"element-command", "Command to read a footprint."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --print-file <string>
+Command to print to a file.
+@end ftable
+%end-doc
+*/
+  SSET (PrintFile, "%f.output", "print-file", "Command to print to a file."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --lib-command-dir <string>
+Path to the command that queries the library.
+@end ftable
+%end-doc
+*/
+  SSET (LibraryCommandDir, PCBLIBDIR, "lib-command-dir",
+         "Path to the command that queries the library."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --lib-command <string>
+Command to query the library. @*
+Defaults to @code{"QueryLibrary.sh '%p' '%f' %a"}
+@end ftable
+%end-doc
+*/
   SSET (LibraryCommand, "QueryLibrary.sh '%p' '%f' %a",
-	"lib-command", 0),
+	"lib-command", "Command to query the library."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --lib-contents-command <string>
+Command to query the contents of the library. @*
+Defaults to @code{"ListLibraryContents.sh %p %f"}
+@end ftable
+%end-doc
+*/
   SSET (LibraryContentsCommand, "ListLibraryContents.sh '%p' '%f'",
-	"lib-contents-command", 0),
+	"lib-contents-command", "Command to query the contents of the library".),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --lib-newlib <string>
+Top level directory for the newlib style library.
+@end ftable
+%end-doc
+*/
   SSET (LibraryTree, PCBTREEPATH, "lib-newlib",
-	"Top level directory for the newlib style library"),
+	"Top level directory for the newlib style library."),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --save-command <string>
+Command to save to a file.
+@end ftable
+%end-doc
+*/
   SSET (SaveCommand, "", "save-command", 0),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --lib-name <string>
+The default filename for the library.
+@end ftable
+%end-doc
+*/
   SSET (LibraryFilename, LIBRARYFILENAME, "lib-name", 0),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --default-font <string>
+The name of the default font.
+@end ftable
+%end-doc
+*/
   SSET (FontFile, "default_font", "default-font",
 	"File name of default font."),
-  SSET (Groups, "1,c:2,s:3:4:5:6:7:8", "groups", 0),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --groups <string>
+Layer group string. Defaults to @code{"1,c:2,s:3:4:5:6:7:8"}.
+@end ftable
+%end-doc
+*/
+  SSET (Groups, "1,c:2,s:3:4:5:6:7:8", "groups", "Layer group string."),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --route-styles <string>
+A string that defines the route styles. Defaults to @*
+@code{"Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000
+	:Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600"}
+@end ftable
+%end-doc
+*/
   SSET (Routes, "Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000"
 	":Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600", "route-styles",
-	0),
+	"A string that defines the route styles."),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --file-path <string>
+A colon separated list of directories or commands (starts with '|'). The path
+is passed to the program specified in fileCommand together with the selected
+filename.
+@end ftable
+%end-doc
+*/
   SSET (FilePath, "", "file-path", 0),
-  SSET (RatCommand, "", "rat-command", 0),
-  SSET (FontPath, PCBLIBPATH, "font-path", 0),
-  SSET (ElementPath, PCBLIBPATH, "element-path", 0),
-  SSET (LibraryPath, PCBLIBPATH, "lib-path", 0),
+
+/* %start-doc options "6 Commands"
+@ftable @code
+@item --rat-command <string>
+Command for reading a netlist. Sequence @code{%f} is replaced by the netlist filename.
+@end ftable
+%end-doc
+*/
+  SSET (RatCommand, "", "rat-command", "Command for reading a netlist."),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --font-pat <string>
+A colon separated list of directories to search the default font. Defaults to
+the default library path.
+@end ftable
+%end-doc
+*/
+  SSET (FontPath, PCBLIBPATH, "font-path",
+       "Colon separated list of directories to search the default font" ),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --element-path <string>
+A colon separated list of directories or commands (starts with '|').
+The path is passed to the program specified in @option{--element-command}.
+@end ftable
+%end-doc
+*/
+  SSET (ElementPath, PCBLIBPATH, "element-path",
+       "A colon separated list of directories or commands (starts with '|')."),
+
+/* %start-doc options "5 Paths"
+@ftable @code
+@item --lib-path <string>
+A colon separated list of directories that will be passed to the commands specified
+by elementCommand and elementContentsCommand.
+@end ftable
+%end-doc
+*/
+  SSET (LibraryPath, PCBLIBPATH, "lib-path", "A colon separated list of directories"),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --menu-file <string>
+Name of the file that defines the menu with the lesstif GUI. Defaults to
+@file{pcb-menu.res}. For the GTK GUI, see @option{--pcb-menu}.
+@end ftable
+%end-doc
+*/
   SSET (MenuFile, "pcb-menu.res", "menu-file", 0),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --action-script <string>
+If set, this file is executed at startup.
+@end ftable
+%end-doc
+*/
   SSET (ScriptFilename, 0, "action-script",
 	"If set, this file is executed at startup."),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --action-string <string>
+If set, this string of actions is executed at startup.
+@end ftable
+%end-doc
+*/
   SSET (ActionString, 0, "action-string",
 	"If set, this is executed at startup."),
-  SSET (FabAuthor, "", "fab-author", 0),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --fab-author
+Name of author to be put in the Gerber files.
+@end ftable
+%end-doc
+*/
+  SSET (FabAuthor, "", "fab-author", "Name of author to be put in the Gerber files."),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --layer-stack <string>
+Initial layer stackup, for setting up an export. A comma separated list of layer 
+names, layer numbers and layer groups.
+@end ftable
+%end-doc
+*/
   SSET (InitialLayerStack, "", "layer-stack",
 	"Initial layer stackup, for setting up an export."),
 
-  ISET (PinoutOffsetX, 100, "pinout-offset-x", 0),
-  ISET (PinoutOffsetY, 100, "pinout-offset-y", 0),
-  ISET (PinoutTextOffsetX, 800, "pinout-text-offset-x", 0),
-  ISET (PinoutTextOffsetY, -100, "pinout-text-offset-y", 0),
-
-  BSET (DrawGrid, 0, "draw-grid", "default to drawing the grid at startup"),
-  BSET (ClearLine, 1, "clear-line", 0),
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --pinout-offset-x <num>
+Horizontal offset of the pin number display in mil. Defaults to @code{100}
+@end ftable
+%end-doc
+*/
+  ISET (PinoutOffsetX, 100, "pinout-offset-x",
+  "Horizontal offset of the pin number display in mil."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --pinout-offset-y <num>
+Vertical offset of the pin number display in mil. Defaults to @code{100}
+@end ftable
+%end-doc
+*/
+  ISET (PinoutOffsetY, 100, "pinout-offset-y",
+  "Vertical offset of the pin number display in mil."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --pinout-text-offset-x <num>
+Horizontal offset of the pin name display in mil. Defaults to @code{800}
+@end ftable
+%end-doc
+*/
+  ISET (PinoutTextOffsetX, 800, "pinout-text-offset-x",
+  "Horizontal offset of the pin name display in mil."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --pinout-text-offset-y <num>
+Vertical offset of the pin name display in mil. Defaults to @code{-100}
+@end ftable
+%end-doc
+*/
+  ISET (PinoutTextOffsetY, -100, "pinout-text-offset-y",
+  "Vertical offset of the pin name display in mil."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --draw-grid <string>
+If set, draw the grid at start-up.
+@end ftable
+%end-doc
+*/
+  BSET (DrawGrid, 0, "draw-grid", "If set, draw the grid at start-up"),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --clear-line
+If set, new lines clear polygons.
+@end ftable
+%end-doc
+*/
+  BSET (ClearLine, 1, "clear-line", "If set, new lines clear polygons."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --full-poly
+If set, new polygons are full ones.
+@end ftable
+%end-doc
+*/
   BSET (FullPoly, 0, "full-poly", 0),
-  BSET (UniqueNames, 1, "unique-names", 0),
-  BSET (SnapPin, 1, "snap-pin", 0),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --unique-names
+If set, you will not be permitted to change the name of an component to match that
+of another component.
+@end ftable
+%end-doc
+*/
+  BSET (UniqueNames, 1, "unique-names",
+  "Prevents identical component names."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --snap-pin
+If set, pin centers and pad end points are treated as additional grid points
+that the cursor can snap to.
+@end ftable
+%end-doc
+*/
+  BSET (SnapPin, 1, "snap-pin",
+  "If set, the cursor snaps to pads and pin centers."),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --save-last-command
+If set, the last user command is saved.
+@end ftable
+%end-doc
+*/
   BSET (SaveLastCommand, 0, "save-last-command", 0),
-  BSET (SaveInTMP, 0, "save-in-tmp", 0),
-  BSET (AllDirectionLines, 0, "all-direction-lines", 0),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --save-in-tmp
+If set, all data which would otherwise be lost are saved in a temporary file
+@file{/tmp/PCB.%i.save} . Sequence @samp{%i} is replaced by the process ID.
+@end ftable
+%end-doc
+*/
+  BSET (SaveInTMP, 0, "save-in-tmp",
+  "When set, all data which would otherwise be lost are saved in /tmp"),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --all-direction-lines
+Allow all directions, when drawing new lines.
+@end ftable
+%end-doc
+*/
+  BSET (AllDirectionLines, 0, "all-direction-lines",
+  "Allow all directions, when drawing new lines."),
+
+/* %start-doc options "2 GUI Options"
+@ftable @code
+@item --show-number
+
+@end ftable
+%end-doc
+*/
   BSET (ShowNumber, 0, "show-number", 0),
-  BSET (ResetAfterElement, 1, "reset-after-element", 0),
-  BSET (RingBellWhenFinished, 0, "ring-bell-finished", 0),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --reset-after-element
+If set, all found connections are reset before a new component is scanned.
+@end ftable
+%end-doc
+*/
+  BSET (ResetAfterElement, 1, "reset-after-element",
+  "If set, all found connections are reset before a new component is scanned."),
+
+/* %start-doc options "1 Options"
+@ftable @code
+@item --ring-bell-finished
+Execute the bell command when all rats are routed.
+@end ftable
+%end-doc
+*/
+  BSET (RingBellWhenFinished, 0, "ring-bell-finished",
+  "Execute the bell command when all rats are routed."),
 };
 
 REGISTER_ATTRIBUTES (main_attribute_list)
-- 
1.7.0



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user