Posts

MacOS OCR and translate in console

Image
Had received a purple envelope from Belastingdienst.nl with some important information of the 30%, so needed to get this into English.

Made for a good reason to figure this process out.


So it looks like Tesseract-OCR is the best Open Source OCR package I could find and the whole project is at https://github.com/tesseract-ocr/tesseract and it credits Google as the developer at https://en.wikipedia.org/wiki/Tesseract_(software)

For the translation we will use the Translate Shell, found at https://www.soimort.org/translate-shell/. This lovely little script supports a number of translation engines, so one of them should work for you.

1. Scan the letter.



Many options here, so not going to waste time on how to get this done. Just if you have a text option and go for 300DPI. We need TIFF on the other end, so if you can get TIFF, just do that.

2. Install the software

brew install tesseract brew install translate-shell
3. Run the software

tesseract input.tiff output trans -i output.txt

Ijshockey Nederland 2018/2019 Kalender

Image
All the games scheduled as they appear on the Ijshockey Nederland website.


MacOS Combine PDF's Documents

Image
Combining multiple PDF documents on MacOS is included with MacOS.

Turns out Apple included an Automator script for "Combine PDF Pages" with the OS and a Python script in the same folder.

So from terminal, you simply call the Python script and supply the output file (-o) with the input files.

/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py -o {output.pdf} {input1.pdf} {input2.pdf} {input3.pdf} {...}
A lot simpler and quicker than some other solutions.

Linux Unlimited Storage Folder using G Suite (Beta)

Image
Building a simple folder on your Linux server with unlimited cloud storage behind it. I will explain the basic concepts used and some guidelines on how to make it all work.

Basic concept

You will have /mnt/gdrivemount


And /mnt/gdrivewrite

And then UnionFS to combine the two into /mnt/gdriveunionfs/



Now, because Google Cloud Drive API limits the amount of requests per seconds, it is suggested that you add a cache into path to help limit these requests, so the /mnt/gdrivemount changes to


To be able to control what and when files are actually moved from your disk storage into the cloud storage, you will control the move to cloud process.

Imax vs Dolby Vision

Image
I was asked over the holiday which is the better one, IMAX® and Dolby Cinema™. I'm not going to compare 3D options in these two, but let's look at what you can expect from your money. In both cases, the experience is being managed and guaranteed by the license holder, so you are guaranteed a good experience regardless.

I'm also going to compare two versions of IMAX® because they have been around for a while and this means you could end up in a film version of the cinema. The Dolby™cinemas are newer and are a partnership with Christie, so they are digital.

Android and IOS Emulators on MacOS

Image
Having to develop applications for Android and IOS on MacOS outside of the respective IDE's, it can be annoying to get the emulators up without launching the IDE's.

I'm not going to explain how to get the emulators configured, those are well documented, but rather just give the command to launch them.



Android Emulator:~/Library/Android/sdk/tools/emulator -list-avds~/Library/Android/sdk/tools/emulator -avd {AVD}IOS Emulator:xcrun simctl list devicetypesxcrun simctl list runtimesxcrun simctl create {devicetype} {runtime}xcrun simctl boot {UID}open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app

YouTube Video of the Week: Star Wars: The Last Jedi Trailer (Official)

Image
This weeks video choice was easy... Very easy... From a galaxy far far away...