Skip to main content

Sync Foursquare Swarm check-ins to local sqlite DB and generate iCalendar

Project description

foursquare-swarm-ical

PyPI Python Version badge PyPI Version badge License badge

Overview

Sync Foursquare Swarm check-ins to local sqlite DB (incrementally) and generate iCalendar.

Example screenshot of the output in Google Calendar

Installation

Using pipx:

pipx ensurepath
pipx install foursquare-swarm-ical

To keep a local git clone around:

git clone https://github.com/liskin/foursquare-swarm-ical
make -C foursquare-swarm-ical pipx

Alternatively, if you don't need the isolated virtualenv that pipx provides, feel free to just:

pip install foursquare-swarm-ical

Setup and usage

Command line options

$ foursquare-swarm-ical --help
Usage: foursquare-swarm-ical [OPTIONS]

  Sync Foursquare Swarm check-ins to local sqlite DB and generate iCalendar

Options:
  -v, --verbose             Logging verbosity (0 = WARNING, 1 = INFO, 2 =
                            DEBUG)
  --sync / --no-sync        Sync again or just use local database?  [default:
                            sync]
  --full / --no-full        Perform full sync instead of incremental
                            [default: no-full]
  --access-token TEXT       Foursquare oauth2 access token  [env var:
                            FOURSQUARE_TOKEN]
  --database PATH           SQLite database file  [default: /home/user/.local/
                            share/foursquare_swarm_ical/checkins.sqlite]
  -e, --emoji / --no-emoji  Prefix summary with venue category as emoji
                            [default: emoji]
  -o, --output FILENAME     Output file
  -m, --max-size SIZE       Maximum size of the output file in bytes (accepts
                            K and M suffixes as well)
  --config FILE             Read configuration from FILE.  [default: /home/use
                            r/.config/foursquare_swarm_ical/config.yaml]
  --config-sample           Show sample configuration file
  --help                    Show this message and exit.

Configuration file

Access token (and other options) can be set permanently in a config file, which is located at ~/.config/foursquare_swarm_ical/config.yaml by default (on Linux; on other platforms see output of --help).

Sample config file can be generated using the --config-sample flag:

$ foursquare-swarm-ical --config-sample
# Logging verbosity (0 = WARNING, 1 = INFO, 2 = DEBUG)
verbose: 0

# Sync again or just use local database?
sync: true

# Perform full sync instead of incremental
full: false

# Foursquare oauth2 access token
access_token: TEXT

# SQLite database file
database: /home/user/.local/share/foursquare_swarm_ical/checkins.sqlite

# Prefix summary with venue category as emoji
emoji: true

# Output file
output: '-'

# Maximum size of the output file in bytes (accepts K and M suffixes as well)
max_size: SIZE

Donations (♥ = €)

If you like this tool and wish to support its development and maintenance, please consider a small donation or recurrent support through GitHub Sponsors.

By donating, you'll also support the development of my other projects. You might like these:

  • strava-offline – Keep a local mirror of Strava activities for further analysis/processing
  • strava-ical – Generate iCalendar with your Strava activities

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foursquare_swarm_ical-1.0.3.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

foursquare_swarm_ical-1.0.3-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file foursquare_swarm_ical-1.0.3.tar.gz.

File metadata

  • Download URL: foursquare_swarm_ical-1.0.3.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for foursquare_swarm_ical-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3ae2ba69ca3bcb5f48246f4386a1b74ffdb8bb39910aab1112221a84ece22600
MD5 a701c6981f199b1d637fcce540b3093e
BLAKE2b-256 4126aec637dfa50effb300be6e5eadd3f4f63b998618b1dfb866ebb7489f90b0

See more details on using hashes here.

File details

Details for the file foursquare_swarm_ical-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for foursquare_swarm_ical-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 359d8283066d3b5452008908766a264d55b4311517105c91407d727f3403d15c
MD5 3197d163c21c8b0ffa7bb0e18f5ec3a1
BLAKE2b-256 9b67324db5124ef69c263ce8f5501ad1d9ebb431fafc837b52cd98156083d494

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page