Skip to content

devben-io/airtag-to-gpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Airtag-to-GPX

This is a script that fetches the locations of airtags from the local cache of the FindMy.app and creates *.gpx files from them.

It's useful for tracking the history of an airtag's locations.

(Credits go to henrik242 for inspiring this.)

Prerequisite

  • a Mac computer (sorry Linux & other OS do not work) =(
  • jq
  • your terminal app (e.g. iTerm2) or /usr/sbin/cron has FullDisk access

Prepare

  • If not already done, make the script executable:
    $ chmod +x <PATH-TO-REPO>/airtag-to-gpx.sh
  • The Find My.app must be running & remain open for regular updates of the local cache.

Usage

# generate gpx of all airtags
$ ./airtag-to-gpx.sh

# generate gpx of a specific airtag
$ ./airtag-to-gpx.sh <AIRTAG-NAME>
# e.g.
$ ./airtag-to-gpx.sh Wallet

The script runs only once and is meant to be used with a cronjob (or something similar). For testing you can run it indefinitely like this:

# runs every minute
$ while true; do ./airtag-to-gpx.sh; echo -n "."; sleep 60; done

Environment variables

OUTPUT_DIR

  • default: $HOME/Desktop/airtag-gpx
  • Place where the gpx are saved to
  • Contains final gpx files (merged from all days)

TMP_DIR

  • default: $HOME/Desktop/airtag-gpx/tmp-data/
  • Working directory
  • Contains daily gpx files and other files

Known Issues

  1. Airtag names with whitespaces break the jq query
    • Can be mitigated by renaming airtags to something w/o whithespaces

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages