Interaction with external applications

RefDB has been designed to be as modular and as lightweight as possible. This means that you need some external applications for various purposes. This chapter briefly discusses how you can simplify your work with these external applications.

Editor

If you want to modify references in your database or write new entries from scratch, you need some suitable editor. Emacs and vim can directly interact with RefDB using special modes or support files. Any other editor will do as well as long as it creates the correct line endings: RefDB wants a plain Unix-style LF (0x0A), not a DOS-style CR LF (0x0D 0x0A). The prime contenders are vi and Emacs which are available on almost any Unix-style operating system as well as on Windows. For the Windows platform there are also a number of free- and shareware editors which let you select the line endings.

Creating new references is straightforward: Type them in, save them, and use refdbc to upload them. If you want to edit existing references in your database, you download them with the getref command to a disk file. Open this file with your editor, edit the contents, and save the file again for uploading. If you want to edit several references in a row, you can simply reuse the filename for downloading, then refresh the buffer in your editor (e.g. C-x C-f RET in Emacs). After saving the changes, simply recall the last upload command in refdbc with the up key and press Enter.

Note

Some editors like Emacs and vim support RefDB by means of add-on packages.

Viewer

While a pager will do in many cases to view the query results, a web browser is a nice alternative. The RefDB command getref can generate HTML output at your request with the -t html option. Save the output to a file and view this file with your favourite web browser. When you run the next query, reuse the filename and hit the reload button of your browser to display the new results.

Tip

A web browser is also a convenient way to print references.