|
1 | 1 | # Bluecoins-ImportTool |
| 2 | +## Introduction |
| 3 | +This is a little tool created for the import of transactions for the Bluecoins app. |
| 4 | +As I am a lazy person, I would frequently gather a lot of receipts and do it in one go. Typing at phones proves to be a strain when there is a load. |
| 5 | +Therefore, this tool is created. |
| 6 | +According to the prompts, you can input and select accounts' number as required, speeding up the input process. |
| 7 | +The inputted file will then be exported to a csv file that can be imported into the bluecoins app. |
| 8 | + |
| 9 | +*Note: There is no support for advanced file type yet. You are welcome to fork this repo and add functionality. |
| 10 | + |
| 11 | +Released by KwongTN under the MIT license. Contains code from https://github.com/nlohmann/json . |
| 12 | + |
| 13 | +For the bluecoins import guide, refer to: |
| 14 | +http://www.bluecoinsapp.com/import-guide/ |
| 15 | + |
| 16 | + |
| 17 | +## json file terminology |
| 18 | +- `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/). |
| 19 | +- `presetLists` is an array of objects consisting of `account type` and `category list` |
| 20 | +- `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. |
| 21 | +- `cat` is the main category |
| 22 | +- `child` is the child category |
| 23 | + |
| 24 | + |
| 25 | +## Creating the json file |
| 26 | +### Manual Creation |
| 27 | +#### Simple json |
| 28 | +This is a sample file for a simple json configuration. `a`(or, `account`) must be the first object in the `presetLists` array. |
| 29 | +Currently you are not required to fill in `jsonType`, but it is recommended for future releases. |
| 30 | +``` |
| 31 | +{ |
| 32 | + "jsonType" : "Simple", |
| 33 | + "presetLists":[ |
| 34 | + { |
| 35 | + "type" : "a", |
| 36 | + "catList" : [ |
| 37 | + { |
| 38 | + "cat" : "Category1", |
| 39 | + "child" : [ |
| 40 | + "Child1.1", |
| 41 | + "Child1.2" |
| 42 | + ] |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "type" : "e / i", |
| 48 | + "catList" : [ |
| 49 | + { |
| 50 | + "cat" : "Category2", |
| 51 | + "child" : [ |
| 52 | + "Child2.1", |
| 53 | + "Child2.2" |
| 54 | + ] |
| 55 | + } |
| 56 | + ] |
| 57 | + ] |
| 58 | +} |
| 59 | +``` |
| 60 | +You may also refer to "./Tests/ktn.json" for a real life sample file. |
| 61 | + |
| 62 | +#### (Future) Advanced json |
| 63 | +To be announced, depending on project popularity. |
| 64 | + |
| 65 | +### (Future) Program creation |
| 66 | +Depending the popularity of this project, a tool may be created to facilitate this use case. You are always welcome to fork my project. |
| 67 | + |
| 68 | +## Specifying default path |
| 69 | +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: |
| 70 | +- In ".\BlueCoinsImportTool.h", you edit the following variables: |
| 71 | +``` |
| 72 | +const string defaultJsonFileName = "<Your path>"; |
| 73 | +const string defaultOutFileName = "<Your path>"; |
| 74 | +``` |
| 75 | +- Take note that you need to add extra backslashes for directory paths, e.g.: |
| 76 | +``` D:\Bluecoins-ImportTool\Tests\ktn.json ``` would be ``` D:\\Bluecoins-ImportTool\\Tests\\ktn.json ``` |
| 77 | + |
| 78 | +## No support / not tested |
| 79 | +- Compilers other than the one default in Visual Studio 2019 |
| 80 | +- CMake. Not tried yet. |
| 81 | + |
| 82 | +## Project Milestones |
| 83 | +- 28 June 2019, Project announcement to the BlueCoins Community |
| 84 | +- 26 June 2019, Transfers logic completed |
| 85 | +- 24 June 2019, Overall completed |
| 86 | +- 21 June 2019, json file standard decided |
| 87 | +- 16 June 2019, Project Started |
0 commit comments