Skip to content

Get the CSV file that Fitbod can export via GMail API and index the data in elasticsearch.

Notifications You must be signed in to change notification settings

mixu-/fitbod-gmail-to-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Fitbod to Elasticsearch Indexer

Get the CSV file that Fitbod can export via GMail API and index the data in elasticsearch.

Preconditions

  • Export some data from Fitbod and have it sent to a Gmail account.
  • Python 3.6
  • A server running Elasticsearch. Modify the code if it's not running in localhost:9201
  • Packages installed: pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib elasticsearch
  • Turn on the GMail API: https://developers.google.com/gmail/api/quickstart/python
  • Download the credentials.json from the above link.
  • Currently the initial authentication process requires you to login via a web browser, so the script will not work on a headless server.

Usage

$ python fitbod2elastic.py

Get Fitbod CSV from GMail and index it in Elasticsearch

optional arguments:
    -h, --help            show this help message and exit  
    -d DAYS, --days DAYS  number of days to index starting from today
    -v, --verbose         verbose logging

About

Get the CSV file that Fitbod can export via GMail API and index the data in elasticsearch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages