\r
``Ignore nicks``\ decide what nicks will be exclude.\r
\r
-- ``switch public #AKB48 -d`` will apply filter to *ONLY\_LIST* and *IGNORE\_LIST*. You can setup 2 list above at ``config.py``\r
-\r
-- ``switch mine`` will switch current stream to personal stream. ``-f`` and ``-d`` will work as well.\r
+- ``switch mine`` will switch current stream to personal stream. ``-f`` will work as well.\r
\r
- ``switch list`` will switch to a Twitter list's stream. You will be asked for list name.\r
\r
\r
- ``LIST_MAX``: default tweets to display on 'list home' command.\r
\r
-- ``ONLY_LIST``: filter list on 'switch' command.\r
+- ``ONLY_LIST``: filter list on 'switch' command. Eg: ["@fat","mdo"]\r
\r
-- ``IGNORE_LIST``: ignore list on 'switch' command.\r
+- ``IGNORE_LIST``: ignore list on 'switch' command. Eg: ["@fat"]\r
\r
- ``HISTORY_FILENAME``: name of file which stores input history.\r
\r
# Image on term
c['IMAGE_ON_TERM'] = args.image_on_term
set_config('IMAGE_ON_TERM', str(c['IMAGE_ON_TERM']))
+ # Check type of ONLY_LIST and IGNORE_LIST
+ if not isinstance(c['ONLY_LIST'], list):
+ printNicely(red('ONLY_LIST is not a valid list value.'))
+ c['ONLY_LIST'] = []
+ if not isinstance(c['IGNORE_LIST'], list):
+ printNicely(red('IGNORE_LIST is not a valid list value.'))
+ c['IGNORE_LIST'] = []
# Mute dict
c['IGNORE_LIST'] += build_mute_dict()
ignore = raw_input('Ignore nicks [Ex: @xxx,@yy]: ')
args.filter = filter(None, only.split(','))
args.ignore = filter(None, ignore.split(','))
- elif g['stuff'].split()[-1] == '-d':
- args.filter = c['ONLY_LIST']
- args.ignore = c['IGNORE_LIST']
except:
printNicely(red('Sorry, wrong format.'))
return
' filter will decide nicks will be INCLUDE ONLY.\n'
usage += s * 3 + light_yellow('Ignore nicks') + \
' filter will decide nicks will be EXCLUDE.\n'
- usage += s * 2 + light_green('switch mine -d') + \
- ' will use the config\'s ONLY_LIST and IGNORE_LIST.\n'
usage += s * 2 + light_green('switch list') + \
' will switch to a Twitter list\'s stream. You will be asked for list name\n'
printNicely(usage)