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 uv:

$ uv tool install foursquare-swarm-ical

Using pipx:

$ pipx ensurepath
$ pipx install foursquare-swarm-ical

From a git clone:

$ git clone https://github.com/liskin/foursquare-swarm-ical
$ uv tool 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)
  --skip-errors BOOLEAN     Skip check-ins on error and log them.  [default:
                            False]
  --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

# Skip check-ins on error and log them.
skip_errors: false

Contributing

Code

We welcome bug fixes, (reasonable) new features, documentation improvements, and more. Submit these as GitHub pull requests. Use GitHub issues to report bugs and discuss non-trivial code improvements; alternatively, get in touch via IRC/Fediverse/email.

See CONTRIBUTING.md for more details about the code base (including running tests locally).

Note that this project was born out of a desire to solve a problem I was facing. While I'm excited to share it with the world, keep in mind that I'll be prioritizing features and bug fixes that align with my personal use cases. There may be times when I'm busy with other commitments and replies to contributions might be delayed, or even occasionally missed. Progress may come in bursts. Adjust your expectations accordingly.

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.1.0.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foursquare_swarm_ical-1.1.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: foursquare_swarm_ical-1.1.0.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for foursquare_swarm_ical-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5402f5d35321e4af95e48a726ebe34f5e21888781043f128dd8013138658f51d
MD5 3adca10d0ef50a04eff6d88e62a7ae63
BLAKE2b-256 0c60e792f546e2711b7771f5baf0f0b3c2bcc60c592d7ba1f927fb3de843e909

See more details on using hashes here.

Provenance

The following attestation bundles were made for foursquare_swarm_ical-1.1.0.tar.gz:

Publisher: pypi.yaml on liskin/foursquare-swarm-ical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for foursquare_swarm_ical-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0243066f54c025ae1fb1078b261b5b2bde8b8176102c8d820fd1c24f84f5449a
MD5 1263ecd3ed84442e427a23061b1fd2f4
BLAKE2b-256 297156b19e34232bc4b9ce9a3a749d906f7635a2e0c6ae89a9656da3255c7670

See more details on using hashes here.

Provenance

The following attestation bundles were made for foursquare_swarm_ical-1.1.0-py3-none-any.whl:

Publisher: pypi.yaml on liskin/foursquare-swarm-ical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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