# openscale-to-sqlite

Load openscale data into an sqlite db for further processing.

About _openScale_: Openscale is a free and open-source weight and body metrics tracker, with support for Bluetooth scales.

[Github](https://github.com/oliexdev/openScale)
[F-droid](https://f-droid.org/en/packages/com.health.openscale/)
[Play (Pro version)](https://play.google.com/store/apps/details?id=com.health.openscale.pro)

Openscale-to-sqlite is a part of project [LazyDog](https://github.com/FransHeuvelmans/Lazydog).

## Usage

Export the openScale data using the build in csv exporter
run `openscale-to-sqlite export.csv my.db`

Alternatively if you only have access to the original application sqlite db file.
run `openscale-to-sqlite --dbin openscale.db my.db`.

Now if this db file was in use by multiple accounts (multiple users of the app).
run `openscale-to-sqlite --dbin --username myuser openscale.db my.db`

If it should only insert new fields (and not update already older insertions) [1].
run `openscale-to-sqlite --noupdate export.csv my.db`.
This can be combined with other options.

There is a "streaming" mode which reads the measurements while they are written out [1].
run `openscale-to-sqlite --stream export.csv my.db`.
This can be combined with other options.


[1]: This might help if there are a lot of measurements