()
| 35 | |
| 36 | |
| 37 | def main(): |
| 38 | parser = argparse.ArgumentParser() |
| 39 | parser.add_argument( |
| 40 | "infile", |
| 41 | type=str, |
| 42 | help="Path to the input file" |
| 43 | ) |
| 44 | parser.add_argument( |
| 45 | "-o", |
| 46 | "--outfile", |
| 47 | type=str, |
| 48 | help="Path to the output file" |
| 49 | ) |
| 50 | parser.add_argument( |
| 51 | "-i", |
| 52 | "--ignore", |
| 53 | type=str, |
| 54 | help="An ignored input - may be useful to add a " |
| 55 | "dependency between custom targets", |
| 56 | ) |
| 57 | args = parser.parse_args() |
| 58 | |
| 59 | if not args.infile.endswith('.src'): |
| 60 | raise ValueError(f"Unexpected extension: {args.infile}") |
| 61 | |
| 62 | outfile_abs = os.path.join(os.getcwd(), args.outfile) |
| 63 | process_and_write_file(args.infile, outfile_abs) |
| 64 | |
| 65 | |
| 66 | if __name__ == "__main__": |
no test coverage detected