I’ve always been fascinated by the Plan9. The idea that everything is just a file appeals to me because it means you can work with the system using simple tools. Everything works pretty much the same, all you need is your trusted ls, cat, grep, cp and grep. It is almost like having a conversation with the system :-) …well, anyhow…
Another cool thing is the way Acme works. The Acme is Plan9′s text editor, but because because everything in the system is pretty much just a text file, it doubles as the ‘graphical’ user interface as well. Commands are just a text like “Open” or “Copy” and a menu is a list of commands. Very simple. And because is is all just a text, you can add new commands or amend existing ones by editing. Inter-process communication is done in similar way using the Plumber to interpret text and turn it into series of commands to drive other applications. Thus, the whole user interface is kind of like one interactive text document, …or shell, or log, or terminal - yes it can get rather confusing sometimes.
…but like the concept. As long time Mac and Unix user I always wished to bring some of that functionality to the graphical apps I am using every day. Bridging the text with the drag & drop – thats why I created Tactor.
Imagine simple uses case:
- You grep stuff in the terminal, would it not be cool to turn it into a file list you can drag and drop? or to just to a line number with the match?
- Or someone sent you a log with a java exception in it, would it not be nice just to select it and load the corresponding source file in an editor?
- What about piping output of a command into any text field / document – the vi way?
Tactor makes it happen for me. A lot of the functionality depends on pattern / file matching so it needs to be customized by an user to get the best results, but I think it is well worth it and it is rather easy to extend.
I’ll continue posting my matching scripts as to be an inspiration to others.
After looong wait, I finally released the first BETA version to the public. The new TagoMan is full rewrite of the original. …as the reborn #2 had been :-) But I think I got it now. The new version is more then just a simple tag setter. It is full-blown tag manager now, with all bells and whistles. In many ways, it is designed to be a companion to the ActoTracker. My vision is to have ActoTracker deal with the time aspect of document management and TagoMan handle the overall organization / overview.
Please keep in mind this is the first public beta, therefore do not expect everything to work 100% yet. It is still a work in progress and I plan to introduce some new cool features in upcoming months.
One of the features that sets it apart already is its ability to use tag hierarchies. It took a bit of trial and error to get right but I think the end result is pretty usable.
Another thing that I am working on right now is to support text based tags. Would it not be great if I could ‘tag’ this paragraph by writing something like @Personal+Todo ?
The main reason why I decided to clean up TagoMan (I’ve been actually using it for the past 3 years in-house) and release it, is to get real-world feedback. So if you have any suggestions, please do not hesitate to contact me.
The BETA version of TagoMan is available here.
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.