MediaWiki, Mac and custom URL schemes

A lot of Mac applications have their own URL schemes. In the following table you can see some examples of custom URL schemes:

Application Custom URL scheme
Evernote evernote://
DEVONthink x-devonthink://
BibDesk x-bdsk://
OmniFocus omnifocus://
VoodooPad x-voodoopad-item://
TextMate txmt://



If you want to see all URL scheme handlers on your system you can install the freeware app RCDefaultApp. Also handleopenurl.com maintains a URL scheme index of more than 600 iOS apps.

Custom URL schemes are extremely valuable because you can address specific data of an application by using them. They are the basic building blocks of all hyperlinks. In my post “Automated summary creation linked with the source PDF file” you can see how I use x-devonthink URL schema in order to connect my notes with the source PDF file.

Moreover, as you can see in my post “Embed AppleScripts in a MediaWiki page” there is a custom URL scheme for AppleScript! In my next posts I will publish a series of AppleScripts, which use the “applescript://” URL scheme.

MediaWiki can recognize all these custom URL schemes if you add the following lines in the LocalSettings.php file:

$wgUrlProtocols[] = “evernote://”;
$wgUrlProtocols[] = “devonthink://”;
$wgUrlProtocols[] = “x-bdsk://”;
$wgUrlProtocols[] = “omnifocus://”;
$wgUrlProtocols[] = “x-voodoopad-item://”;
$wgUrlProtocols[] = “txmt://”;
$wgUrlProtocols[] = “applescript://”;

You can see my post “How to use DevonThink links in a MediaWiki page” for more detailed information.

Send DEVONthink tags to BibDesk as keywords

Continuing in the same spirit as in the previous post, I wrote an AppleScript for sending DEVONthink tags to BibDesk. Only one item should be selected in DEVONthink and BibDesk. No duplicate keywords are created in BibDesk.The AppleScript code is the following:
24
Jun 2011
COMMENTS No Comments

Add keywords to many entries of BibDesk at the same time

The following AppleScript performs the above function:

01
Jun 2011
COMMENTS No Comments

How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part II

How to create the dictionaries
Firstly your ebooks and papers should be inside inside a DevonThink database. Moreover each source should have its respective record in BibDesk. The “local URL” field of each record should have the DevonThink URL of the source. If you do not know how to do this you can read my post “How to connect a PDF file inside DevonThink with its record in BibDesk“. Finally you should select the records in BibDesk which will constitute the records of the dictionary and you should have one TextMate txt file open. Now you are ready to execute either the AppleScript for the creation of the link dictionary with the titles or for the second kind of dictionary.The AppleScript code for the link dictionary with the titles is the following:

A sample from the text which can be created is shown below:

The AppleScript code for the link dictionary with author-year compinations is the following:

A sample from the text which can be created is shown below:

The AppleScript code for the link dictionary with author-year compinations is the following:

A sample from the text which can be created is shown below:

Now you are ready to go to Adobe Acrobat Pro and use the AutoBookmark plug-in. In the following screen shots you can see the detailed steps in order to create the new dictionaries.

In this step you should select the txt file which was created by one of the two AppleScripts

Now your link dictionary is ready.

How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part I

Nowadays, it is possible for a researcher to amass a huge number of electronic papers and books about his specialized area of interest. Naturally there are a lot of cross-references between these sources. The usual way of managing these files is the creation of a bibliographical database in one of the numerous relative programs like EndNote, Papers, JabRef and BibDesk. In this post I will try to present an exciting new way of “managing” your files which in a way makes managing them obsolete!Specifically I created a workflow for embedding DevonThink hyperlinks into the very citations and bibliography entries of a PDF file. As a result when you want to read a cited paper or book you do not need to go to your bibliography manager program or even worse to the folder hierarchy of your hard drive in order to find the file. Instead you can just click the citation or the title or the author of the bibliography entry and the respective PDF file opens instantly! The magic of DevonThink hyperlinks in action!

The required tools/programs for this dream to come true are the following:

  1. Adobe Acrobat Pro for Windows
  2. AutoBookmark plug-in for Adobe Acrobat Pro
  3. A Windows virtual machine
  4. DevonThink
  5. BibDesk
  6. TextMate
  7. Link dictionaries
  8. The AppleScripts for creating automatically the link dictionaries from BibDesk

More details about the workflow

AutoBookmark searches page text for occurrences of specific words or phrases and generates links annotations according to the user specifications. Link dictionary is a collection of search terms (words, phrases and etc.) and corresponding link actions. When it finds a search term from a dictionary it automatically creates a link annotation using a link action that is associated with it. Each search term should be unique within a link dictionary (excerpt from AutoBookmark help file). So you need to have an appropriate link dictionary so as the hyperlinks to the sources to be created automatically by AutoBookmark.

For our case I consider optimal the use of two different dictionaries each with its own advantages and disadvantages. The first contains  various possible forms of author-year citations e.g. Clark 2008, Clark (2008, Clark Stephen (2008, Clark S. 2008, Clark S. (2008. The advantage of this dictionary is that the matches are almost 100% unique. However the probability of the match is somewhat small because of the high variability in the way that the citations are made. The second contains the source titles. Now the situation is the complete opposite because you can very easily have false positive matches if the title is too generic but there is no case of a missing match if the title is adequately complex.

In my next post I will describe how you can create the link dictionaries from your Mac.

How to connect a PDF file inside DevonThink with its record in BibDesk

I use BibDesk  to manage and create my bibliographies but all my read and annotated PDF files are inside DevonThink. So I wanted an easy and fast way to connect the PDF files with their respective records in BibDesk. Technically I wanted to populate the “local URL” and “local File” columns of BibDesk. Consequently I wrote an AppleScript which does this job. :-) Moreover this AppleScript assigns the tag/keyword “Linked with DevonThink” to the record in which is applied. In order for this script to work properly you just have to select one PDF file in DevonThink and its respective bibliography record in BibDesk.The AppleScript code is the following:

08
Mar 2011
COMMENTS 2 Comments

Some tools of the trade

I use the following hardware:
  • a MacBook Pro 17in
  • a MacMini (as a server for my wikis and my ebooks library)
  • an iPad
  • a Time Capsule
  • an iPhone 3G
  • several external hard drives (for backup)
  • a 27in LG monitor

In my academic workflow I use the following programs:

  • Skim: for reading papers and books (in pdf format)
  • Calibre: for organizing all my ebooks (read and unread)
  • DevonThink: for organizing everything that I have read
  • BibDesk: for reference management and automated bibliography creation
  • MediaWIki: for notes management
  • TextMate and LaTex: for writing my papers
  • AppleScript: for automating my workflow