-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_conversion.py
More file actions
41 lines (32 loc) · 964 Bytes
/
run_conversion.py
File metadata and controls
41 lines (32 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
"""Wrapper script for AOP-Wiki RDF conversion.
Constructs a PipelineConfig from CLI arguments and calls the pipeline
main() function. No exec(), no string replacement.
"""
import argparse
from pathlib import Path
from aopwiki_rdf.config import PipelineConfig
from aopwiki_rdf.pipeline import main
def cli():
parser = argparse.ArgumentParser(
description="Run AOP-Wiki XML to RDF conversion"
)
parser.add_argument(
"--output-dir",
default="data/",
help="Output directory for generated files (default: data/)",
)
parser.add_argument(
"--log-level",
default="INFO",
choices=["DEBUG", "INFO", "WARNING", "ERROR"],
help="Logging level (default: INFO)",
)
args = parser.parse_args()
config = PipelineConfig(
data_dir=Path(args.output_dir),
log_level=args.log_level,
)
main(config)
if __name__ == "__main__":
cli()