-
-
Save dataxpress/ec9daedc8f9b896f263cba7f9170edd1 to your computer and use it in GitHub Desktop.
Revisions
-
pnc revised this gist
Mar 17, 2018 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/bash set -e CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/ "$1" stdout -l eng | xml esc) @@ -13,7 +13,5 @@ hex=$((cat <<EOF EOF ) | plutil -convert binary1 - -o - | xxd -p | tr -d '\n') xattr -w -x com.apple.metadata:kMDItemFinderComment "$hex" "$1" mdimport "$1" -
pnc created this gist
Mar 17, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash set -ev CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/ "$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"> <string>$CONTENTS</string> </plist> EOF ) | plutil -convert binary1 - -o - | xxd -p | tr -d '\n') echo $hex xattr -w -x com.apple.metadata:kMDItemFinderComment "$hex" "$1" mdimport "$1"