update usage
[rainbowstream.git] / rainbowstream / rainbow.py
index 83a86b2cd21c641a84e3b61c1ea2e140eeab231c..e5476ba348db25e9dac25f7792aca4b622df9721 100644 (file)
@@ -371,10 +371,11 @@ def help():
     Help
     """
     s = ' '*2
+    h,w = os.popen('stty size', 'r').read().split()
 
     usage = '\n'
     usage += s + 'Hi boss! I\'m ready to serve you right now!\n'
-    usage += s + '-'*70 + '\n'
+    usage += s + '-'*(int(w)-4) + '\n'
 
     usage += s + 'You are ' + yellow('already') +' on your personal stream.\n'
     usage += s*2 + green('switch public #AKB') +  ' will switch to public stream and follow "' + yellow('AKB') + '" keyword.\n'
@@ -382,13 +383,13 @@ def help():
     usage += s*2 + green('switch mine -f ') + ' will prompt to enter the filter.\n'
     usage += s*3 + yellow('Only nicks') + ' filter will decide nicks will be INCLUDE ONLY.\n'
     usage += s*3 + yellow('Ignore nicks') + ' filter will decide nicks will be EXCLUDE.\n'
-    usage += s*2 + green('switch mine -d') + ' will use the config\'s ONLY_LIST and IGNORE_LIST\n'
+    usage += s*2 + green('switch mine -d') + ' will use the config\'s ONLY_LIST and IGNORE_LIST.\n'
     usage += s*3 + '(see ' + grey('rainbowstream/config.py') + ').\n'
 
     usage += s + 'For more action: \n'
     usage += s*2 + green('home') + ' will show your timeline. ' + green('home 7') + ' will show 7 tweet.\n'
-    usage += s*2 + green('view @mdo') + ' will show @mdo\'s home.\n'
-    usage += s*2 + green('t oops ') + 'will tweet "' + yellow('oops') + '"" immediately.\n'
+    usage += s*2 + green('view @mdo') + ' will show ' + yellow('@mdo') + '\'s home.\n'
+    usage += s*2 + green('t oops ') + 'will tweet "' + yellow('oops') + '" immediately.\n'
     usage += s*2 + green('rt 12 ') + ' will retweet to tweet with '+ yellow('[id=12]') + '.\n'
     usage += s*2 + green('rep 12 oops') + ' will reply "' + yellow('oops') + '" to tweet with ' + yellow('[id=12]') + '.\n'
     usage += s*2 + green('del 12 ') + ' will delete tweet with ' + yellow('[id=12]') + '.\n'
@@ -399,7 +400,7 @@ def help():
     usage += s*2 + green('c') + ' will clear the screen.\n'
     usage += s*2 + green('q') + ' will quit.\n'
 
-    usage += s + '-'*70 + '\n'
+    usage += s + '-'*(int(w)-4) + '\n'
     usage += s + 'Have fun and hang tight!\n'
     printNicely(usage)