summaryrefslogtreecommitdiff
path: root/deal-converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'deal-converter.py')
-rw-r--r--deal-converter.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/deal-converter.py b/deal-converter.py
index 5a7f609..65ab692 100644
--- a/deal-converter.py
+++ b/deal-converter.py
@@ -2,5 +2,17 @@ import argparse, sys
from dealconvert import DealConverter
-converter = DealConverter(sys.argv[1])
-converter.output(sys.argv[2:])
+parser = argparse.ArgumentParser(
+ description='Universal converter for bridge deal formats',
+ formatter_class=argparse.RawTextHelpFormatter,
+ epilog='Supported formats: BER BHG BRI CDS CSV DGE DLM DUP PBN RZD.\n' + \
+ 'Formats are auto-detected based on file extension.')
+parser.add_argument('input', metavar='INPUT_FILE',
+ help='Input file path')
+parser.add_argument('output', metavar='OUTPUT_FILE', nargs='*',
+ help='Output file path(s)')
+
+arguments = parser.parse_args()
+
+converter = DealConverter(arguments.input)
+converter.output(arguments.output)