()
| 194 | |
| 195 | |
| 196 | def main(): |
| 197 | parser = argparse.ArgumentParser(description="Migrate MongoDB exports to SQLite") |
| 198 | parser.add_argument("--manpage", required=True, help="Path to manpage.json export") |
| 199 | parser.add_argument("--mapping", required=True, help="Path to mapping.json export") |
| 200 | parser.add_argument( |
| 201 | "--db", |
| 202 | default="explainshell.db", |
| 203 | help="SQLite DB path (default: explainshell.db)", |
| 204 | ) |
| 205 | args = parser.parse_args() |
| 206 | |
| 207 | ok = migrate(args.manpage, args.mapping, args.db) |
| 208 | sys.exit(0 if ok else 1) |
| 209 | |
| 210 | |
| 211 | if __name__ == "__main__": |
no test coverage detected