Symbolic link recursion option, added m key for displaying all medium sized images
This commit is contained in:
16
Qalbum.py
16
Qalbum.py
@@ -352,11 +352,23 @@ def sizestring(size):
|
||||
|
||||
def traverse(path,crumbs,inputs,options):
|
||||
''' The recursive main function to create the index.html and seek sub folders '''
|
||||
|
||||
print(path)
|
||||
if (not options.recurselink) and (os.path.islink(path)):
|
||||
print('Not recursing, is a link')
|
||||
return
|
||||
if len(crumbs)==1:
|
||||
header=getheader(path,'../'*(len(crumbs)-1),inputs[0][1])
|
||||
else:
|
||||
header=getheader(path,'../'*(len(crumbs)-1))
|
||||
if not os.path.exists(os.path.join(path,'../'*(len(crumbs)-1),'galleryscript.js')):
|
||||
print('Warning, no (relative path) galleryscript! '+os.path.join(path,'../'*(len(crumbs)-1),'galleryscript.js'))
|
||||
#depth=0
|
||||
#while not os.path.exists(os.path.join(path,'../'*(depth),'galleryscript.js')):
|
||||
# print(os.path.join(path,'../'*(depth)))
|
||||
# depth+=1
|
||||
#header=getheader(path,'../'*(depth))
|
||||
|
||||
print('Depth: '+str(len(crumbs)))
|
||||
pathlist=getpathlist(path,options)
|
||||
imagelist=getimagelist(path,options)
|
||||
@@ -412,6 +424,8 @@ def setupoptions():
|
||||
parser.add_argument("--version",action='version', version=__version__)
|
||||
parser.add_argument("-r",action="store_true",dest="reverse",default=False,
|
||||
help="Reverse sort orded")
|
||||
parser.add_argument("-L",action="store_false",dest="recurselink",default=True,
|
||||
help="List, but do not recurse in to symbolic link folders")
|
||||
parser.add_argument("-s",type=str,dest="style",
|
||||
help="User defined CSS style file.")
|
||||
parser.add_argument("-t",action="store_true",dest="timesort",default=False,
|
||||
@@ -445,6 +459,8 @@ def setupdefaultoptions(options):
|
||||
options.link=False
|
||||
if 'recursive' not in options:
|
||||
options.recursive=True
|
||||
if 'recurselink' not in options:
|
||||
options.recurselink=True
|
||||
if 'reverse' not in options:
|
||||
options.reverse=False
|
||||
if 'style' not in options or options.style is None:
|
||||
|
||||
Reference in New Issue
Block a user