diff --git a/README.md b/README.md index 134dcc4..7f9aa8c 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Various talks & Lectures that I have given 20. [Sanderson's Laws of Magic](https://docs.google.com/presentation/d/1SNEEh2_i93V64Fnzg8_05vOGjJMSuagX8IyrLt-5xXk/present) 21. [multipart-emails](/talks/email-protocols/) - A short talk on how linking with mid/cid schemes works in multipart-emails. Related work: https://github.com/awdeorio/mailmerge/issues/86 22. [Payment Systems in India](/talks/payments-systems-in-india/) - A short 10 minute presentation on _some of the digital payment_ ecosystem in India. +23. [pystitcher](/talks/pystitcher) - pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input in the form of a markdown file. https://github.com/captn3m0/pystitcher A few more talks that I've done are on my [SpeakerDeck account](https://speakerdeck.com/captn3m0) and my [slides.com](https://slides.com/captn3m0/) profile page. diff --git a/pystitcher/clean.png b/pystitcher/clean.png new file mode 100644 index 0000000..b27f9d3 Binary files /dev/null and b/pystitcher/clean.png differ diff --git a/pystitcher/flatten.png b/pystitcher/flatten.png new file mode 100644 index 0000000..d8d1261 Binary files /dev/null and b/pystitcher/flatten.png differ diff --git a/pystitcher/github.png b/pystitcher/github.png new file mode 100644 index 0000000..c3d6e00 Binary files /dev/null and b/pystitcher/github.png differ diff --git a/pystitcher/keep.png b/pystitcher/keep.png new file mode 100644 index 0000000..6d5996b Binary files /dev/null and b/pystitcher/keep.png differ diff --git a/pystitcher/slides.html b/pystitcher/slides.html new file mode 100644 index 0000000..26eb4f1 --- /dev/null +++ b/pystitcher/slides.html @@ -0,0 +1,37 @@ +
+

pystitcher

+

PDF stitcher for humans.

+
+
+

Merging PDFs is easy

+

pdftk 1.pdf 2.pdf cat output final.pdf

+
+
+

Except when its not

+

(Managing bookmarks)

+
pdftk 1.pdf 2.pdf cat output final.pdf
+pdftk dump_data final.pdf > bookmarks.txt
+# More code here to add more bookmarks
+pdftk update_info_utf8 bookmarks.txt final.pdf final2.pdf
+
+
+
+

The last comment block of each slide will be treated as slide notes. It will be visible and editable in Presenter Mode along with the slide. [Read more in the docs](https://sli.dev/guide/syntax.html#notes)

\ No newline at end of file diff --git a/pystitcher/slides.md b/pystitcher/slides.md new file mode 100644 index 0000000..ea0c458 --- /dev/null +++ b/pystitcher/slides.md @@ -0,0 +1,162 @@ +--- +# try also 'default' to start simple +theme: seriph +# random image from a curated Unsplash collection by Anthony +# like them? see https://unsplash.com/collections/94734566/slidev +background: https://source.unsplash.com/collection/94734566/1920x1080 +# apply any windi css classes to the current slide +class: 'text-center' +# https://sli.dev/custom/highlighters.html +highlighter: shiki +# some information about the slides, markdown enabled +info: | + ## Slidev Starter Template + Presentation slides for developers. + + Learn more at [Sli.dev](https://sli.dev) +--- + +# pystitcher + +PDF stitcher for humans. + + + +--- + +# Merging PDFs is easy + +`pdftk 1.pdf 2.pdf cat output final.pdf` + +--- + +# Except when its not + +(Managing bookmarks) + +``` +pdftk 1.pdf 2.pdf cat output final.pdf +pdftk dump_data final.pdf > bookmarks.txt +# More code here to add more bookmarks +pdftk update_info_utf8 bookmarks.txt final.pdf final2.pdf +``` + +--- + +# [`pdfmerge`](https://github.com/metaist/pdfmerge) + +- unmaintained :cry: + + pdfmerge [-o FILE] PATH[RULE[, RULE ...]] + +Where RULE= + + [START][..][END][ROTATE] + +Also no bookmarks :cry: + +--- +# What if? + +```markdown +# Super Potato Book + +# Volume 1 + +[Part 1](1.pdf) + +# Volume 2 + +[Part 3](2.pdf) +``` + +--- + +# Show original PDFs + +--- + +# Metadata! + +```markdown +title: Super Jelly +Author: Nemo +keywords: potato, jelly +# Super Potato Book + +# Volume 1 + +[Part 1](1.pdf) + +# Volume 2 + +[Part 3](2.pdf) +``` + +--- + +# Existing Bookmarks? + +```markdown +existing_bookmarks: remove +# Super Potato Book + +# Volume 1 + +[Part 1](1.pdf) + +# Volume 2 + +[Part 3](2.pdf) +``` + +--- + +![clean.png](clean.png) + +--- +# Existing Bookmarks? + +```markdown +existing_bookmarks: flatten +# Super Potato Book + +# Volume 1 + +[Part 1](1.pdf) + +# Volume 2 + +[Part 3](2.pdf) +``` + +--- + +![flatten.png](flatten.png) + +--- + +# Keep Bookmarks? + +```markdown +existing_bookmarks: keep +# Super Potato Book + +# Volume 1 + +[Part 1](1.pdf) + +# Volume 2 + +[Part 3](2.pdf) +``` + +--- + +![keep.png](keep.png) + +--- + +![](github.png) \ No newline at end of file