main.py 1.14 KB
from pymongo import MongoClient

client = MongoClient()
db = client['ImgSystem']

def help():
	print "s: Scan"
	print "c: Compare"
	print "a: Analyse"
	print "p: Pipeline"
	print "q: Quit"
	print "h: Help"

def choose_operation():
	print "Please enter the type of operation (enter h for help)"
	operation = raw_input()
	if operation == "s":
		pass
	elif operation == "c":
		print "Please enter the allowed domain:"
		allowed_domain = raw_input()
		print "Please enter the url of the first image"
		url1 = raw_input()
		print "Please enter the index of the first image"
		idx1 = raw_input()
		print "Please enter the url of the second image"
		url2 = raw_input()
		print "Please enter the index of the second image"
		idx2 = raw_input()
	elif operation == "a":
		print "Please enter the allowed domain:"
		allowed_domain = raw_input()
		print "Please enter the url of the image"
		url = raw_input()
		print "Please enter the index of the image"
		idx = raw_input()
	elif operation == "p":
		pass
	elif operation == "q":
		return 1
	elif operation == "h":
		help()
	else:
		print "Invalid operation"
	return 0

flag = 0
while not flag:
	flag = choose_operation()