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

Custom merge function #34

Merged
merged 1 commit into from
Dec 16, 2023
Merged
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: 16 additions & 0 deletions new-website/utils/tutorials/build_pdf_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import pandas as pd
import pdfkit
from utils import numeric_sorter
from typing import List


INFO_PATH = "/workspaces/deepchem.github.io/new-website/utils/tutorials/website-render-order/"
Expand Down Expand Up @@ -58,6 +59,21 @@ def merge_pdf():
command = command + PDF_PATH + j[:-5] + "pdf "
os.system(command + "merged.pdf")

def merge_pdf_pages(a: List[str]):
"""Merges the PDFs.
Usage include adding title page, ending, etc.

Parameters
----------
a: List[str]
List of addresses of pdf to merge. In correct order.

"""
command = "pdfunite "
for i in a:
command = command + i + ' '
return command
#os.system(command, "merged.pdf")
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this commented code in a future PR?


if __name__ == "__main__":
os.system("mkdir " + PDF_PATH)
Expand Down