def main(): parser = argparse.ArgumentParser( description= 'Assign qualification to specific worker or workers of specific HIT.') parser.add_argument('-w', help='The Turk worker id.') parser.add_argument('-d', help='The HIT id') parser.add_argument('-q', help='The qualification id.') parser.add_argument('-t', default='sandbox', help='The type of Mechanical Turk.') parser.add_argument('-s', default='Approved', help='The status of assignments.') args = parser.parse_args() workers = [] if (args.w != None): workers.append(args.w) elif (args.d != None): workers = mtk_utils.get_workers(args.t, args.d, args.s) else: print('Please give Turk worker id and qualification id.') assign_qua(args.t, args.q, workers) sys.exit(0)
def main(): parser = argparse.ArgumentParser(description = 'Obtain Turl workers for specific HIT.') parser.add_argument('-d', help = 'The HIT id.') parser.add_argument('-s', default = 'Approved', help = 'The status of assignments.') parser.add_argument('-t', default = 'sandbox', help = 'The type of Mechanical Turk.') args = parser.parse_args() if (args.d != None): workers = mtk_utils.get_workers(args.t, args.d, args.s) for worker in workers: print(worker) else: print('Please assign HIT id.') sys.exit(0)
def main(): parser = argparse.ArgumentParser( description='Obtain Turl workers for specific HIT.') parser.add_argument('-d', help='The HIT id.') parser.add_argument('-s', default='Approved', help='The status of assignments.') parser.add_argument('-t', default='sandbox', help='The type of Mechanical Turk.') args = parser.parse_args() if (args.d != None): workers = mtk_utils.get_workers(args.t, args.d, args.s) for worker in workers: print(worker) else: print('Please assign HIT id.') sys.exit(0)
def main(): parser = argparse.ArgumentParser(description = 'Assign qualification to specific worker or workers of specific HIT.') parser.add_argument('-w', help = 'The Turk worker id.') parser.add_argument('-d', help = 'The HIT id') parser.add_argument('-q', help = 'The qualification id.') parser.add_argument('-t', default = 'sandbox', help = 'The type of Mechanical Turk.') parser.add_argument('-s', default = 'Approved', help = 'The status of assignments.') args = parser.parse_args() workers = [] if (args.w != None): workers.append(args.w) elif (args.d != None): workers = mtk_utils.get_workers(args.t, args.d, args.s) else: print('Please give Turk worker id and qualification id.') assign_qua(args.t, args.q, workers) sys.exit(0)