diff options
author | Olivier Mehani <shtrom@ssji.net> | 2020-12-21 08:40:20 +1100 |
---|---|---|
committer | Olivier Mehani <shtrom@ssji.net> | 2020-12-21 08:40:20 +1100 |
commit | 5ee5fbcc632bed97a71abe78da8ad6bcfe26f7b4 (patch) | |
tree | ed22999263bae65506e0443d1c1a00ae18e1c4e6 | |
parent | 91139a75c44f5c9df4c99e6851ce2350650928bd (diff) |
thetvdb_rename: better usability
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
-rwxr-xr-x | thetvdb_rename.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/thetvdb_rename.py b/thetvdb_rename.py index 10cd2f2..7625556 100755 --- a/thetvdb_rename.py +++ b/thetvdb_rename.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +# pip install tvnamer fuzzywuzzy + import os, sys import logging import tvdb_api # use tvnamer @@ -8,7 +10,6 @@ import re from fuzzywuzzy import fuzz outdir="renamed" -series="doctor who" ext="mkv" debuglevel=logging.INFO @@ -17,14 +18,13 @@ logging.basicConfig(level=debuglevel) inparen=re.compile('.*\(([^\)]\+)\)') if len(sys.argv) < 2: - logging.error("usage %s SEASON [EXTENSION [SERIES [OUTDIR]]]" % sys.argv[0]) + logging.error("usage %s SERIES SEASON [EXTENSION [OUTDIR]]" % sys.argv[0]) exit(1) -season = int(sys.argv[1]) -if len(sys.argv)>2: - ext = sys.argv[2] +series = sys.argv[1] +season = int(sys.argv[2]) if len(sys.argv)>3: - series = sys.argv[3] + ext = sys.argv[3] if len(sys.argv)>4: outdir = sys.argv[4] |