## Import
### zsh-histdb
```
» histdb import histdb -h
histdb-rs-import-histdb 0.1.0
Import entries from existing histdb sqlite file
USAGE:
histdb-rs import histdb [OPTIONS]
FLAGS:
-h, --help
Prints help information
OPTIONS:
-d, --data-dir <data-dir>
Path to folder in which to store the history files [default: $HOME/.local/share/histdb-rs]
-i, --import-file <import-file>
Path to the existing histdb sqlite file [default: $HOME/.histdb/zsh-history.db]
```
If the defaults for the `data-dir` and the `import-file` are fine you can just
run the following command:
```
histdb import histdb
```
This will create CSV files for each `hostname` found in the sqlite database. It
will create a UUID for each unique session found in sqlite so command run in the
same session should still be grouped together.
### zsh histfile
```
» histdb import histfile -h
histdb-rs-import-histfile 0.1.0
Import entries from existing zsh histfile
USAGE:
histdb-rs import histfile [OPTIONS]
FLAGS:
-h, --help
Prints help information
OPTIONS:
-d, --data-dir <data-dir>
Path to folder in which to store the history files [default: $HOME/.local/share/histdb-rs]
-i, --import-file <import-file>
Path to the existing zsh histfile file [default: $HOME/.histfile]
```
If the defaults for the `data-dir` and the `import-file` are fine you can just
run the following command:
```
histdb import histfile
```
As the information stored in the histfile is pretty limited the following
information will be stored:
* `time_finished` will be parsed from the histfile
* `result` (exit code) will be parsed from the histfile
* `command` will be parse from the histfile
* `time_start` will be copied over from `time_finished`
* `hostname` will use the current machines hostname
* `pwd` will be set to the current users home directory
* `session_id` will be generated and used for all commands imported from the
histfile
* `user` will use the current user thats running the import