Exemplo n.º 1
0
def nuke_it_from_orbit():
    print('Are you sure you want to remove the database and start over?')
    confirmation = Colors.RED + 'KappaKeepoPogChamp' + Colors.ENDC
    confirm = input(f'Please type {confirmation} to continue: ')
    if confirm == 'KappaKeepoPogChamp':
        twitchy_database.DatabaseInit().remove_database()
        twitchy_config.ConfigInit().remove_config()
        print(' Done.')
Exemplo n.º 2
0
import argparse

# Exit if version requirements are not met
if sys.version_info < (3, 6):
    print(' Python 3.6 or greater required.')
    exit(1)

# Custom imports
from twitchy import twitchy_config  # This import also creates the path
from twitchy.twitchy_config import Colors, YouAndTheHorseYouRodeInOn
twitchy_config.ConfigInit()

# Everything will error out unless
# both the config and the database files exist
from twitchy import twitchy_database
twitchy_database.DatabaseInit()

from twitchy import twitchy_api
from twitchy import twitchy_display
from twitchy import twitchy_play

# All database functions are methods in database_instance
database_instance = twitchy_database.DatabaseFunctions()

Options = twitchy_config.Options()
Options.parse_options()


def channel_addition(option, channels):
    # option is either 'add' for -a
    # -a expects a list