add command line args and env vars
This commit is contained in:
parent
f5ea583844
commit
777d70d7a4
@ -3,10 +3,24 @@
|
|||||||
# Usage: ./GenThumb.py
|
# Usage: ./GenThumb.py
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import getopt
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
baseuri = "https://s3.wasabisys.com/c0de-photography/"
|
baseuri = os.environ.get('BASEURI',"https://s3.wasabisys.com/c0de-photography/")
|
||||||
thumb_path = "./thumbs"
|
thumb_path = os.environ.get('THUMBNAILS', "./thumbs")
|
||||||
pathlist_file = "pathlist_EOS 30D:10.03.2015 - Jay Cooke:.txt" # Index file created by GenThumb.py
|
|
||||||
|
try:
|
||||||
|
opts, args = getopt.getopt(sys.argv[1:],"hp:",["pathlist="])
|
||||||
|
except getopt.GetoptError:
|
||||||
|
print ('GenThumb.py -p <pathlist file>')
|
||||||
|
sys.exit(2)
|
||||||
|
for opt, arg in opts:
|
||||||
|
if opt == '-h':
|
||||||
|
print ('GenThumb.py -p <pathlist file>')
|
||||||
|
sys.exit()
|
||||||
|
elif opt in ("-p", "--pathlist"):
|
||||||
|
pathlist_file = arg # Index file created by GenThumb.py
|
||||||
|
|
||||||
template = """
|
template = """
|
||||||
<html>
|
<html>
|
||||||
|
Loading…
Reference in New Issue
Block a user