1 <html xmlns="http://www.w3.org/1999/xhtml">
8 <h1>Command line options</h1>
10 <p>Although JabRef is primarily a GUI
11 based application, it offers several command line options that
12 may be useful, and can even perform file conversion operations
13 without opening the graphical interface.</p>
15 <p>You can always specify one or more BibTeX files to load by
16 simply listing their filenames. Take care to specify all
17 options before your list of file names. You must make sure the
18 first file name is not misunderstood as being an argument for
19 an option - this simply means that if a boolean option like
20 <code>-n</code> or <code>-l</code> immediately precedes a file
21 name, add the word "true" as an argument. For instance, the
24 <p><code>jabref -o filetoexport.xml,docbook -n true
25 original.bib</code></p>
27 <p>will correctly load the file <code>original.bib</code>,
28 export it in docbook format to <code>filetoexport.xml</code>,
29 and suppress the GUI. The word <em>true</em> prevents the file
30 name from being interpreted as an argument to the -n
35 <p>This option causes JabRef to display a summary
36 of the command line options, and quit immediately.</p>
38 <h2>No-GUI mode: -n</h2>
40 <p>This option suppresses both the JabRef
41 window and the splash window normally shown at startup. It
42 causes the program to quit immediately once the command line
43 options have been processed.</p>
45 <p>This option is useful for performing file conversion
46 operations from the command line or a script.</p>
48 <h2>Load session: -l</h2>
50 <p>This option causes JabRef to load the
51 saved session, if any, before opening the main window.</p>
53 <h2>Import file: -i filename[,format]</h2>
56 JabRef to import or load the specified file. If only a filename
57 is specified, or the filename is followed by a comma and a *
58 character, JabRef will attempt to detect the file format
59 automatically. This should work for all BibTeX files and files
60 in any import format supported by JabRef. If the filename is
61 followed by a comma and the name of an import format, the given
62 import filter will be used. Use the <code>-h</code> option to
63 get a list of availiable import formats.</p>
65 <p>If an output option is also specified, an import will always
66 be processed before it, and the imported or loaded file will be
67 given to the export filter. If the GUI is not suppressed using
68 the <code>-n</code> option, any imported or loaded file will
69 show up in the main window.</p>
71 <p>The -i option can be specified only once, and for one file
74 <h2>Export file: -o filename[,format]</h2>
77 JabRef to save or export a file imported or loaded by the same
78 command line. If a file is imported using the <code>-i</code>
79 option, that database will be exported. Otherwise, the
80 <em>last</em> file specified (and successfully loaded) without
81 the <code>-i</code> option will be exported.</p>
83 <p>If only a filename is specified, it will be saved in BibTeX
84 format. If the filename is followed by a comma and an export
85 format, the given export filter will be used. A custom export
86 filter can be used in this way, and will be preferred if the
87 export name matches both a custom and a standard export
90 <p>Use the <code>-h</code> option to get a list of availiable
93 <p>If the <code>-n</code> option has not been invoked, any
94 export operation will be performed before the JabRef window is
95 opened, and the imported database will show up in the
98 <p>The -o option can be specified only once, and for one file
101 <h2>Export preferences: -x filename</h2>
103 <p>Using this option, you
104 can have JabRef export all user preferences to an XML file.
105 After exporting, JabRef will start normally.</p>
107 <h2>Import preferences: -p filename</h2>
109 <p>This option causes
110 JabRef to import user preferences exported using the
111 <code>-x</code> option. After importing, JabRef will start
114 <h2>Export only used items: -a
115 filename[.aux],newBibFile[.bib]</h2>
117 <p>Sometimes it is helpful, to
118 have a bibtex file that contains only the used bibtex entries.
119 A list of these used entries is located in an aux file. Jabref
120 can parse this file to generate a new bibtex file, which
121 contains only the known and used entries. That will mean, if an
122 entry is not defined in the standard bibtex file, it cannot be
123 located in the new file.</p>