@trajectonomics/cli 0.8.0-alpha.19 → 0.8.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,6 +87,30 @@ date and never reads the clock, so the same command always answers the same ques
|
|
|
87
87
|
`traj help` lists every command, `traj help <command>` lists one command's flags, and
|
|
88
88
|
`traj schema --json` prints the whole contract: every command's input, output and error codes.
|
|
89
89
|
|
|
90
|
+
## Importing a statement
|
|
91
|
+
|
|
92
|
+
To load a bank statement, fill the one CSV template instead of adding each transaction by
|
|
93
|
+
hand. `traj tx import` has been in every release since 0.1.0.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
traj tx import --template # print the template header and nothing else
|
|
97
|
+
traj tx import statement.csv --dry-run
|
|
98
|
+
traj tx import statement.csv
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`--template` prints the header the importer reads, and it opens no data directory:
|
|
102
|
+
|
|
103
|
+
```csv
|
|
104
|
+
date,from,to,amount,memo,external_ref,project
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Start your file with that header and write one row per transaction. `--dry-run` reports every
|
|
108
|
+
row and rolls every write back, so run it first. A file name of `-` reads the CSV from stdin, as in
|
|
109
|
+
`traj tx import - --dry-run`. The import is all or nothing, and `external_ref` is the duplicate
|
|
110
|
+
key, so importing the same statement twice adds nothing the second time. Each command's flags and
|
|
111
|
+
the rest of the columns are in
|
|
112
|
+
[the `tx` page of the docs](https://docs.trajectonomics.com/cli/commands/tx/).
|
|
113
|
+
|
|
90
114
|
## Development
|
|
91
115
|
|
|
92
116
|
The sources are Bun-only; a released binary needs nothing.
|