Пример #1
0
love_max_id, hate_max_id = 0, 0
STUFF = [
    ["I love the word", "I hate the word"],  # search term
    [love_max_id, hate_max_id],
    ["twitter-loves", "twitter-hates"]  # Wordnik word list permalink
]

# "I love the word X" or "X is my favourite new word"?
TARGET_WORD_FOLLOWS_SEARCH_TERM = True

# Test mode doesn't actually save csv, ini or update Wordnik or Twitter
TEST_MODE = False

if __name__ == '__main__':
    parser = word_tools.do_argparse(
        'Find examples of "I love/hate the word X" '
        'on Twitter and add them to Wordnik word lists.')
    parser.add_argument(
        '-i',
        '--ini',
        default='/Users/hugo/Dropbox/bin/data/lovihatibot.ini',
        help='INI file location for storing last Twitter ID checked')
    parser.add_argument('-c',
                        '--csv',
                        default='/Users/hugo/Dropbox/bin/data/lovihatibot.csv',
                        help='CSV file location for storing matching tweets')
    args = parser.parse_args()

    word_tools.init_twitter(OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY,
                            CONSUMER_SECRET)
    STUFF = word_tools.load_ini(args.ini, STUFF)  # updates STUFF[1]
Пример #2
0
favourite_max_id, favorite_max_id, fave_max_id = 0, 0, 0
STUFF = [
    # search term:
    ["is my new fave word", "is my new favorite word", "is my new favourite word"],
    [fave_max_id, favorite_max_id, favourite_max_id],
    # Wordnik word list permalink:
    ["twitter-faves", "twitter-favorites", "twitter-favourites"],
]

# e.g. "I love the word X" (True) or "X is my favourite new word" (False)?
TARGET_WORD_FOLLOWS_SEARCH_TERM = False

if __name__ == "__main__":
    # args = word_tools.do_argparse()
    parser = word_tools.do_argparse(
        'Find examples of "X is my new favourite/favorite/fave" on Twitter '
        "and add them to Wordnik word lists."
    )
    parser.add_argument(
        "-i",
        "--ini",
        default="/Users/hugo/Dropbox/bin/data/favibot.ini",
        help="INI file location for storing last Twitter ID checked",
    )
    parser.add_argument(
        "-c",
        "--csv",
        default="/Users/hugo/Dropbox/bin/data/favibot.csv",
        help="CSV file location for storing matching tweets",
    )
    parser.add_argument(
        "-n",
Пример #3
0
love_max_id, hate_max_id = 0, 0
STUFF = [
    ["I love the word", "I hate the word"],  # search term
    [love_max_id, hate_max_id],
    ["twitter-loves", "twitter-hates"]  # Wordnik word list permalink
    ]

# "I love the word X" or "X is my favourite new word"?
TARGET_WORD_FOLLOWS_SEARCH_TERM = True

# Test mode doesn't actually save csv, ini or update Wordnik or Twitter
TEST_MODE = False

if __name__ == '__main__':
    parser = word_tools.do_argparse(
        'Find examples of "I love/hate the word X" '
        'on Twitter and add them to Wordnik word lists.')
    parser.add_argument(
        '-i', '--ini',
        default='/Users/hugo/Dropbox/bin/data/lovihatibot.ini',
        help='INI file location for storing last Twitter ID checked')
    parser.add_argument(
        '-c', '--csv',
        default='/Users/hugo/Dropbox/bin/data/lovihatibot.csv',
        help='CSV file location for storing matching tweets')
    args = parser.parse_args()

    word_tools.init_twitter(
        OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY, CONSUMER_SECRET)
    STUFF = word_tools.load_ini(args.ini, STUFF)  # updates STUFF[1]
Пример #4
0
        "twitter-faves",
        "twitter-favorites",
        "twitter-favourites",
    ]
]

# e.g. "I love the word X" (True) or "X is my favourite new word" (False)?
TARGET_WORD_FOLLOWS_SEARCH_TERM = False

# Test mode doesn't actually save csv, ini or update Wordnik or Twitter
TEST_MODE = False

if __name__ == '__main__':
    # args = word_tools.do_argparse()
    parser = word_tools.do_argparse(
        'Find examples of "X is my new favourite/favorite/fave" on Twitter '
        'and add them to Wordnik word lists.')
    parser.add_argument(
        '-i',
        '--ini',
        default='/Users/hugo/Dropbox/bin/data/favibot.ini',
        help='INI file location for storing last Twitter ID checked')
    parser.add_argument('-c',
                        '--csv',
                        default='/Users/hugo/Dropbox/bin/data/favibot.csv',
                        help='CSV file location for storing matching tweets')
    args = parser.parse_args()

    word_tools.init_twitter(OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY,
                            CONSUMER_SECRET)
    STUFF = word_tools.load_ini(args.ini, STUFF)  # updates STUFF[1]
Пример #5
0
    ["ain't a word", "isn't a word", "is not a word"],  # search term
    [aint_max_id, isnt_max_id, isnot_max_id],
    # Wordnik word list permalink:
    ["twitter-aints", "twitter-isnts", "twitter-isnots", ]
    ]

# e.g. "I love the word X" (True) or "X is my favourite new word" (False)?
TARGET_WORD_FOLLOWS_SEARCH_TERM = False

# Test mode doesn't actually save csv, ini or update Wordnik
TEST_MODE = True

if __name__ == '__main__':
    # args = word_tools.do_argparse()
    parser = word_tools.do_argparse(
        "Find examples of \"X is not/isn't/ain't "
        "a word\" on Twitter and add them to Wordnik word lists.")
    parser.add_argument(
        '-i', '--ini',
        default='/Users/hugo/Dropbox/bin/data/nixibot.ini',
        help='INI file location for storing last Twitter ID checked')
    parser.add_argument(
        '-c', '--csv',
        default='/Users/hugo/Dropbox/bin/data/nixibot.csv',
        help='CSV file location for storing matching tweets')
    args = parser.parse_args()

    word_tools.init_twitter(
        OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY, CONSUMER_SECRET)
    STUFF = word_tools.load_ini(args.ini, STUFF)  # updates STUFF[1]
Пример #6
0
        "twitter-aints",
        "twitter-isnts",
        "twitter-isnots",
    ]
]

# e.g. "I love the word X" (True) or "X is my favourite new word" (False)?
TARGET_WORD_FOLLOWS_SEARCH_TERM = False

# Test mode doesn't actually save csv, ini or update Wordnik
TEST_MODE = True

if __name__ == '__main__':
    # args = word_tools.do_argparse()
    parser = word_tools.do_argparse(
        "Find examples of \"X is not/isn't/ain't "
        "a word\" on Twitter and add them to Wordnik word lists.")
    parser.add_argument(
        '-i',
        '--ini',
        default='/Users/hugo/Dropbox/bin/data/nixibot.ini',
        help='INI file location for storing last Twitter ID checked')
    parser.add_argument('-c',
                        '--csv',
                        default='/Users/hugo/Dropbox/bin/data/nixibot.csv',
                        help='CSV file location for storing matching tweets')
    args = parser.parse_args()

    word_tools.init_twitter(OAUTH_TOKEN, OAUTH_SECRET, CONSUMER_KEY,
                            CONSUMER_SECRET)
    STUFF = word_tools.load_ini(args.ini, STUFF)  # updates STUFF[1]