-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.py
37 lines (32 loc) · 1.07 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import json
import os
import datetime
# try to load mysql connection info from a config file
try:
with open('mysql-conf.json') as f:
mysql_settings = json.load(f)
except IOError:
print("Please supply valid MySQL connection details in mysql-conf.json.")
mysql_settings = None
# TODO: this is ugly
DATA_PATH = os.path.dirname(os.path.abspath(__file__)) + '/data/'
# the first instant of President Trump's tenure
TRUMP_START = datetime.datetime(2017, 1, 20, 17, 0, 0)
DATE_FMT = '%Y-%m-%d'
TIME_FMT = '%Y-%m-%dT%H:%M:%S'
DEDUP = {
'channel-theatlanticdiscussions': 'theatlantic',
'theatlanticcities': 'theatlantic',
'theatlanticwire': 'theatlantic',
'in-focus': 'theatlantic',
'bwbeta': 'bloomberg',
'bloombergview': 'bloomberg',
'pbsnewshourformsrodeo': 'pbsnewshour',
'pj-instapundit': 'pj-media',
'spectator-new-blogs': 'spectator-new-www',
'spectatorwww': 'spectator-new-www',
'theamericanspectator': 'spectator-org',
'spectatororg': 'spectator-org',
'channel-theavclubafterdark': 'avclub',
'mtonews': 'mtocom',
}