This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import argparse | |
import json | |
import sys | |
def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# RIP Aaron Swartz, killed by corporate greed. (Not JSTOR itself, they are a charity; | |
# I mean the publishers they must contract with | |
# to offer the limited public service that they do.) | |
# | |
# “There is no justice in following unjust laws. | |
# It’s time to come into the light and, in the grand tradition of civil disobedience, | |
# declare our opposition to this private theft of public culture.” ~ Aaron Swartz | |
# | |
# Requires: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Reorder pages in a PDF file to print a booklet. | |
# Then, print the output PDF in duplex mode, short-edge binding, 2 pages per sheet. | |
SCRIPT=$(basename "$BASH_SOURCE") | |
INFILE= | |
OUTFILE= | |
VERBOSE=false | |
SYSTEM=$(uname -s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove multiple text watermarks from a PDF file. Requires xxd and qpdf to work correctly. | |
# | |
# Usage: | |
# | |
# remove-pdf-watermark.sh "Your Input File.pdf" "Your Output File.pdf" [WATERMARK1] [WATERMARK2] [WATERMARK3] [...] | |
# | |
# For Example: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
# 1) install exiftool and qpdf | |
# https://exiftool.org/ | |
# http://qpdf.sourceforge.net/ | |
# (can be installed with homebrew: brew install exiftool qpdf ) | |
#### | |
# 2) remove metadata - this step is reversible, so we will need to recreate the PDF afterwards | |
exiftool -all:all= /location/of/some/file.pdf |