Skip to content

Commit 241bca2

Browse files
committedFeb 13, 2017
Updated README to add changes and start instructions
1 parent 5772095 commit 241bca2

File tree

3 files changed

+55
-20
lines changed

3 files changed

+55
-20
lines changed
 

‎README.md

+55-20
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,75 @@
11
# LIA (Ledger Import Assistant)
2-
32
[![Build Status](https://travis-ci.org/himmAllRight/LIA.svg?branch=master)](https://travis-ci.org/himmAllRight/LIA/)
43

5-
LIA is a simple command-line python application that can help import exported Cedit Card and Bank statement csv files into a ledger journal. There are many other great convert/import options out there. However, I found their setup to often be a bit more complicated than what I needed initially, so I decided to write my own tool. Development of LIA will expand with my use of ledger.
4+
LIA is a simple command-line python application that can help import exported Cedit Card and Bank statement csv files into a ledger journal file. There are several other great ledger convert/import options out there, but many more complicated than what I was looking for. So...I decided to write my own tool. Thus, LIA.
65

76
### Features:
87
- CSV files are read in and converted to simple ledger journal statements.
98
- Data order is recognized by a header mechanism
10-
- Prompts the user to potentially edit the transaction data (defaults to csv value)
9+
- Prompts the user to potentially edit the transaction information (defaults to csv value)
10+
- Manual transaction entry (if desired)
1111
- Supports multiple destination accounts
12+
- Automatic placement system. The user can specify a file containing rules to automatically place transactions. (ex: anything with "Dunkin" in the description will default to _Expenses:Food:Coffee_)
13+
- Colored prompts
1214

13-
- NOTE: I think the output file may be overwritten right now
15+
## Installation Instructions
16+
_To add_
1417

15-
### Command Line Options
16-
| Flags | description |
17-
|-------|-------------|
18-
| -f, --import | input csv file to convert. If not provided just reads from cache |
19-
| -o, --output | Output ledger file name |
20-
| -r, --overwrite | Overwrites the output file. Appends by default |
21-
| -a, --import-account | The account the import data is from |
22-
| -d, --date-format | the date format for dates in the csv (ex: "%m/%d/%Y") |
23-
| -h | Help |
18+
## Run Instructions
19+
#### Setting up the Input File Header
20+
First, the input file needs to be setup so that LIA can properly understand the data order for parsing. To do this, just open up the .csv file and add a header. Many exported CSV files will already contain some sort of data header which can be used to write the LIA header.
21+
22+
For example, when I export my credit card transactions to a CSV, it contains the header:
23+
24+
`Trans. Date,Post Date,Description,Amount,Category`
25+
26+
![Credit Card Download transaction csv](img/creditCardDownload.png)
27+
28+
LIA by contrast, need headers for ``"description"``, `"date"`. and `"amount"`* (all in lowercase). So, using the current header contents for reference, I edited by adding in the three keywords mentioned above, and replaced any extrainous ones with blanks between the commas. For example:
29+
30+
`date,,description,amount,`
31+
32+
![Credit Card Download transaction csv](img/editedHeader.png)
2433

34+
Note: I can have other values marked in the header for my convenience, but LIA will currently only recognize these three. It is intended to eventually have the others utilized in the automatic rules system. For example, in my test input file, I have the header set to the following, even though I do not use "posted" for anything.
2535

26-
### Instructions
36+
`date,posted,description,amount,`
37+
38+
\* *In the future there might be more options, but for now LIA only recognizes these three.*
39+
40+
#### Starting LIA
41+
LIA is a python app, so currently the method to run it is by running `lia.py` with python. Python 2 and 3 should both be supported, but 3 is preferred. You will have to provide a few required arguments, and can also specify a few optional ones. All of the command line options are listed in the table below.
42+
43+
example:
44+
`python3 lia.py -f credit-card.csv -o ledger.dat -a "Liabilities:CreditCard:Discover" -d "%m/%d/%Y" -c`
45+
46+
### Command Line Options
47+
This table lists all of the command line options for LIA. The first column states the flag to use when calling the option. The second column provides a small description of the option, while the third column states if it is a required parameter. Lastly, the fourth column defines if you need to provide a value to the argument to the option (_ex: `-f` needs a file path after it, but you just need to write `-w` to use the overwrite option_).
48+
49+
| Flags | Description | Required? | Provide Value?|
50+
|-------|-------------|-----------|---------------|
51+
| -f, --import | Input csv file to convert. If not provided just reads from cache | Yes | Yes |
52+
| -o, --output | Output ledger file name/path | Yes | Yes |
53+
| -w, --overwrite | Overwrites the output file. (Normally Appends by default) | No | No |
54+
| -a, --import-account | The account the import data is from | Yes | Yes |
55+
| -d, --date-format | The date format for dates in the input (ex: "%m/%d/%Y") | No | Yes |
56+
| -r, --rules | Specify a file that contains rules for automatic Account placements | No | Yes |
57+
| -c, --color | Switch on colors in prompt | No | No |
58+
| -h | Help | No | No |
2759

28-
_To add later_
2960

3061
### Example
31-
`python3 lia.py -f credit-card.csv -o ledger.dat -a "Liabilities:CreditCard:Discover" -d "%m/%d/%Y"`
62+
`python3 lia.py -f credit-card.csv -o ledger.dat -a "Liabilities:CreditCard:Discover" -d "%m/%d/%Y" -c`
3263

33-
### Future TODO Features
64+
### Remaining TODO for 1.0 Release
3465
- [X] Output appends, unless --overwrite flag
3566
- [X] When looping through an input file, it copies the input file to a temp and pops items off as it works through them. This way, if you stop part-way through, you can pick up where it was last left off.
3667
- [X] Users can simply input new transactions, without improting a csv.
37-
- [ ] User can setup rules/parsers to default transaction placement. (ex: anything from "cumberland farms" will default to Expenses:Transportation:Gas)
68+
- [X] User can setup rules/parsers to default transaction placement. (ex: anything from "cumberland farms" will default to Expenses:Transportation:Gas)
3869
- [X] When user edits data, default values are editable in the prompt
39-
- [ ] Option to have statements with reconciled indicator
40-
70+
- [ ] Option to have statements with reconciled indicator (?)
71+
- [ ] Build simple install system
72+
- [ ] Update README file
73+
- [ ] Update Current Readme content
74+
- [ ] Write Install Instructions
75+
- [ ] Write Use Instructions

‎img/creditCardDownload.png

20.8 KB
Loading

‎img/editedHeader.png

19 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.