Skip to content

Instantly share code, notes, and snippets.

View nobucshirai's full-sized avatar

Nobu C. Shirai nobucshirai

View GitHub Profile
@nobucshirai
nobucshirai / ocr.sh
Last active February 1, 2025 01:22 — forked from rok-git/ocr.sh
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine
#!/bin/bash
SCRIPTNAME=$(basename "$0")
function realpath () {
f=$@;
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
@nobucshirai
nobucshirai / ipm.py
Created October 19, 2018 08:15 — forked from mkakh/ipm.py
#!/usr/bin/env python
import sys
import json
from optparse import OptionParser
# loadJson :: String -> Dict
def loadJson(filePath):
with open(filePath, 'r') as f:
jsonDict = json.load(f)
return jsonDict