Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| #!/bin/sh | |
| VERSION=0.11.2 | |
| PLATFORM=darwin | |
| ARCH=x64 | |
| PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH" | |
| mkdir -p "$PREFIX" && \ | |
| curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \ | |
| | tar xzvf - --strip-components=1 -C "$PREFIX" |
| // A means of using underscore.js to do templates with conditionals | |
| // Inside of underscore's template, it returns a function that uses | |
| // 'with' on a variable named obj, and you can touch into that using | |
| // inline JS and <% %> wrappers | |
| // A template with conditional display of last names: | |
| var good = _.template("Hello: <%= name %> <% if (obj.lastname) { %> <%= lastname %> <% } %>"); | |
| // A template that tries to do that, but fails: | |
| var bad = _.template("Hello: <%= name %> <% if (lastname) { %> <%= lastname %> <% } %>"); |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.