Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions html2print/html2print.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from webdriver_manager.core.http import HttpClient
from webdriver_manager.core.os_manager import OperationSystemManager

__version__ = "0.0.7"
__version__ = "0.0.8"

PATH_TO_HTML2PDF_JS = os.path.join(
os.path.dirname(os.path.join(__file__)), "html2pdf_js", "html2pdf.min.js"
Expand Down Expand Up @@ -239,10 +239,6 @@ def create_webdriver(chromedriver: Optional[str], path_to_cache_dir: str):


def main():
# By default, all driver binaries are saved to user.home/.wdm folder.
# You can override this setting and save binaries to project.root/.wdm.
os.environ["WDM_LOCAL"] = "1"

if not os.path.isfile(PATH_TO_HTML2PDF_JS):
raise RuntimeError(
f"Corrupted html2print package bundle. "
Expand Down
13 changes: 7 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def build(context):
context, "cd submodules/html2pdf && npm install && npm run build"
)
# Windows can't do slashes for this one.
run_invoke(
context,
"""
cd html2print && mkdir html2pdf_js
""",
)
if not os.path.isdir(os.path.join("html2print", "html2pdf_js")):
run_invoke(
context,
"""
cd html2print && mkdir html2pdf_js
""",
)
run_invoke(
context,
"""
Expand Down