* src/plugins/NarrativeWeb.py: fix 0000597: Narrative web site generates uppercase directory names but lower case hrefs
svn: r7778
This commit is contained in:
parent
6c48caa07f
commit
52a01bdd13
@ -1,3 +1,7 @@
|
||||
2006-12-10 Brian Matherly <brian@gramps-project.org>
|
||||
* src/plugins/NarrativeWeb.py: fix 0000597: Narrative web site
|
||||
generates uppercase directory names but lower case hrefs
|
||||
|
||||
2006-12-10 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_RelationView.py: RunDatabaseRepair integration
|
||||
* src/GrampsDb/_WriteGedcom.py: RunDatabaseRepair integration
|
||||
|
@ -200,7 +200,10 @@ class BasePage:
|
||||
|
||||
def link_path(self,name,path):
|
||||
base = self.build_name("",name)
|
||||
return os.path.join(path,name[0],name[1],base)
|
||||
path = os.path.join(path,name[0],name[1],base)
|
||||
if os.sys.platform == "win32":
|
||||
path = path.lower()
|
||||
return path
|
||||
|
||||
def create_link_file(self,name,path):
|
||||
self.cur_name = self.link_path(name,path)
|
||||
@ -210,6 +213,8 @@ class BasePage:
|
||||
self.encoding,'xmlcharrefreplace')
|
||||
else:
|
||||
dirname = os.path.join(self.html_dir,path,name[0],name[1])
|
||||
if os.sys.platform == "win32":
|
||||
dirname = dirname.lower()
|
||||
if not os.path.isdir(dirname):
|
||||
os.makedirs(dirname)
|
||||
page_name = self.build_name(dirname,name)
|
||||
@ -480,10 +485,16 @@ class BasePage:
|
||||
of.write('</div>\n')
|
||||
|
||||
def build_path(self,handle,dirroot,up=False):
|
||||
path = ""
|
||||
if up:
|
||||
return '../../../%s/%s/%s' % (dirroot,handle[0],handle[1])
|
||||
path = '../../../%s/%s/%s' % (dirroot,handle[0],handle[1])
|
||||
else:
|
||||
return "%s/%s/%s" % (dirroot,handle[0],handle[1])
|
||||
path = "%s/%s/%s" % (dirroot,handle[0],handle[1])
|
||||
|
||||
if os.sys.platform == "win32":
|
||||
path = path.lower()
|
||||
|
||||
return path
|
||||
|
||||
def build_name(self,path,base):
|
||||
if path:
|
||||
|
Loading…
Reference in New Issue
Block a user