Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions wbuild/createIndex.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,14 @@ def writeIndexHTMLMenu():

readmeString, readmeIframeString, readmeFilename = writeReadme()
depSVGString = writeDepSVG()

#fill the HTML template with the constructed tag structure
wbuildPath = pathlib.Path(wbuild.__file__).parent

template = open(str(wbuildPath / "template.html")).read()
template = open(str(wbuildPath / "html/template.html")).read()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below, analogous

template = Template(template).substitute(menu=menuString, title=pageTitle, rf=getRecentMenu(),
readme=readmeString, readmeIframe=readmeIframeString, readmeFilename=readmeFilename
, depSVG=depSVGString)


try:
filename_index = conf.get("htmlIndex")
except AttributeError as e:
Expand All @@ -186,12 +184,12 @@ def writeIndexHTMLMenu():
indexWithFolderName = conf.get("indexWithFolderName")
except:
indexWithFolderName = False

if indexWithFolderName:
abs_path = str(os.path.abspath(scriptsPath))
name = abs_path.split("/")[-2]
filename_index = name + "_" + filename_index

f = open(htmlOutputPath + '/' + filename_index, 'w')
f.write(template)
f.close()
Expand All @@ -206,4 +204,8 @@ def ci():

if os.path.exists(libDir):
shutil.rmtree(libDir)
shutil.copytree('.wBuild/lib', libDir)


wbuildPath = pathlib.Path(wbuild.__file__).parent
shutil.copytree(str(wbuildPath) + "/html/lib", libDir) ### quick fix for line below
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be just htmlOutputPath + '/lib' instead of wbuildPath + "/html/lib"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's correct, since we want to copy from wbuildPath/.. to libDir (= htmlOutputPath + "/lib")

#shutil.copytree('.wBuild/lib', libDir) ######### .wBuild/llib exitiert nicht mehr, in wBRender.R: file.copy(paste0(wBuildPath,"/html/lib"), file.path(tmp_output_dir), recursive=TRUE)