diff --git a/qalbum/Qalbum.py b/qalbum/Qalbum.py
index bd83257..7c0cdaa 100755
--- a/qalbum/Qalbum.py
+++ b/qalbum/Qalbum.py
@@ -27,7 +27,7 @@ from datetime import datetime
# (c) ville.q.rantanen@gmail.com
-__version__='2.20161005'
+__version__='2.20180731'
FILECONFIG=".config"
FILEDESC="descriptions.csv"
@@ -209,7 +209,13 @@ def pathlinks(path,list):
imgstr=''
else:
imgstr=''
- pathstr+=''+imgstr+''+unicode(nice,encoding="utf8").encode('ascii', 'xmlcharrefreplace')+' ('+nsum+')';
+ pathstr += '%s%s (%s)'%(
+ unicode(p,encoding="utf8").encode('ascii', 'xmlcharrefreplace'),
+ urllib.quote(p),
+ imgstr,
+ nice.encode('ascii', 'xmlcharrefreplace'),
+ nsum
+ )
pathstr+=''
pathstr+=''
return pathstr
@@ -251,7 +257,13 @@ def imagelinks(path,list):
except:
desc=doublequotes.sub('',filter(lambda x: x in string.printable, descriptions[n]).encode('ascii', 'xmlcharrefreplace'))
- strout+='+'.jpg)
'+unicode(nice,encoding="utf8").encode('ascii', 'xmlcharrefreplace')+''
+ strout += '
%s'%(
+ n,
+ urllib.quote(i),
+ desc,
+ urllib.quote(i),
+ nice.encode('ascii', 'xmlcharrefreplace')
+ )
n+=1
strout+=''
return strout
@@ -397,6 +409,7 @@ def crumblinks(crumbs,title,parent):
def nicestring(s):
''' Returns a nice version of a long string '''
+ s = unicode(s, encoding = "utf8")
if len(s)<20:
return s
s=s.replace("_"," ")
diff --git a/setup.py b/setup.py
index 7365f39..39fbcb1 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ setup(
'scripts/Qalbum-descriptor'],
package_data={'':['lib/*']},
include_package_data=True,
- version = '2.20161005',
+ version = '2.20180731',
description = 'A tool to create a web gallery from a folder structure of images / other files.',
author = 'Ville Rantanen',
author_email = 'ville.q.rantanen@gmail.com',