mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2024-12-22 04:02:19 +01:00
Add option to print version with --version
or -V
I guess `-v` is more commonly used for "verbose" so I will use the short option of `-V` for version.
This commit is contained in:
parent
456b8a2f26
commit
0561300ebe
@ -1,3 +1,4 @@
|
||||
from csv_metadata_quality.version import VERSION
|
||||
import argparse
|
||||
import csv_metadata_quality.check as check
|
||||
import csv_metadata_quality.fix as fix
|
||||
@ -11,6 +12,7 @@ def parse_args(argv):
|
||||
parser.add_argument('--input-file', '-i', help='Path to input file. Can be UTF-8 CSV or Excel XLSX.', required=True, type=argparse.FileType('r', encoding='UTF-8'))
|
||||
parser.add_argument('--output-file', '-o', help='Path to output file (always CSV).', required=True, type=argparse.FileType('w', encoding='UTF-8'))
|
||||
parser.add_argument('--unsafe-fixes', '-u', help='Perform unsafe fixes.', action='store_true')
|
||||
parser.add_argument('--version', '-V', action='version', version=f'CSV Metadata Quality v{VERSION}')
|
||||
args = parser.parse_args()
|
||||
|
||||
return args
|
||||
|
1
csv_metadata_quality/version.py
Normal file
1
csv_metadata_quality/version.py
Normal file
@ -0,0 +1 @@
|
||||
VERSION = '0.0.1'
|
Loading…
Reference in New Issue
Block a user