Skip to content

Commit

Permalink
Final touches before a bit of a reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
sagargp committed Oct 14, 2014
1 parent 96d2fe5 commit 711c93f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions automover.py
Expand Up @@ -60,8 +60,9 @@ def __hash__(self):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--verbose", "-v", action="store_true", default=False, help="Print out debug info")
parser.add_argument("path", action="store", help="The path to the root of all the files")
parser.add_argument("dest", action="store", help="The path to destination of the files")
parser.add_argument("--force", action="store", help="Assume every file is the show given here")
parser.add_argument("path", action="store", help="The path to the root of all the files that need to be renamed")
parser.add_argument("dest", action="store", help="The path to destination of the files after they've been renamed")
args = parser.parse_args()

log = logging.getLogger(__name__)
Expand All @@ -77,11 +78,14 @@ def __hash__(self):
all_shows = {}

shopts["cd \"%s\"" % args.path] = None
shopts["mkdir -p done"] = None
shopts["mkdir -p done"] = None

for _dir in os.listdir(args.path):
movie_file = File(args.path, _dir).detect()
if movie_file:
if args.force:
movie_file.title = args.force

try: all_shows[movie_file.title].add(movie_file)
except: all_shows[movie_file.title] = set([movie_file])

Expand Down

0 comments on commit 711c93f

Please sign in to comment.