Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karlicoss/emfitexport
https://github.com/karlicoss/emfitexport
backup data-liberation emfit emfitqs export
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/karlicoss/emfitexport
- Owner: karlicoss
- License: mit
- Created: 2019-02-15T21:45:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T22:17:55.000Z (about 1 year ago)
- Last Synced: 2024-05-30T01:15:04.973Z (7 months ago)
- Topics: backup, data-liberation, emfit, emfitqs, export
- Language: Python
- Size: 33.2 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
Export your personal [[https://www.emfit.com/active-life-sleep-and-recovery][Emfit QS]] sleep data.
* Setting up
1. Clone *recursively*: =git clone --recursive https://github.com/karlicoss/emfitexport=
2. =pip3 install --user -r requirements.txt=
3. Note that unfortunately, the script needs your Emfit username and password, because the token expires after a few weeks.# 3. Log in to your [[https://qs.emfit.com][Emfit dashboard]] and extract the =Authorisation= header using browser's devtools.
# It should look like =Bearer SOME_LONG_STRING=.
# If you don't know how to do it, [[https://willschenk.com/articles/2019/reverse_engineering_apis_using_chrome][here]] is a nice tutorial.# TODO really need a way to install dependencies only... or maybe it's fair that setup.py reads requirements.txt, dunno
* Exporting
#+begin_src python :dir src :results drawer :exports results
import emfitexport.export as E; return E.make_parser().epilog
#+end_src#+RESULTS:
:results:Usage:
*Recommended*: create =secrets.py= keeping your api parameters, e.g.:
: username = "USERNAME"
: password = "PASSWORD"After that, use:
: ./export.py --secrets /path/to/secrets.py
That way you type less and have control over where you keep your plaintext secrets.
*Alternatively*, you can pass parameters directly, e.g.
: ./export.py --username --password
However, this is verbose and prone to leaking your keys/tokens/passwords in shell history.
I *highly* recommend checking exported files at least once just to make sure they contain everything you expect from your export. If not, please feel free to ask or raise an issue!
:end: