usage: iddb [options] command

Show insertion device properties by querying the StructuredData database.

If no command is given, the program performs the "list" command.

Commands
--------

Commands for undulator properties
+++++++++++++++++++++++++++++++++

    name NAME [NAME ...]
        Get the StructuredData name for the given insertion device. NAME may be
        any common name that specifes an insertion device like: U49ID4R u49id4r
        U49-1:Bii7 u49-1:bii7 7 U49-1 u49-1 U49/1 u49/1 idcp7
    devicename NAME [NAME ...]
        Get the devicename for the given insertion device. NAME may be any
        common name that specifes an insertion device like:
        U49ID4R u49id4r U49-1:Bii7 u49-1:bii7 7 U49-1 u49-1 U49/1 u49/1 idcp7
    prefix NAME [NAME ...]
        Show the prefix ("idcpNN") for the given insertion device. NAME is
        the same as for command "devicename" above.
    console NAME [NAME ...]
        Show the console name for the given insertion device(s). For a single
        NAME, just print the console name, for more than one NAME print results
        in a table.
    ioc NAME [NAME ...]
        Show the ioc name for the given insertion device(s). For a single
        NAME, just print the console name, for more than one NAME print results
        in a table.
    dump NAME [NAME ...]
        Print the StructuredData database for the given insertion device in
        python pretty-print format.
    list [COLUMN [COLUMN...]]
        List properties for all insertion devices. If no COLUMN is specified,
        return the following columns in this order:
            name devicename key prefix application group status.
        If columns are specified, only show these in the given order.
        The list of all *available* columns is:
            application console devicename drivetypes group ioc key name prefix status
        Unless option --sort-by is used, sort the results by the first column.

Commands for raw StructuredData access
++++++++++++++++++++++++++++++++++++++

Note: most options except "--id" are ignore for these commands.

Note: Option -i IDNAME causes "id_data.NAME." to be prepended to PATTERN, where
      "NAME" is the StructuredData undulator name

    paths PATTERN [PATHS]
        Execute StructuredData "paths" command.
        Example: iddb --id ue112 paths 'names.*'
    find PATTERN [PATHS]
        Execute StructuredData "find" command.
        Example: iddb --id ue112 find 'names.*'
    rxfind PATTERN [PATHS]
        Execute StructuredData "rxfind" command. PATTERN is a regular
        expression here. Usually your pattern should start with '.*'.
        Example: iddb --id ue112 find '.*device'
    get PATTERN [PATHS]
        Execute StructuredData "get" command.
        Example: iddb --id ue112 get 'names.*'

Specification of the data source
--------------------------------

The data source is specified by order of precedence by these methods:

    - options '-f' or '--server'
    - environment variable 'IDDB_SOURCE'
    - configuration file $SHARE_INSTALL_DIR/bii_scripts/iddb.config

Environment variable 'IDDB_SOURCE'
++++++++++++++++++++++++++++++++++

    One of the strings:
        - server:HOST:PORT
        - file:FILENAME

Configuration file
++++++++++++++++++

The configuration file is located at $SHARE_INSTALL_DIR/bii_scripts/iddb.config.
$SHARE_INSTALL_DIR is the location of the 'share' directory.

This is a file in windows-ini format. Source specifications have that same
format as for the environment variable 'IDDB_SOURCE' (see above).

Section [HOSTS] contains source specifications specific host names,
    '*' is a default for all hosts.
Section [DOMAINS] contains source specifications specific domains. Partial
    matches of domains are supported, e.g. 'mycompany.com' matches
    'subnet1.mycompany.com'

Further documentation
---------------------

StructuredData paths in general are described here:
    https://yaml-structureddata.sourceforge.io/reference.html#paths

The Insertion device database is described here:
    http://wiki.trs.bessy.de/bin/view/Controls/IdcpDb

options:
  --version             show program's version number and exit
  --summary             print a summary of the function of the program
  -h, --help            Print help (with pager)
  -T, --trace           show where the program gets it's data from
  -S SORTCOLUMN, --sort-by SORTCOLUMN
                        specify the SORTCOLUMN
  -N, --no-heading      do not print a table heading
  -n NAME, --name NAME  filter by NAME (regexp)
  -i IDNAME, --id IDNAME
                        filter by IDNAME. IDNAME must be any common name that
                        specifies the insertion device.
  -a APPLICATION, --application APPLICATION
                        filter by APPLICATION (regexp)
  -g GROUP, --group GROUP
                        filter by GROUP (regexp)
  -s STATUS, --status STATUS
                        filter by STATUS (regexp)
  -t DRIVETYPE, --drivetypes DRIVETYPE
                        filter by DRIVETYPE (regexp)
  --server SERVER       specify the StructuredData XML-RPC server in the form
                        'HOST:PORT'
  -r, --raw             do *not* use python pretty-print to print data, just
                        print the raw value.
  -f STRUCTUREDDATAFILE, --file STRUCTUREDDATAFILE
                        Load STRUCTUREDDATAFILE instead of contacting an
                        XMLRPC server. Note: For this the StructuredData
                        python modules must be installed on your system.