https://github.com/pcolby/float
A simple utility for exporting body weight from Fitbit to Polar Flow
https://github.com/pcolby/float
cpp fitbit polar qt qt5 qtwebengine
Last synced: 3 months ago
JSON representation
A simple utility for exporting body weight from Fitbit to Polar Flow
- Host: GitHub
- URL: https://github.com/pcolby/float
- Owner: pcolby
- License: gpl-3.0
- Created: 2019-09-24T13:10:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-16T12:11:13.000Z (over 5 years ago)
- Last Synced: 2025-01-17T13:28:25.758Z (5 months ago)
- Topics: cpp, fitbit, polar, qt, qt5, qtwebengine
- Language: C++
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# float
A simple utility for exporting body weight from Fitbit to Polar Flow. Useful it, for example, you
use Fitbit Aria scales, and want Polar to be updated when you do so.## Usage
```
Usage: float [options]
Export weight from Fitbit to Polar FlowOptions:
-h, --help Displays this help.
-c, --credentials Read credentials from filename
-d, --debug Enable debug output
--no-color Do not color the output
--show Show the web view on screen
-v, --version Displays version information.
```### Credentials
Of course, the application needs credentials to access both Fitbit and Polar Flow. These may be
provide either by file, or environment variables.#### Credentials File
The Fitbit and Polar Flow credentials may be given in an ini file, specified by the `-c` option:
```
float -c path/to/credentials.ini
```Where the ini file looks something like:
```
[Fitbit]
[email protected]
password=my$trongPa$$word!![Polar]
[email protected]
password=myOtherPa$$word##
```#### Environment Variables
If no `-c` (or `--credentials`) option is given, then application will look for the following
environment variables instead: `FITBIT_USERNAME`, `FITBIT_PASSWORD`, `POLAR_USERNAME`, and
`POLAR_PASSWORD`.## Building
To build the application from source code, clone the repository, then:
```
mkdir -p '/path/to/tmp/build/dir'
qmake -o '/path/to/tmp/build/dir' -r -Wall -Wlogic -Wparser CONFIG+=debug_and_release '/path/to/repo/clone'
make -C '/path/to/tmp/build/dir' all
make -C '/path/to/tmp/build/dir' check
```## Debugging
For basic debugging, use the `-d` or `--debug` flags.
```
$ ./float -d ...
```To see the web view rendered, either natively (on your local Windows/OSX/Linux desktop) or remotely (eg via X11
forwarding over SSH), use the `--show` option. Otherwise the view will be rendered offscreen only.```
$ ./float --show ...
```To enable QtWebEngine's Chromium debugging, set the `QTWEBENGINE_CHROMIUM_FLAGS` environment variable.
```
QTWEBENGINE_CHROMIUM_FLAGS="--enable-logging --log-level=0 --v=1"
```And for advanced debugging, you can enable Chromium's developer tools interface via the
`QTWEBENGINE_REMOTE_DEBUGGING` environment variable.```
QTWEBENGINE_REMOTE_DEBUGGING=9001
```Then visit http://127.0.0.1:9001/ in a Chromium-based browser (such as Google Chrome).
All of the above debug options can be combined too.
```
QTWEBENGINE_CHROMIUM_FLAGS="--enable-logging --log-level=0 --v=1" \
QTWEBENGINE_REMOTE_DEBUGGING=9001 \
QT_LOGGING_RULES="*=true"
./float -d ...
```