13.5. Reference data output formats

refdbd implements several standard backends for data output. You can select them with the -t option of the getref command in refdbc. Remember that all backends just send data. It is your decision what you want to do with the information. You can either view the data on the screen or pipe them to another application or write them to a disk file.

13.5.1. scrn

The screen backend provides a basic data output for viewing in a terminal, preferably through a pager. By default, the reference ID, the publication year, the authors, the title, and the source information are displayed. You can use the -s option to additionally display the abstract (AB or N2), the notes (N1), the reprint info (RP), the address (AD), the publisher (PB), the city (CY), the URL (UR), and the user (U1 through U5) and misc (M1 through M3) fields. -s ALL will display all available fields.

13.5.2. html

The html backend works just like the scrn backend, but encodes this information in a HTML text. This comes in handy if you would like to view the results of your queries in a web browser rather than in a terminal window. This is also the easiest way to obtain fairly nice-looking printed output of your reference data. You simply use the -o switch to write the results of your queries to a file, reusing the same filename for each query. After each query you just have to hit the reload button of your browser to view the results of the most recent query.

The visual appearance of the generated HTML files can be customized using CSS files. The URL of the CSS file must be specified with the refdbc -G command-line option or by setting the configuration variable cssurl. The global configuration file /usr/local/etc/refdb/refdbcrc is preconfigured with a cssurl entry pointing to the default CSS file installed in /usr/local/share/refdb/css. If you want a different appearance, it might be prudent to create a copy of this CSS file and customize it as you see fit. The following element classes can be customized. In most cases, the class name reflects the database field to be formatted:

13.5.3. xhtml

This is a variant of the html output which creates valid XML output according to the XHTML V1.0 Transitional DTD.

13.5.4. ris

This is identical to the input format. Use it to export references to other reference management systems.

13.5.5. risx

Retrieves the data as an XML document using the risx DTD. Use it to edit references or to create backups of your databases.

13.5.6. bibtex

This backend provides output formatted for use as a bibtex reference database. This can be used with the tex and bibtex applications to create bibliographies for documents written with Donald Knuth's famous TeX typesetting system. The -s option cannot be used with this backend and will be ignored.

13.5.7. db31

The DocBook SGML backend formats the query result as a bibliography element in a SGML document using the DocBook DTD. refdb outputs an appropriate doctype string at the beginning of the data. The string is commented out so the contents can be directly inserted into a larger document by some processing application. If you need the data as a standalone document, simply use a script to uncomment the first line. The -s option cannot be used with this backend and will be ignored. This option is called "db31" to distinguish it from any later additions that may be necessary due to possible incompatibilities in new DocBook versions. It just means that the SGML that this backend creates should work with DocBook V.3.1 or later unless a new backend will be added.

13.5.8. db31x

The output is essentially the same as with the preceeding backend but you'll get a DocBook XML document instead.

13.5.9. teix

The TEI XML backend formats the query results as a TEI listBibl element. refdb outputs an appropriate processing instruction and doctype string at the beginning of the data. The string is commented out so the contents can be directly inserted into a larger document by some processing application. If you need the data as a standalone document, simply use a script to uncomment the first line. The -s option cannot be used with this backend and will be ignored.