Skip to content

Commit

Permalink
Merge pull request #34 from GreatRSingh/main
Browse files Browse the repository at this point in the history
Custom merge function
  • Loading branch information
rbharath authored Dec 16, 2023
2 parents ccd63e6 + 66fddfb commit 40d5f81
Showing 1 changed file with 16 additions and 0 deletions.
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")

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

0 comments on commit 40d5f81

Please sign in to comment.