Skip to content

Commit 2cae34e

Browse files
committed
Updated documentation
1 parent acd1062 commit 2cae34e

File tree

5 files changed

+393
-186
lines changed

5 files changed

+393
-186
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ Samples/sampleCode.cpp
3838
x64
3939
Tests
4040
Personal
41+
Release

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Bluecoins Import Tool Changelog
2+
3+
## v2.0
4+
5+
- Updated the nlohmann::json library
6+
- Streamlined code and internal data format for better readibility and expandability.
7+
- Streamlined displaying of information
8+
- Fixed bug where file does not properly open/write/create when re-defining CSV outputs within tool.
9+
- Changed JSON format to be more future-proof.
10+
- Added feature / squashed bug where incorrect data formats will hang the whole tool.
11+
- Added feature to allow "undo" action for non-locked previous fields.
12+
- Added feature to lock fields during input. Such that, users can opt to not re-key in similar fields for transactions.
13+
- Added better bug catching functionality, such that, errors will be thrown and catched instead of just throwing errors.
14+
- Added split transaction locking for fields that require so automatically.
15+
- Added function for JSON writeback to origin file. This serves as a base for upcoming interactive account input feature.
16+
- Added function for "existing" and "target" account balance. Alert will also be displayed if "targetBal" is defined in JSON.
17+
18+
## v1.3
19+
20+
- Fixed bug where program will exit when defautAppend has bool value.
21+
22+
## v1.2
23+
24+
- Added function to introduce output path defined within JSON file.
25+
- Added more documentation information.
26+
27+
## v1.1
28+
29+
- Fixed bug where reset does not reset transfer fields.
30+
31+
## v1.0
32+
33+
- Initial release.
34+
- Feature to add entries (expense, income, transfers) interactively according to BlueCoins CSV format.

README.md

Lines changed: 80 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,42 @@ http://www.bluecoinsapp.com/import-guide/
3232

