del
[rainbowstream.git] / rainbowstream / config.py
CommitLineData
6fa09c14 1from .colors import *
44d70096
VNM
2import json
3import os
4import os.path
6fa09c14 5
533edcdb 6# 'search': max search record
f405a7d0 7SEARCH_MAX_RECORD = 5
533edcdb 8# 'home': default number of home's tweets
829cc2d8 9HOME_TWEET_NUM = 5
533edcdb 10# 'allrt': default number of retweets
1f24a05a 11RETWEETS_SHOW_NUM = 5
533edcdb 12# 'inbox','sent': default number of direct message
305ce127 13MESSAGES_DISPLAY = 5
533edcdb 14# 'trend': max trending topics
5b2c4faf 15TREND_MAX = 10
533edcdb
VNM
16# 'switch': Filter and Ignore list ex: ['@fat','@mdo']
17ONLY_LIST = []
18IGNORE_LIST = []
19
20# Autocomplete history file name
f5677fb1 21HISTORY_FILENAME = 'completer.hist'
c0440e50 22
eb9781ed
O
23USER_DOMAIN = 'userstream.twitter.com'
24PUBLIC_DOMAIN = 'stream.twitter.com'
25SITE_DOMAIN = 'sitestream.twitter.com'
c0440e50 26DOMAIN = USER_DOMAIN
d51b4107 27
44d70096 28# Image config
816e305f 29IMAGE_SHIFT = 10
305ce127 30IMAGE_MAX_HEIGHT = 40
533edcdb 31
44d70096 32# Load colorset
2e73187a
VNM
33default_colorset = 'colorset/default.json'
34try:
35 if os.path.exists(default_colorset):
36 data = json.load(open(default_colorset))
37 for d in data:
38 locals()[d] = local()[data[d]]
39except:
40 pass
6fa09c14 41
44d70096 42# Load json config
2e73187a 43rainbow_config = os.environ.get('HOME', os.environ.get('USERPROFILE','')) + os.sep + '.rainbow_config.json'
44d70096
VNM
44try:
45 if os.path.exists(rainbow_config):
46 data = json.load(open(rainbow_config))
47 for d in data:
2e73187a 48 locals()[d] = local()[data[d]]
44d70096
VNM
49except:
50 pass
6fa09c14 51
6fa09c14 52