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
# get api token with proper perms, ensure full "repos" for private repo access. | |
$ export auth="Authorization: token 123345465hfghfghfghgfhgfhfg" | |
$ export org="your_org" | |
# get the last page in the Link header. github API limits per_page to 100. Anything over this will require pagination. | |
$ curl -I -H "$auth" https://api.github.com/orgs/$org/repos | |
# go over all pages. Put this in a script, and save it. | |
#!/bin/bash |
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
pdftk original.pdf output uncompressed.pdf uncompress | |
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
pdftk stripped.pdf output final.pdf compress |