From cf4a0e37c1bad0969c6e93d53ba2c1c7369b4f14 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 25 Oct 2017 13:39:22 -0400 Subject: [PATCH] README: Document how to run import2ledger. --- README.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.rst b/README.rst index cab1856..cbd5d14 100644 --- a/README.rst +++ b/README.rst @@ -122,3 +122,35 @@ When you run import2ledger, you can tell it to load options from one of these se 2. Command-line options 3. The ``[DEFAULT]`` configuration section 4. import2ledger defaults + +Running import2ledger +--------------------- + +Once you've written a configuration file with your templates and any other configuration you need, you can run it with data to import:: + + $ import2ledger [options …] file1.csv [file2.csv …] + +import2ledger will read all the data sources and generate bookkeeping entries from them. + +import2ledger needs to be able to seek within the source files. Because of that, your input files need to be normal files, or symlinks to them. Special files like devices and FIFOs aren't supported by import2ledger. + +Exit status +~~~~~~~~~~~ + +import2ledger reports the following exit codes: + +========= ================================================================= +Exit code Meaning +========= ================================================================= +0 Imported data from all source files +--------- ----------------------------------------------------------------- +1 Internal error (probably a bug) +--------- ----------------------------------------------------------------- +2 Error in the user's settings, such as a formatting error in a + template or date, or a reference to a nonexistent file or + configuration file section +--------- ----------------------------------------------------------------- +11-99 Failed to import data from at least one source file. The exit + code is 10 + the number of files that couldn't be imported, up + to the maximum exit code of 99. +========= =================================================================