The VipRiser can produce more then just a PDF thanks to its ability to customize processing workflow using a plugin.
Listening to your print-outs
I do a lot of reading in my work (and my private) life and I always wished I could turn some of that text into spoken word so that I can take it with me out biking or hiking rather then staring at it on my screen at home. The OS X had text to speech functionality built-in since 10.4 (I think), however only with the Mavericks the quality of the voice is good enough for it to be truly usable. If you are into this kind of thing, that is :-).
There are different ways how to turn text into a voice track already. One of them being Add to iTunes as a Spoken Track service, but I use VipRiser for that. One big advantage is that whatever text I can print, I can listen to.
Setting up a workflow
I thought ‘print to speech’ is kind of interesting workflow, therefore I added it as a sample into the VipRiser distribution itself. You can install it from Preferences.
The plugins (workflows) will appear in the menu along with Folder, Kindle etc. and you can use them as VipRiser’s destination.
Customizing the ‘PDF to Podcast’ workflow
Although this sample workflow is derived from the real one I personally use, it is meant to be further customized by the end user. You can look inside by going to the Plugins directory (use Open button) and opening the workflow in the Automator.
The Automator workflows can get quite complex. This is great if you a programmer but understandably scary if you are not. Luckily there are many good resources for the Automator on the web to help you along, therefore I will not go into deep technical details here.
What does it do
- extract text from the PDF
- reflow the text
- turn text into an audio file
- add it to the iTunes
The reflow of the text is one of the tricky point. The problem is that words extracted from a PDF will most likely be broken up to satisfy given layout. The text to speech cannot deal with this on its own. The shell script step (a perl script) attempts to take care of this by ‘un-breaking’ broken words and clean up the extracted text somewhat. …I do not expect anyone to understand this code However, this part is directly influences the quality of text to speech conversion as extracted text may contain stuff that should not be spoken at all (e.g. headers, side notes) or that may not be in form of senses and paragraph (e.g. tables, lists). Getting this right very much depends on kind of documents you want to process.
How to use it
- set the destination to the workflow (e.g. Sample – PDF to podcast)
- the MP3 file will be added to the iTunes (playlist is configurable in the last step)
TIP: What works really great is printing articles out of the reader mode in the Safari.
A custom URL handler can provide similar functionality to that of a bookmarklet in a browser. Coupled with AppleScript’s ability to control many of OS X applications, this proves to be very powerful yet usable way to automate tasks.
Trigger Terminal Command As a Link
What I usually do is I keep a list of commands I frequently execute (e.g. mvn build, git update) in a text file accompanying whatever I work on at the moment, along with notes and references.
Each time I would want to run a command, I had to copy + switch to Terminal + paste. It is not exactly intellectually challenging process but it gets a bit tedious after while. Therefore I decided to automate it by creating custom terminal: URL protocol scheme which enables me to execute any script with click of a mouse.
1. define terminal scheme
2. create handler
This is very simple AppleScript handler. All it does it tells Terminal to activate and then runs a command which is passed in the URL. …and don’t forget to return 1 upon success.
3. activate the new URL scheme
Click the Save and Activate button and hide LinCastor application, leaving it running in the background.
Using the new ‘terminal:’ scheme
For this demonstration I regular TextEdit. However, most applications supporting embedded links should work with this.
Create link (Edit -> Edit Link…)
Enter shell command a link’s destination, with prefix terminal: You can split the lines using pressing <atl + enter> key. Although links can be few K in size, this method is not intended to do more then to trigger a few commands. If you need something more complex, think about putting it into a proper shell script file and trigger it from the link instead.
The resulting link should look something like this:
When you click it, command ‘ls -lrt’ (which lists a directory) should execute in your Terminal.
A word of caution!
Executing arbitrary command by clicking on a link is powerful thing to do. Since a link can be embedded in any HTML (web site, email, chat), be careful where it comes from and who is sending it to you before you click it.
Over the weekend, I decided to take a plunge and move my development machine to the 10.9 Mavericks and new Xcode. The biggest problems was with making sure the same application binary runs well both on 10.8 AND 10.9. This was a bit more challenging then I initially suspected, but I think I have managed at the end.
Some things to be aware of:
The permission settings for ‘assistive devices’ have changed in the Mavericks.
The “Enable access for assistive devices” in the Accessibility pane of the System Preferences is gone now. You’ll have to go to the Security & Privacy > Privacy and make sure the application in question (ActoTracker, TagoMan, etc.) shows up in the list of applications allowed to control computer and is enabled. If the application is not in the list, you can add it by dragging it in.
This is well known issue and many apps are affected by this change.
There is nice vimeo showing how it works here: http://vimeo.com/77882327 ,although it is not directly related to my apps.
The ActoTracker may crash right after the ‘online update’ on 10.8
This is one ugly problem that may happen on limited number of machines. Because the crash happens right during the startup, the only way to recover is to download the new version directly from the site and install it manually. Updates will continue to work for upcoming versions.
The VipRiser’s driver re-install on 10.9
You may need to re-install the print driver on the 10.9. One way to do it is to use Install Print Driver in the Help menu and follow the instructions through.
The revised ActoTracker’s journal format makes it very easy to share information with other Macs. As it is just a regular folder with all records contained within it, it can be synchronized in various ways. Zip + email it, sync it with drop box or the google drive.
The ActoTracker also allows you to store an arbitrary documents inside the journal folder, such as MS Word or KeyNote document and reference it in a journal by its path. Doing so will automatically make the document path relative to the enclosing journal folder.
You can use new “Archive to Document Folder” menu to copy a file references from a journal entry right into the journal folder.