# QHacc Plugins

This page is dedicated to QHacc plugins. Of course, you probably knew that from the title. In any event, this page currently covers just the plugins distributed with the QHacc sourcecode, since they're the only ones I know about. If you've written your own and want it listed here, let me know and I'll see what I can do.

Exactly which plugins are available to you can be determined by running `qhacc --plugins` from the command line, or choosing the "About Plugins" option from the Help menu. Many of these plugins are built and installed by default, except if they require an external library to function. (This exclusion includes most database plugins.)

Database Plugins As a general rule, all database plugins are also import/export plugins.

ID | Description | QHACC_HOME | Notes
--- | --- | --- | ---
EXTPRG | External Program | <QHACC_HOME>:<system command> | The system command is run once before the data is loaded from QHACC_HOME in the format "`<command> load <QHACC_HOME>`", and once after it has been saved in the format "`<command> save <QHACC_HOME>`"
LSQL | SQLite/LocalFile Hybrid | <QHACC_HOME> | QHacc will load the data from <QHACC_HOME> as normal, but then create and in-memory instance of SQLite to handle all database operations. Data will be saved from memory to disk manually
MySQL | Mysql database | <database>:<host>:<user>:<password> | All of the QHACC_HOME fields can be supplied by the .my.cnf file, or environmental variables, if you like. Consult the MySQL documentation on how to set this up.
PSQL | PostgreSQL database | <database name> | None
XML | XML | <Path to XML file> | None
SQLL | SQLite database | <Path to SQLite datafile> | Exactly like the LSQL plugin, but all data is read and written to a SQLite datafile instead of QHacc's native format. Loading and Saving are faster than with the LSQL plugin, but the format is more obscure.
GPG | Gnu Privacy Guard | <QHACC_HOME> | The QHACC_HOME is encrypted and compressed

Import Plugins Most import plugins are also export plugins

ID | Description | QHACC_HOME | Notes
--- | --- | --- | ---
ARC | Restore | <Archive directory> | None.
CLI | Command Line Entry | None | Enters a transaction and set of splits from the command line. Help is available using the "?"

CLI

Command Line Entry (non-interactive)

<"Format String">

The non-interactive CLI options are as follows:

- --p payee
- --n number
- --m memo
- --d date (defaults to today)
- --j journal (defaults to visible journal)
- --a account
- --s sum (defaults to *)
- --e reconcile date (defaults to 1/1/8000)

Multiple --a, --e and --s options are acceptable. A split will not be considered complete until a sum is specified, except for the last account listed. That account will implicitly use a * as its sum if not given by the user. Any option can have a space or not have a space before the argument, but please note that options are specified by "--," not "-." (This is to distinguish negative sums.) Finally, an account must be specified before a sum can be entered.

QIF | Quicken Interchange Format | <account identifier>:<QIF Filename> | All transactions in the given file will be entered with one split in the given account.
OFX | Open Financial Exchange | <OFX Filename> | None

Export Plugins

ID | Description | QHACC_HOME | Notes
--- | --- | --- | ---
ARC | Archive | <Date String or Account Identifier>:<Archive Directory> | None
GEN | Random Data Generator | <Number of Transactions to Generate>:<Timespan>:<Destination Location> | Generates random data for stresstesting or display purposes. It does not copy potentially sensitive data into the new dataset.

Reporting Plugins These plugins are used for both the command line reporting, and for feeding data into the GUI reporting dialog. Other parts of the CLI interface have been modified to use this reporting API as well (e.g., --transactions).

ID | Description | Arguments | Notes
--- | --- | --- | ---
ACCT | Accounts report | None | This plugin replaces the --accounts command line option.
AVES | "Averages" report | Account Identifier | This plugin replaces the --areport command line option.
BALS | "Monthly Balance" report | Account Identifier | This plugin replaces the --breport command line option.
MBUDGET | "Monthly Budget" report | None | This plugin replaces the --mbudget command line option.
DELTAS | "Monthly Deltas" report | Account Identifier | This plugin replaces the --dreport command line option.
BUDGET | "Budget" report | Account Identifier | This plugin replaces the --budget command line option.
PAYEE | "Totals by Payee" report | Account Identifier | This plugin replaces the --preport command line option.
JOURNAL | Journal report | None | This plugin replaces the --journal command line option.
TRANS | "Transactions" report | Account Identifier | This plugin replaces the --transactions command line option.
RBAL | "Running Balance" report | Account Identifier | Report common transaction information for the account plus a running account balance after each transaction.

Graph Plugins Graphing plugins cannot be accessed directly, so they are not documented here.