"Sync Foursquare Swarm check-ins to local sqlite DB and generate iCalendar"
Project description
foursquare-swarm-ical
Overview
Sync Foursquare Swarm check-ins to local sqlite DB (incrementally) and generate iCalendar.
Installation
Using pipx:
pipx ensurepath
pipx install git+https://github.com/liskin/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 git+https://github.com/liskin/foursquare-swarm-ical
Preparation
You'll need to obtain a Foursquare API Access Token. The easiest way to obtain
one is to use their API Exporer.
Grant it permission for your account, open DevTools, let it execute an API
call and then inspect the request and copy oauth_token
from the Query String
Parameters.
- Chrome: https://developers.google.com/web/tools/chrome-devtools/network/reference#query-string
- Firefox: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list
Usage
$ foursquare-swarm-ical --help
Usage: foursquare-swarm-ical [OPTIONS]
Sync Foursquare Swarm check-ins to local sqlite DB and generate iCalendar
Options:
-v, --verbose Be more verbose
--sync / --no-sync Sync again or just use local database? [default:
True]
--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: False]
-o, --output FILENAME Output file
--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.
Example:
$ foursquare-swarm-ical --access-token TOKENTOKENTOKEN
BEGIN:VCALENDAR
VERSION:2.0
PRODID:foursquare-swarm-ical
BEGIN:VEVENT
SUMMARY:@ Venue
DTSTART;VALUE=DATE-TIME:20120304T214456Z
…
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
# Be more verbose
verbose: 0
# Sync again or just use local database?
sync: true
# 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: false
# Output file
output: '-'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for foursquare-swarm-ical-1.0.0b6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060c95d6c54560d6cb5f6f5ade993a0289deb90b10ea6e63e7fe6d1cbd50f2c8 |
|
MD5 | 89842b4025494abf79c417e9fa109b62 |
|
BLAKE2b-256 | 6adc6d6f827f7e746ef6277c33cfaf4875d817061ffb331fdbad460a901cb4c2 |
Hashes for foursquare_swarm_ical-1.0.0b6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1007899bed21625a9aa6f6d92fbf9168008294540fc5f900abf4a8fafb311552 |
|
MD5 | e8e096bc03d9920c68f73027bcd5576d |
|
BLAKE2b-256 | edcca25a8b428789219280e6303884f285ca8f864ad465a412a2f543ce08d8cc |