Skip to content

Commit ad4d411

Browse files
committed
[scripts/convert] Rename odmlconversion
The odmlconversion cli script is renamed to odmlconvert. A deprecation notice is displayed if the previous script name 'odmlconversion' is called from the command line.
1 parent 8a3666c commit ad4d411

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

odml/scripts/odml_conversion.py renamed to odml/scripts/odml_convert.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
"""odmlConversion
1+
"""odmlConvert
22
3-
odmlConversion searches for odML files within a provided SEARCHDIR
3+
odmlConvert searches for odML files within a provided SEARCHDIR
44
and converts them to the newest odML format version.
55
Original files will never be overwritten. New files will be
66
written either to a new directory at the current or a specified
77
location.
88
9-
Usage: odmlconversion [-r] [-o OUT] SEARCHDIR
9+
Usage: odmlconvert [-r] [-o OUT] SEARCHDIR
1010
1111
Arguments:
1212
SEARCHDIR Directory to search for odML files.
@@ -123,5 +123,17 @@ def main(args=None):
123123
report.close()
124124

125125

126+
def dep_note(args=None):
127+
"""
128+
Print deprecation warning and call main function.
129+
130+
:param args: Command line arguments
131+
"""
132+
133+
print("\n[DEPRECATION WARNING] 'odmlconversion' will be removed with \n"
134+
"the next version release. Please use 'odmlconvert' instead.\n")
135+
main(args)
136+
137+
126138
if __name__ == "__main__":
127139
main(sys.argv[1:])

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
classifiers=CLASSIFIERS,
5050
license="BSD",
5151
entry_points={'console_scripts': ['odmltordf=odml.scripts.odml_to_rdf:main',
52-
'odmlconversion=odml.scripts.odml_conversion:main',
52+
'odmlconversion=odml.scripts.odml_convert:dep_note',
53+
'odmlconvert=odml.scripts.odml_convert:main',
5354
'odmlview=odml.scripts.odml_view:main']}
5455
)

0 commit comments

Comments
 (0)