Giter Site home page Giter Site logo

liskin / foursquare-swarm-ical Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 1.0 117 KB

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

License: MIT License

Makefile 14.08% Python 85.92%
hacktoberfest icalendar foursquare foursquare-checkins foursquare-api python python3 liskin-cookiecutter-python-cli

foursquare-swarm-ical's Introduction

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

foursquare-swarm-ical's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

laststriker11

foursquare-swarm-ical's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.