+ import argparse
+ parser = argparse.ArgumentParser("Search wikidata for entities related to a set of terms.")
+ parser.add_argument('inputs', type=str, nargs='+', help='one or more files to read')
+ parser.add_argument('--use-gtrends', action='store_true', help = 'toggle whether the input is the output from google trends')
+ parser.add_argument('--output', type=str, help='an output file. defaults to stdout')
+ args = parser.parse_args()
+ if args.use_gtrends:
+ trawl_google_trends(args.inputs, args.output)
+ else:
+ trawl_base_terms(args.inputs, args.output)