3333
## json file terminology
3434
- `jsonType` simply means the type of the json file, there are `simple` and `advanced`. For more details refer to the [bluecoins import guide](http://www.bluecoinsapp.com/import-guide/).
35-
- `outFile` *(optional)* describes the output file, which its members `filePath` signify the csv file path and `defaultAppend` determines if the default action is to append the existing file. `writeConfirm` determines if write confirmation has to be done.
35+
- `outFile` (optional) describes the output file, where its members :
36+
- `filePath` signify the csv file path
37+
- `defaultAppend` determines if the default action is to append the existing file.
38+
- `noConfirmation` determines if we commit to csv writing without asking for confirmation.
39+
- `writebackChanges` determines if we want to update `bluecoinsBal` after each transaction is done. This is a destructive operation that overwrites the file if everything in memory.
40+
- `writebackJSONSpacing` determines the spacing when we writeback the JSON file.
3641
- `presetLists` is an array of objects consisting of `account type` and `category list`
37-
- `type` is the type of account/transaction. Can be any value, but recommended values are `Account`, `Expense`, `Income`. You must have at least one category and child for each type.
38-
- `cat` is the main category
39-
- `child` is the child category
42+
- `type` is the type of account/transaction. Can be any value, but recommended values are `Account`, `Expense`, `Income`. You must have at least one category and child for each type. The first element in the `presetLists` array must be describing account.
43+
- `cat` describes the main category (E.g. `Bank` (For accounts), `Car` (For expenses) etc.)
44+
- `child` is the child category, where more details are described:
45+
- `childName` is the name of the child category (E.g. `Savings Account` (For accounts -> Bank), `Fuel` (For expenses -> Car))
46+
- `currency` not used for this version, but is placed in for compatibility with future "advanced" CSV file creation.
47+
- `bluecoinsBal` is a reference to the existing balance in the BlueCoins app. You are recommended to update this before inputting any entries. New entries will be deducted/added towards this value if `writebackChanges` is enabled.
48+
- `targetBal` is to provide a check, to see if the inputs have hit the target balance. Useful for people that do lots of backlog entries.
49+
50+
### Data Dictionary
51+
Added this section cause I've learnt in uni and cause it would be easier for you to know what went wrong in your configuration.
52+
53+
| Name/Key | Data Type | Optional? | Sample Input |
54+
| --- | --- | --- | --- |
55+
| jsonType | string || "Simple" |
56+
| outFile | object || { } |
57+
| outFile:defaultAppend | boolean || true/false |
58+
| outFile:filepath | string || "D:\\PathName\\something.csv" |
59+
| outFile:noConfirmation | boolean || true/false |
60+
| outFile:writebackChanges | boolean || true/false |
61+
| outFile:writebackJSONSpacing | integer || 1, 2, 3... |
62+
| presetLists | array || [ { }, ... ] |
63+
| presetLists[]type | string || "Account", "Income", "Expense" |
64+
| presetLists[]catList | array || [ { }, ... ] |
65+
| presetLists[]catList[]cat | string || "Bank", "Cash"... |
66+
| presetLists[]catList[]child | array || [ { }, ... ] |
67+
| presetLists[]catList[]child[]bluecoinsBal | double || 1000.00 |
68+
| presetLists[]catList[]child[]childName | string || "Savings Account" ... |
69+
| presetLists[]catList[]child[]currency | string || "MYR", "USD"... |
70+
| presetLists[]catList[]child[]targetBal | double || 1000.00 |
4071

4172

4273
## Creating the json file
@@ -45,47 +76,44 @@ http://www.bluecoinsapp.com/import-guide/
4576
As of version 2.0, the json file will be unified for a single format that encompasses simple and advanced file type. It also has sections for backlogging support.
4677
This is a sample file for a the json configuration. `a`(or, `account`) must be the first object in the `presetLists` array.
4778

48-
```
79+
```json
4980
{
5081
"outFile":[
5182
{
52-
"advFormat" : true / false,
53-
"filePath" : "<Your csv file path>",
54-
"defaultAppend" : true / false,
55-
"writeConfirm" : true
83+
"defaultAppend": true / false,,
84+
"filePath": "<Your csv file path>"
85+
"noConfirmation": true / false,
86+
"writebackChanges": true / false,
87+
"writebackJSONSpacing": 4
5688
}
5789
],
5890
"presetLists":[
5991
{
60-
"type" : "a",
92+
"type" : "a / e / i",
6193
"catList" : [
6294
{
6395
"cat" : "Category1",
6496
"child" : [
65-
"Child1.1",
66-
"Child1.2"
67-
]
68-
}
69-
]
70-
},
71-
{
72-
"type" : "e / i",
73-
"catList" : [
74-
{
75-
"cat" : "Category2",
76-
"child" : [
77-
"Child2.1",
78-
"Child2.2"
97+
{
98+
"childName" : "Child1.1",
99+
"currency" : "MYR",
100+
"bluecoinsBal" : 2000.00,
101+
"targetBal": 1876.55
102+
},{
103+
"childName" : "Child1.2",
104+
"currency" : "USD",
105+
"bluecoinsBal" : 2000.00,
106+
"targetBal" : 1000.00
107+
}
79108
]
80109
}
81110
]
111+
}
82112
]
83113
}
84114
```
85115
You may also refer to "./Tests/ktn.json" for a real life sample file.
86116

87-
#### (Future) Prompted json file creation
88-
Depending the popularity of this project, a tool may be created to facilitate this use case. You are always welcome to fork my project.
89117

90118
## Specifying default path
91119
If you are compiling yourself, you may edit in your default path that you use to store your json and csv file so that you are not required to manual key in every time:
@@ -98,26 +126,31 @@ const string defaultJsonFileName = "<Your path>";
98126

99127
## Split Transaction Support
100128
Starting from v1.3, there will be support for split transactions. Just toggle option no. 6 at the main menu. You will see an extra section of text when the option is toggled to "true".
101-
- Do take note that for split transactions to work, the following need to be the same. Future versions of the program will add functionality to lock in required lock-in :
102-
- Transaction Type
103-
- Title
104-
- Date, Time
105-
- Using different label sets or status for each split is not currently supported. Only those from the first row will be used for each split transaction
129+
- <strike>Do take note that for split transactions to work, the following need to be the same. Future versions of the program will add functionality to lock in required lock-in, namely Transaction Type, Title, Date, Time</strike> Functionality added in v2.0 .
130+
- Using different title, label sets or status for each split is not currently supported. Only those from the first row will be used for each split transaction
106131

107132
## No support / not tested
108133
- Compilers other than the one default in Visual Studio 2019
109134
- CMake. Not tried yet.
110135

111-
## Project Milestones
112-
- 23 July 2019, v1.3 released
113-
- 6 July 2019, Development for v2.0 started at branch "development"
114-
- 5 July 2019, v1.2 released
115-
- 1 July 2019, v1.1 released
116-
- 27 June 2019, Project announcement to the BlueCoins Community
117-
- 26 June 2019, Transfers logic completed
118-
- 24 June 2019, Overall completed
119-
- 21 June 2019, json file standard decided
120-
- 16 June 2019, Project Started
136+
## Project Milestones
137+
138+
| Dates | Description |
139+
| --- | --- |
140+
| 7 September 2020 | v2.0 released |
141+
| 26 August 2020 | Development for v2.0 resumed at branch "development" |
142+
| 23 July 2019 | v1.3 released |
143+
| 6 July 2019 | Development for v2.0 started at branch "development" |
144+
| 5 July 2019 | v1.2 released |
145+
| 1 July 2019 | v1.1 released |
146+
| 27 June 2019 | Project announcement to the BlueCoins Community |
147+
| 26 June 2019 | Transfers logic completed |
148+
| 24 June 2019 | Overall completed |
149+
| 21 June 2019 | json file standard decided |
150+
| 16 June 2019 | Project Started |
151+
152+
## Known Issues
153+
- "-1" to go back to previous fields does not work for locked fields. <strike>A little lazy to fix it cause it'll probably require much code rewriting. Aand I'm lazy.</strike> Probably will be fixed in v2.x .
121154

122155
## License
123156

@@ -160,3 +193,9 @@ To be announced, depending on project popularity.
160193

161194
### Prompted json file creation
162195
Depending the popularity of this project, a tool may be created to facilitate this use case. You are always welcome to fork my project.
196+
197+
### Alert after targetBal and bluecoinsBal are the same
198+
To have another way of telling the user
199+
200+
### Option to stop userinput after targetBal and bluecoinsBal are the same
201+
Well... To prevent users from accidentally inputting more than the file can handle?
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
(1)Type,(2)Date,(3)Item or Payee,(4)Amount,(5)Parent Category,(6)Category,(7)Account Type,(8)Account,(9)Notes,(10) Label,(11) Status
2-
Income,1/1/2017,Salary,3000,Employer,Salary,Bank,Savings,Salary for the month,salaries,
3-
Expense,1/2/2017,Grocery items,70,Household,Grocery,Credit Card,Citibank,,food,C
4-
Expense,1/3/2017,Gasoline,50,Car,Gasoline,Cash,Wallet,,fuel,R
5-
Expense,1/4/2017,Electric bill,80,Utilities,Electricity,Bank,Checking,,,R
1+
(1)Type,(2)Date,(3)Item or Payee,(4)Amount,(5)Parent Category,(6)Category,(7)Account Type,(8)Account,(9)Notes,(10) Label,(11) Status,(12) Split
2+
Income,7/6/2019,Salary,3000,Employer,Salary,Bank,Savings,Salary for the month,salaries,,
3+
Expense,7/7/2019,Grocery items,70,Household,Grocery,Credit Card,Citibank,,food groceries chicken eggs,C,
4+
Expense,7/8/2019,Gasoline,50,Car,Gasoline,Cash,Wallet,,fuel,R,
5+
Expense,7/9/2019,Electric bill,80,Utilities,Electricity,Bank,Checking,,,R,
6+
Expense,7/10/2019,Utilities Payment,10,Utilities,Phone,Credit Card,Amex,phone bill,monthlyutilities,R,split
7+
Expense,7/10/2019,Utilities Payment,11,Utilities,Cable,Credit Card,Amex,cable bill,,C,split
8+
Expense,7/10/2019,Utilities Payment,12,Utilities,Water,Credit Card,Amex,water bill,,,split
9+
Transfer,7/12/2019,My Transfer,80,(Transfer),(Transfer),Bank,Checking,,,C,
10+
Transfer,7/12/2019,My Transfer,80,(Transfer),(Transfer),Bank,Savings,,,R,

0 commit comments

Comments
 (0)