Skip to content

Instantly share code, notes, and snippets.

View carlesbellver's full-sized avatar

Carles Bellver Torlà carlesbellver

View GitHub Profile
@carlesbellver
carlesbellver / pdf_toc_processor.py
Created October 11, 2019 10:21 — forked from markwk/pdf_toc_processor.py
Append a Table of Contents (TOC) to a PDF Document on Mac using Only Python and No External Dependencies
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#############################
#
# Append a Table of Contents (TOC) to a PDF Document on Mac using Python
#
# This script involves no external dependencies. Works and tested on Mac's default version of Python.
#
# Usage: python pdf_toc_processor.py -i <path-to-target.pdf> -b <path-to-bookmarks-file.txt> -o <path-to-output.pdf>
@carlesbellver
carlesbellver / tot.sh
Created July 13, 2022 11:48 — forked from chockenberry/tot.sh
A shell script for Tot
#!/bin/sh
basename=`basename $0`
if [ -z "$*" ]; then
echo "usage: ${basename} <dot> [ -o | -r | <file> | - ]"
echo ""
echo "options:"
echo " -o open dot in window with keyboard focus"
echo " -r read contents of dot"