From: Urban Wallasch Date: Wed, 12 May 2021 18:15:31 +0000 (+0200) Subject: * Renamed -t/--tmpdir configuration option to -o/--outdir. X-Git-Tag: v0.3~82 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=350d069295de32f55112b5b2392cdae13d0bc514;p=ffpreview.git * Renamed -t/--tmpdir configuration option to -o/--outdir. --- diff --git a/README.md b/README.md index 183dcb8..ae84cd7 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ optional arguments: -c F, --config F read configuration from file F -g G, --grid G set grid geometry in COLS[xROWS] format -w N, --width N thumbnail image width in pixel - -t P, --tmpdir P set thumbnail parent directory to P + -o P, --outdir P set thumbnail parent directory to P -f, --force force thumbnail and index rebuild -r, --reuse reuse filter settings from index file -i, --iframe select only I-frames (default) diff --git a/ffpreview.conf.sample b/ffpreview.conf.sample index fead3e0..7699837 100644 --- a/ffpreview.conf.sample +++ b/ffpreview.conf.sample @@ -4,7 +4,7 @@ # Output directory path. # A separate subdirectory is created for each video file. -tmpdir= +outdir= # Target width in pixels for thumbnails. thumb_width=128 diff --git a/ffpreview.py b/ffpreview.py index f79d62b..6b813cd 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -97,7 +97,7 @@ def configure(): 'home': expanduser("~"), 'conffile': 'ffpreview.conf', 'vid': '', - 'tmpdir': '', + 'outdir': '', 'thdir': '', 'idxfile': '', 'grid': '5x5', @@ -148,7 +148,7 @@ def configure(): parser.add_argument('-c', '--config', metavar='F', help='read configuration from file F') parser.add_argument('-g', '--grid', metavar='G', help='set grid geometry in COLS[xROWS] format') parser.add_argument('-w', '--width', type=int, metavar='N', help='thumbnail image width in pixel') - parser.add_argument('-t', '--tmpdir', metavar='P', help='set thumbnail parent directory to P') + parser.add_argument('-o', '--outdir', metavar='P', help='set thumbnail parent directory to P') parser.add_argument('-f', '--force', action='count', help='force thumbnail and index rebuild') parser.add_argument('-r', '--reuse', action='count', help='reuse filter settings from index file') parser.add_argument('-i', '--iframe', action='count', help='select only I-frames (default)') @@ -200,8 +200,8 @@ def configure(): # evaluate remaining command line args cfg['vid'] = args.filename - if args.tmpdir: - cfg['tmpdir'] = args.tmpdir + if args.outdir: + cfg['outdir'] = args.outdir if args.start: cfg['start'] = hms2s(args.start) if args.end: @@ -261,10 +261,10 @@ def configure(): cfg['grid_rows'] = int(grid[1]) # prepare temp directory - if not cfg['tmpdir']: - cfg['tmpdir'] = tempfile.gettempdir() + if not cfg['outdir']: + cfg['outdir'] = tempfile.gettempdir() try: - os.makedirs(cfg['tmpdir'], exist_ok=True) + os.makedirs(cfg['outdir'], exist_ok=True) except Exception as e: eprint(0, str(e)) exit(1) @@ -577,7 +577,7 @@ class sMainWindow(QMainWindow): self.setWindowTitle('ffpreview - '+cfg['vid']) # prepare thumbnail directory - cfg['thdir'] = cfg['tmpdir'] + '/ffpreview_thumbs/' + os.path.basename(cfg['vid']) + cfg['thdir'] = cfg['outdir'] + '/ffpreview_thumbs/' + os.path.basename(cfg['vid']) try: os.makedirs(cfg['thdir'], exist_ok=True) except Exception as e: