def main(): args = parser.parse_args() conn = establish_connection(args.database) s = Scraper(conn, args.root_dir) if args.orgs_only: s.scrape_organisations() elif args.depts_only: s.scrape_departments() elif args.grants_only: s.scrape_grants() else: s.scrape()
def main(): args = parser.parse_args() conn = establish_connection(args.database) s = Scraper(conn) if args.basic: if args.year: s.scrape_basic(range(args.year, args.year + 1)) else: s.scrape_basic() elif args.detailed: if args.stdin: refs = [x.strip() for x in sys.stdin.readlines()] s.scrape_detailed(refs) else: s.scrape_detailed() else: s.scrape_all()