From c09b760421080cfb4183e2c40b77672c17fed71a Mon Sep 17 00:00:00 2001 From: aaronspruit Date: Fri, 10 Mar 2023 16:38:42 -0800 Subject: [PATCH] Updated README.md Made it easier to consume --- contrib/google-import/README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/contrib/google-import/README.md b/contrib/google-import/README.md index 6a1874a..5da96de 100644 --- a/contrib/google-import/README.md +++ b/contrib/google-import/README.md @@ -3,10 +3,15 @@ Reads a JSON export of Google Location History from [Google Takeout](https://takeout.google.com/settings/takeout) and publishes all of its locations to MQTT. Useful for importing Google Location History into OwnTracks Recorder. -## How to use -1. Ensure you have python3 installed -1. `pip install paho.mqtt` -1. `python3 import-google.py` for basic instructions. - * 'filename' is the records.json in the takeout zip file - * 'topic' default is "owntracks//" - * 'tid' is the 2 letter tracker ID \ No newline at end of file +## Installation +`google-import.py` depends on [`paho.mqtt`](https://github.com/eclipse/paho.mqtt.python) which you can install with pip: +``` +pip install paho.mqtt +``` +## Usage +The script will read the `records.json` file from Google Takeout and create messages on your MQTT broker. At a minimum you need to specific the location of the `records.json` file, your TrackerID (`--tid`) and the topic (`-t` or `--topic`) it should place the messages on. +Example: +``` +python3 google-import.py records.json --tid -t owntracks// +``` +Make sure to change ``, ``, and `` to your usecase