Move twitter-bot to api/demos/.
(imported from commit eb0a9466b9064f89322ab593134af0761caeea8a)
This commit is contained in:
		
					parent
					
						
							
								2c7f3a7745
							
						
					
				
			
			
				commit
				
					
						2225cbf758
					
				
			
		
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -3,13 +3,11 @@ import os
 | 
			
		|||
import sys
 | 
			
		||||
import optparse
 | 
			
		||||
import ConfigParser
 | 
			
		||||
from os import path
 | 
			
		||||
 | 
			
		||||
import humbug
 | 
			
		||||
 | 
			
		||||
CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc")
 | 
			
		||||
 | 
			
		||||
sys.path.append(path.join(path.dirname(__file__), '../api'))
 | 
			
		||||
import humbug
 | 
			
		||||
 | 
			
		||||
def write_config(config, since_id, user):
 | 
			
		||||
    config.set('twitter', 'since_id', since_id)
 | 
			
		||||
    config.set('twitter', 'user_id', user)
 | 
			
		||||
| 
						 | 
				
			
			@ -87,7 +85,7 @@ if not consumer_key or not consumer_secret or not access_token_key or not access
 | 
			
		|||
try:
 | 
			
		||||
    import twitter
 | 
			
		||||
except ImportError:
 | 
			
		||||
    parser.error("Install twitter-python")
 | 
			
		||||
    parser.error("Please install twitter-python")
 | 
			
		||||
 | 
			
		||||
api = twitter.Api(consumer_key=consumer_key,
 | 
			
		||||
                  consumer_secret=consumer_secret,
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue