Main class of the program. More...
Public Member Functions | |
BibEntry * | addEntry (const std::string &bibkey, const std::string &typeName, bool isAuxiliary) |
returns an entry after creating it if needed. More... | |
void | completeEntry (BibEntry &) |
post-treatment to complete the entry. | |
const BibEntry * | getEntry (const std::string &bibkey) const |
Returns the entry with this bibkey. | |
void | select (const std::string &query_pattern) |
Selects entries. More... | |
void | sort (const std::string &sort_pattern) |
Sorts entries. More... | |
void | clear () |
Clears the entry database. | |
void | readBib (const std::string &fileName, bool isAuxiliary) |
Reads a BibTex file. More... | |
void | setHtmlFile (const std::string &fileName) |
Changes the name of the generated HTML file. | |
void | setBibFile (const std::string &fileName) |
Changes the name of the generated BibTex file. | |
void | writeHtml (bool display) |
Writes the selected entries in the generated HTML file. More... | |
void | writeBib (bool display) |
Write the selected entries in the generated BibText file. More... | |
void | readTemplate (const std::string &fileName) |
Reads the HTML template that serves to produce the HTML output file. | |
void | setFormat (const std::string &options) |
Changes formatting options, including the printing Style. | |
void | setStyle (const std::string &styleKey) |
Changes the Style (see BibStyle). | |
void | checkLinks (const std::string &fieldName) |
Checks if links corresponding to this field are valid, removes them otherwise. | |
void | showStats (std::string filename) |
Shows statitistics. | |
void | doCommand (const std::string &cmd, const std::string &args, bool &interFound, bool &showFound) |
Executes a command. | |
Static Public Member Functions | |
static void | echo (const std::string &msg) |
Prints a message on the console. | |
static void | error (const char *command, const std::string &msg) |
Prints an error on the console. | |
static bool | help () |
Prints help on the console. | |
Static Public Attributes | |
static std::list< BibExtension * > | extensions |
MUST BE FIRST! | |
Main class of the program.
BibEntry * Bib::addEntry | ( | const std::string & | bibkey, |
const std::string & | typeName, | ||
bool | isAuxiliary | ||
) |
returns an entry after creating it if needed.
If an entry with the same bibkey already exists, it is returned without creating a new entry. Entries can have any type (the type is automatically added to BibTypes if needed). isAuxiliary should be true if this entry comes from an auxiliary file (such entries are ignored when printing HTML files).
void Bib::select | ( | const std::string & | query_pattern) |
Selects entries.
The query syntax is: field1 & field2=value2 & field3!=value3 & field4=value4a|!value4b ... All conditions betwen "&" symbols must be met. These conditions mean:
void Bib::sort | ( | const std::string & | sort_pattern) |
Sorts entries.
Example: "-year & type"
void Bib::readBib | ( | const std::string & | fileName, |
bool | isAuxiliary | ||
) |
Reads a BibTex file.
Reads all entries in this file and adds them to the entry database. Duplicate entries are merged taking into account their key. If an entry field if defined multiple times, the last version is kept. isAuxiliary must be true if this file is an auxiliary file (its entries may be merged with existing entries, otherwise they will be ignored when printing HTML files).
void Bib::writeHtml | ( | bool | display) |
Writes the selected entries in the generated HTML file.
Displays the HTML file using the default Web browser if display is true.
void Bib::writeBib | ( | bool | display) |
Write the selected entries in the generated BibText file.
Displays the BibText file using the default Web browser if display is true.