# Check for required parameters, if not present, ask for them if not options.evernote_username: options.evernote_username = raw_input("Your Evernote username: "******"Your Evernote password: "******"Could not connect to Evernote") sys.exit(1) # Get Hello notes from Evernote # Check for required parameter, if not present, ask for it if not options.hello_notebook: options.hello_notebook = raw_input("Your Hello Notebook name: ") notebook = ec.get_notebook_by_name(options.hello_notebook) if not notebook: if options.create_notebook: notebook = ec.create_notebook(options.hello_notebook) else: # try to connect to business account logging.debug("Authenticating to business...") if ec.connect_to_business(): notebook = ec.get_notebook_by_name(options.hello_notebook) if not notebook: logging.fatal('Notebook "%s" not found (Personal and Business). If you want it to be created, pass --create-notebook in command line.' % hello_notebook) sys.exit(1) else: logging.fatal('Notebook "%s" not found. If you want it to be created, pass --create-notebook in command line.' % hello_notebook) sys.exit(1)