Skip to content

Instantly share code, notes, and snippets.

@alexlines
alexlines / ocr-shot.sh
Created November 25, 2019 19:32 — forked from pnc/ocr-shot.sh
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
# /etc/init/bananastand_editorial.conf
setgid ubuntu
setuid ubuntu
start on runlevel [2345]
stop on runlevel [016]
# log stderr to /var/log/upstart/bananastand_editorial.log
console log
respawn
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2010.01
Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl
Packager: Adam Vollrath <[email protected]>
Version: 1.8.7
Release: 3%{dist}
License: GPL