Example #1
0
def init_stream(user):
    if globalVars.output == 'curses':
        try:
            jackanapes.init_curses()
            user_stream = jackanapes.TweetArguments()
            user_stream.get_follow_stream(user)
        except tweepy.RateLimitError as e:
            print(e)
        except SystemExit:
            raise
        except KeyboardInterrupt:
            raise
        except BaseException as e:
            print(e)
            jackanapes.cleanup(1, e)
    elif globalVars.output == 'print':
        try:
            user_stream = jackanapes.TweetArguments()
            user_stream.get_follow_stream(user)
        except tweepy.RateLimitError as e:
            print(e)
        except SystemExit:
            raise
        except KeyboardInterrupt:
            raise
        except BaseException as e:
            print(e)
    elif globalVars.output == 'web':
        pass
Example #2
0
def init_follower_list(number):
    try:
        jackanapes.init_curses()
        followers = jackanapes.TweetArguments()
        followers.show_followers(number)
    except SystemExit:
        raise
    except KeyboardInterrupt:
        raise
    except BaseException as e:
        print(e)
Example #3
0
def init_retweets(number):
    try:
        jackanapes.init_curses()
        retweets = jackanapes.TweetArguments()
        retweets.print_retweets(number)
    except SystemExit:
        raise
    except KeyboardInterrupt:
        raise
    except BaseException as e:
        print(e)
Example #4
0
def init_time_line(number):
    try:
        jackanapes.init_curses()
        time_line = jackanapes.TweetArguments()
        time_line.print_time_line(number)
    except SystemExit:
        raise
    except KeyboardInterrupt:
        raise
    except BaseException as e:
        print(e)
Example #5
0
def init_info(me, not_me=''):
    if me:
        try:
            jackanapes.init_curses()
            really_me = jackanapes.TweetArguments()
            really_me.show_my_info()
        finally:
            pass
    if not_me:
        try:
            jackanapes.init_curses()
            really_not_me = jackanapes.TweetArguments()
            really_not_me.show_not_me(not_me)
        finally:
            pass
Example #6
0
def init_search_global(static, search_term, count):
    """ \b
        Search the global feed for a particular search term,
        and either displays [count] number of items, or
        streams in real-time.

        \n
        \b
SEARCH OPERATOR                         FINDS
-----------------------------------------------------------------------------------------------------------
watching now                            containing both “watching” and “now”. This is the default operator.
“happy hour”                            containing the exact phrase “happy hour”.
love OR hate                            containing either “love” or “hate” (or both).
beer -root                              containing “beer” but not “root”.
#haiku                                  containing the hashtag “haiku”.
from:interior                           sent from Twitter account “interior”.
list:NASA/astronauts-in-space-now       sent from a Twitter account in the NASA list astronauts-in-space-now
to:NASA                                 a Tweet authored in reply to Twitter account “NASA”.
@NASA                                   mentioning Twitter account “NASA”.
politics filter:safe                    containing “politics” with Tweets marked as potentially sensitive removed.
puppy filter:media                      containing “puppy” and an image or video.
puppy filter:native_video               containing “puppy” and an uploaded video, Amplify video, Periscope, or Vine.
puppy filter:periscope                  containing “puppy” and a Periscope video URL.
puppy filter:vine                       containing “puppy” and a Vine.
puppy filter:images                     containing “puppy” and links identified as photos, including third parties
                                        such as Instagram.
puppy filter:twimg                      containing “puppy” and a pic.twitter.comlink representing one or more photos.
hilarious filter:links                  containing “hilarious” and linking to URL.
superhero since:2015-12-21              containing “superhero” and sent since date “2015-12-21” (year-month-day).
puppy until:2015-12-21                  containing “puppy” and sent before the date “2015-12-21”.
movie -scary :)                         containing “movie”, but not “scary”, and with a positive attitude.
flight :(                               containing “flight” and with a negative attitude.
traffic ?                               containing “traffic” and asking a question.
\n
    """
    if static is True:
        if globalVars.output == 'curses':
            try:
                jackanapes.init_curses()
                this_search = jackanapes.TweetArguments()
                this_search.term_search(search_term, count)
            finally:
                pass
        elif globalVars.output == 'print':
            try:
                stream_search = jackanapes.TweetArguments()
                stream_search.get_stream_search(search_term)
            finally:
                pass
        elif globalVars.output == 'web':
            pass
    elif static is False:
        if globalVars.output == 'curses':
            try:
                jackanapes.init_curses()
                stream_search = jackanapes.TweetArguments()
                stream_search.get_stream_search(search_term)
            finally:
                pass
        elif globalVars.output == 'print':
            try:
                stream_search = jackanapes.TweetArguments()
                stream_search.get_stream_search(search_term)
            finally:
                pass
        elif globalVars.output == 'web':
            pass