mirror of
https://github.com/nikdoof/foursquare-feeds.git
synced 2025-12-14 15:42:33 +00:00
Fix path of config file when script run from different directory
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import configparser
|
import configparser
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
import arrow
|
import arrow
|
||||||
import foursquare
|
import foursquare
|
||||||
@@ -9,7 +11,9 @@ from ics import Calendar, Event
|
|||||||
logging.basicConfig(level=logging.INFO, format="%(message)s")
|
logging.basicConfig(level=logging.INFO, format="%(message)s")
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONFIG_FILE = "config.ini"
|
|
||||||
|
current_dir = os.path.realpath(os.path.dirname(__file__))
|
||||||
|
CONFIG_FILE = os.path.join(current_dir, "config.ini")
|
||||||
|
|
||||||
# How many to fetch and use. Up to 250.
|
# How many to fetch and use. Up to 250.
|
||||||
NUM_CHECKINS = 100
|
NUM_CHECKINS = 100
|
||||||
|
|||||||
Reference in New Issue
Block a user