feat: add cover

This commit is contained in:
monoid 2022-04-29 23:53:01 +09:00
parent d0ea5d1b1b
commit def17c7072
3 changed files with 8 additions and 2 deletions

3
.gitattributes vendored
View File

@ -1 +1,2 @@
* text eol=lf * text eol=lf
*.pdf binary

7
cli.py
View File

@ -79,7 +79,7 @@ def buildPdf(args):
if args.verbose: if args.verbose:
print("build start") print("build start")
print("print url", url) print("print url", url)
cmd = ["deno", "run","--unstable" ,"-A","tools/printPdf.ts", "--outDir", args.outDir, "--url", url] cmd = ["deno", "run","--no-check","--unstable" ,"-A","tools/printPdf.ts", "--outDir", args.outDir, "--url", url]
if args.browser_path: if args.browser_path:
cmd.append("--chromeDir") cmd.append("--chromeDir")
cmd.append(args.browser_path) cmd.append(args.browser_path)
@ -87,6 +87,11 @@ def buildPdf(args):
print("cmd: ", " ".join(cmd)) print("cmd: ", " ".join(cmd))
p = subprocess.run(cmd) p = subprocess.run(cmd)
p.check_returncode() p.check_returncode()
cmd = ["java", "-jar", "tools/pdfbox-app-2.0.26.jar", "PDFMerger", "cover.pdf", args.outDir, args.outDir]
if args.verbose:
print("merge cmd: ", " ".join(cmd))
p = subprocess.run(cmd)
p.check_returncode()
commandList = { commandList = {
'build': build, 'build': build,

BIN
cover.pdf Normal file

Binary file not shown.