Skip to content

Instantly share code, notes, and snippets.

View danielsmith-eu's full-sized avatar
💭
homebrewing: finally, a hobby that mixes high current electricity and water

Dr. Daniel Alexander Smith danielsmith-eu

💭
homebrewing: finally, a hobby that mixes high current electricity and water
View GitHub Profile
@danielsmith-eu
danielsmith-eu / pdf-extract-images.py
Created January 27, 2025 10:52 — forked from XBigTK13X/pdf-extract-images.py
Extracts images from a PDF and attempts to compose any matching image masks.
#! /usr/bin/python3
# This script requires pdfimage (poppler-utils) and convert (imagemagick)
# Raw images will be written to <OUTPUT_DIR>/15-organized
# Attempts at merging masks and images will be output to <OUTPUT_DIR/30-masked>
# A sample of one image using all compose methods will be written to <OUTPUT_DIR>/25-samples
# Rewritten from https://gist.github.com/bendavis78/ed22a974c2b4534305eabb2522956359
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = '[email protected]'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }