This is a quick-and-dirty "Hitchhiker's Guide to the Galaxy" app I made in a couple hours for a Halloween costume. It plays the classic guide sound effect from the radio show and TV show, looks up definitions on Urban Dictionary (it's funnier than Wikipedia or h2g2.com) and reads them aloud in a British voice (if you install an external text-to-speech engine).
-
Clone or download this repository.
-
Use npm to install dependencies.
> npm install
-
Install Ivona Text-to-Speech with the "Brian" British English voice.
-
Sign up for a Mashape account, find the Urban dictionary API, and get your personal Mashape API Key. Put this into
config.js
. -
Launch Ivona's UI and enable the clipboard monitor.
-
Launch this app with node-webkit:
> RUN.bat
Feel free to file an issue; the code is messy and I'm happy to offer quick-fixes or guidance if you ever want to use this app.
It runs in node-webkit and was designed for my Microsoft Surface which, when properly decorated, can pass as the Hitchhiker's Guide. Other tablets should work as well.
It uses an unofficial Urban Dictionary API I found on Mashape. As luck would have it, looking up "Earth" produces appropriate results.
I used the Ivona Text-to-Speech engine with the "Brian" British English voice. Ivona is a commercial product; they offer a free 30 day trial. Ivona's UI has a clipboard monitor that will watch the Windows clipboard and read any copied text aloud. My app is built for this; it uses node-webkit's clipboard API to "copy" any definition it wants to be read aloud. It "copies" an empty string to tell Ivona to stop talking.
Windows 8 has an on-screen keyboard that automatically opens in certain situations. Unfortunately, focusing a textbox in node-webkit is not one of those situations. Fortunately, Windows 8 has an .exe that you can run to open the on-screen keyboard. This app invokes that .exe every time the text box received focus.
The visual design is... good enough. I was trying to match the Guide's glowing wireframe style from the classic BBC TV show, not its style from the Disney movie.
My code is licensed under the MIT License. Third-party components have their own licenses.