Metadata-Version: 2.1
Name: myfitnesspal-to-sqlite
Version: 0.2.2
Summary: Save data from MyFitnessPal to a SQLite database
Home-page: https://github.com/seem/myfitnesspal-to-sqlite
Author: Wasim Lorgat
License: Apache License, Version 2.0
Project-URL: Issues, https://github.com/seem/myfitnesspal-to-sqlite/issues
Project-URL: CI, https://github.com/seem/myfitnesspal-to-sqlite/actions
Project-URL: Changelog, https://github.com/seem/myfitnesspal-to-sqlite/releases
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: sqlite-utils (>=3.0)
Requires-Dist: myfitnesspal
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# myfitnesspal-to-sqlite

[![PyPI](https://img.shields.io/pypi/v/myfitnesspal-to-sqlite.svg)](https://pypi.org/project/myfitnesspal-to-sqlite/)
[![Changelog](https://img.shields.io/github/v/release/seem/myfitnesspal-to-sqlite?include_prereleases&label=changelog)](https://github.com/seem/myfitnesspal-to-sqlite/releases)
[![Tests](https://github.com/seem/myfitnesspal-to-sqlite/workflows/Test/badge.svg)](https://github.com/seem/myfitnesspal-to-sqlite/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/seem/myfitnesspal-to-sqlite/blob/master/LICENSE)

Save data from MyFitnessPal to a SQLite database.

## Installation

Install this tool using `pip`:

    $ pip install myfitnesspal-to-sqlite

## Authentication

This tool relies on `python-myfitnesspal`, which allows [authentication via the system keyring](https://github.com/coddingtonbear/python-myfitnesspal#authentication).

Install `python-myfitnesspal` using `pip`:

    $ pip install myfitnesspal

Store your MyFitnessPal password in the system keyring:

    $ myfitnesspal store_password my_user

Note that all commands assume that your password is stored in the system keyring.

## Fetching diary entries

The `diary` command retrieves food, exercise, goal and measurement entries for a given user and date.

    $ myfitnesspal-to-sqlite diary myfitnesspal.db my_user 2021-07-14

## Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

    cd myfitnesspal-to-sqlite
    python -mvenv venv
    source venv/bin/activate

Or if you are using `pipenv`:

    pipenv shell

Now install the dependencies and tests:

    pip install -e '.[test]'

To run the tests:

    pytest


