25 |
# Written by Asko Soukka |
# Written by Asko Soukka |
26 |
# |
# |
27 |
|
|
28 |
|
""" |
29 |
|
This module is dependent on papers generated by a script in Libvob CVS. |
30 |
|
""" |
31 |
|
|
32 |
__docformat__ = 'reStructuredText' |
__docformat__ = 'reStructuredText' |
33 |
|
|
34 |
import config |
import config |
66 |
|
|
67 |
def get_texture_filename(filepath): |
def get_texture_filename(filepath): |
68 |
|
|
69 |
if filepath.endswith(".gen.html"): |
if filepath.endswith(config.midfix+'.html'): |
70 |
rstpath = filepath[0:len(filepath)-9]+'.rst' |
rstpath = filepath[0:len(filepath)-(len(config.midfix)+5)]+'.rst' |
71 |
if os.path.isfile(rstpath): filepath = rstpath |
if os.path.isfile(rstpath): filepath = rstpath |
72 |
elif filepath.endswith(".html"): |
elif filepath.endswith(".html"): |
73 |
rstpath = filepath[0:len(filepath)-5]+'.rst' |
rstpath = filepath[0:len(filepath)-5]+'.rst' |
81 |
|
|
82 |
dbg('Filename %s Id %s' % (full_path, str(id))) |
dbg('Filename %s Id %s' % (full_path, str(id))) |
83 |
|
|
84 |
|
# XXX config.midfix can't be used here, because paper is generated outside navidoc |
85 |
return slashify(base_path)+slashify(config.papers_directory)+str(id)+'-paper.gen.jpg' |
return slashify(base_path)+slashify(config.papers_directory)+str(id)+'-paper.gen.jpg' |
86 |
|
|
87 |
|
|