X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=rainbowstream%2Fconfig.py;h=837aec0d4c19a59076ff3b0ff3947aeaff29c1eb;hb=44d70096aa76484f8433bd1e9a0b780f4cbb22e4;hp=cc655e9af40ba0c7ccc756bd2af54462897ce6d4;hpb=91476ec37e468301d39182aff48936749158e976;p=rainbowstream.git diff --git a/rainbowstream/config.py b/rainbowstream/config.py index cc655e9..837aec0 100644 --- a/rainbowstream/config.py +++ b/rainbowstream/config.py @@ -1,2 +1,48 @@ -CONSUMER_KEY = 'uS6hO2sV6tDKIOeVjhnFnQ' -CONSUMER_SECRET = 'MEYTOS97VvlHX7K1rwHPEqVpTSqZ71HtvoK4sVuYk' +from .colors import * +import json +import os +import os.path + +# 'search': max search record +SEARCH_MAX_RECORD = 5 +# 'home': default number of home's tweets +HOME_TWEET_NUM = 5 +# 'allrt': default number of retweets +RETWEETS_SHOW_NUM = 5 +# 'inbox','sent': default number of direct message +MESSAGES_DISPLAY = 5 +# 'trend': max trending topics +TREND_MAX = 10 +# 'switch': Filter and Ignore list ex: ['@fat','@mdo'] +ONLY_LIST = [] +IGNORE_LIST = [] + +# Autocomplete history file name +HISTORY_FILENAME = 'completer.hist' + +USER_DOMAIN = 'userstream.twitter.com' +PUBLIC_DOMAIN = 'stream.twitter.com' +SITE_DOMAIN = 'sitestream.twitter.com' +DOMAIN = USER_DOMAIN + +# Image config +IMAGE_SHIFT = 10 +IMAGE_MAX_HEIGHT = 40 + +# Load colorset +COLOR_SET = ['colorset.default'] +modules = map(__import__, COLOR_SET) + +# Load json config +rainbow_config = os.environ.get( + 'HOME', os.environ.get('USERPROFILE','')) + + os.sep + '.rainbow_config.json' +try: + if os.path.exists(rainbow_config): + data = json.load(open(rainbow_config)) + for d in data: + locals()[d] = data[d] +except: + pass + +