Create MediaWiki and RTF links to specific time points of audio and video files of your iTunes library
Nowadays you can find from iTunes university and other sources a vast number of recorded lectures from the best universities of the world. Sometimes it would be helpful to have the ability to refer to specific points of them as you can do when you read a PDF file and you use DEVONthink. From now on there is an AppleScript for that!
I wrote two versions of this AppleScipt with a slightly different functionality. The first creates a link to a custom time point, which you set manually after executing it. One or more files should be selected in your iTunes library before executing it.
The AppleScript code for creating MediaWiki links is the following:
The AppleScript code for creating RTF links is the following:
The second version creates a link to the current track that plays in iTunes to the current time point.
The AppleScript code for creating MediaWiki links is the following:
The AppleScript code for creating RTF links is the following:
Again the code for the links is sent to the clipboard and you may paste it to a MediaWiki page or a RTF document. Afterwards, every time you click a link an AppleScript editor window opens with the required AppleScript code inside it. Finally, you may press cmd + R (executes the script), cmd + W (closes the window) and cmd + D (without saving) or have the same effect by executing the AppleScript of this post.
Create MediaWiki and RTF links to audio and video files of your iTunes library
I use iTunes in order to organize and play my media files. I have written the following AppleScripts in order to have the ability to create direct links to these files. These links are quite persistent because they are not depended on the path of each file.
You should have selected one or more media files in your iTunes library before executing the scripts. The code for the links is sent to the clipboard and you may paste it to a MediaWiki page or a RTF document. Afterwards, every time you click a link an AppleScript editor window opens with the required AppleScript code inside it. Finally, you may press cmd + R (executes the script), cmd + W (closes the window) and cmd + D (without saving) or have the same effect by executing the AppleScript of this post.
The AppleScript code for creating MediaWiki links is the following:
The AppleScript code for creating RTF links is the following:
Automated creation of references with hyperlinks from Skim
1. A LaTeX reference to the exact PDF page which can be inserted in a MediaWiki page without any modifications or problems. Moreover, the necessary code for the creation of MediaWiki link is also included. An example is the following:
(\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}: [x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2 27])
A prerequisite for the use of this reference is to have installed and properly customized the Wiki2LaTeX MediaWiki extension. I will write more about this and its importance in a future post.
2. A LaTeX reference that can be inserted in a text file together with the proper LaTeX code for the creation of the corresponding hyperlink. An example is the following:
(\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}: \href{x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2}{27})
3. A MediaWIki internal link to the wiki page of the source, followed by an external link to the PDF file itself. An example is the following:
([[Deconstructing the Laws of Logic - Clark]]: [x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2 27])
4. A DEVONthink url
How to use DevonThink links in a MediaWiki page
/Applications/MAMP/htdocs/MyWiki/LocalSettings.php
So in order for MediaWiki to be able to understand DevonThinklinks you need to add the following line to the LocalSettings.php file:
$wgUrlProtocols[] = 'x-devonthink-item://';
Then when you write in the edit mode of a MediaWiki page:
you just see
a nice hyperlink after saving.
Now MediaWiki and DevonThink are perfectly integrated! See a short demonstration in the following video.
If you want to learn how the wiki text in the above video can be created automatically using Skim, AppleScript and Textmate read the following posts:



