| 22 | |
| 23 | |
| 24 | def argparser(): |
| 25 | p = argparse.ArgumentParser("A script to scrape crates.io for regex.") |
| 26 | p.add_argument("-c", "--crates-index", metavar="CRATES_INDEX_DIR", |
| 27 | help=("A directory where we can find crates.io-index " |
| 28 | + "(if this isn't set it will be automatically " |
| 29 | + "downloaded).")) |
| 30 | p.add_argument("-o", "--output-file", metavar="OUTPUT", |
| 31 | default="crates_regex.rs", |
| 32 | help="The name of the output file to create.") |
| 33 | return p |
| 34 | |
| 35 | |
| 36 | PRELUDE = """// Copyright 2018 The Rust Project Developers. See the COPYRIGHT |