import sys import annotator from annotator.model import Consumer, User if __name__ == '__main__': r = raw_input( "This program will perform initial setup of the annotation \n" "store, and create the required admin accounts. Proceed? [Y/n] ") if r and r[0] in ['n', 'N']: sys.exit(1) print("\nCreating SQLite database and ElasticSearch indices... ", end="") annotator.create_app() annotator.create_all() print("done.\n") username = raw_input("Admin username [admin]: ").strip() if not username: username = '******' email = '' while not email: email = raw_input("Admin email: ").strip() password = '' while not password: password = getpass("Admin password: ")
def setup(): annotator.create_app() try: annotator.drop_all() except pyes.exceptions.ElasticSearchException: pass
import annotator from annotator.model import Consumer, User if __name__ == "__main__": r = raw_input( "This program will perform initial setup of the annotation \n" "store, and create the required admin accounts. Proceed? [Y/n] " ) if r and r[0] in ["n", "N"]: sys.exit(1) print("\nCreating SQLite database and ElasticSearch indices... ", end="") annotator.create_app() annotator.create_all() print("done.\n") username = raw_input("Admin username [admin]: ").strip() if not username: username = "******" email = "" while not email: email = raw_input("Admin email: ").strip() password = "" while not password: password = getpass("Admin password: ")