New script to export notes to RTF or OPML (now with RTFD for images)

Dana Leighton's Avatar

Dana Leighton

03 Aug, 2010 02:21 AM

**** There is a new version of this script - click here for the most current version.

**** Update: 16-Aug-2010 - If you're running Mac OS 10.5 Leopard, and have trouble invoking the script from the Scripts Menu, see the workaround below - click here

**** Update: 25-Feb-2013 - If you're running Mac OS 10.6.8, an update to Sente's Sqlite engine seems to have broken the script's functionality. For a fix for this see this post

Suggestions seemed like a reasonable place to post this, although it's not a suggestion, but rather a solution.

I use a writing program called Scrivener, and wanted a way to export Sente notes to it. I used the houthakker script that exported to DevonThink, then exported the DevonThink files to OPML and imported to Scrivener. After the DevonThink trial ran out and I decided not to license it, I decided to modify the houthakker script to write out to OPML for import to Scrivener.

Well one thing led to another, and I created a script that exports Sente notes to either OPML or RTF. I learned a lot about Applescript and relived my previous career as a software developer, but I'm an academic now, and have to get back to some real work.

Anyway, The attached file is a disk image which contains the script, an installer that installs it in the right place, and installation and use instructions. It is licensed under the Creative Commons GNU GPL license which means you can use it, modify it, and redistribute it to your heart's content. i just hope it's as useful for you as it was for me. It is distributed without any warranty for its fitness or usefulness. Details of the license are in the disk image, or here:

I created a video tutorial on using the script to export notes from Sente into Scrivener. It is available from the following link:

If you do find it useful, and you feel the urge toward reciprocity, please consider donating to my favorite charity, the Lance Armstrong Foundation, which does great work for cancer survivors:

If you run it and encounter any problems or have suggestions, use the email address in the Installation Notes or post a message in this thread. I'll do my best to work on it some more, but I am getting really busy with research. Better yet, if you find a problem and can fix it or modification to improve it, send me the details so I can fix it for the next release (if there is one).

Dana Leighton

**** NOTE: Do not download the dmg linked to this comment. See the newest version linked to at the top of this comment! ****

Showing page 7 out of 7. View the first page

  1. 180 Posted by rrlist on 03 Jul, 2015 11:01 PM

    rrlist's Avatar

    I was fortunate enough to get a helpful response right away:

    Are the input files plain text? According to the man page, those options only work on > plain text.

    I've just reread the manual, and indeed it says those options apply only when converting txt to rtf. So I tried the following operations:

    1. textutil -convert txt *.rtf (Convert all rtf files in the current directory to .txt)
    2. textutil -convert rtf -font Avenir -fontsize 16 *.txt (Convert all txt files in the current directory to rtf, changing the font to Avenir 16)

    Note that I'm not comfortable with navigating through directories in Terminal, so I preceded these steps by selecting the folder I wanted to go to in the Finder, control-clicking, and choosing the New Terminal at Folder OS X Service.

    That did the trick for me. The first command left the original .rtf files intact and created .txt versions of them. The second command presumably overwrote the original .rtf files since I didn't specify what name the output should take.

    Converting to .txt and back obviously undid some of the formatting touches the script brought: Quotation and Comment were no longer in italics, the Sente link was no longer clickable, and there were no blank lines between sections. But those niceties are by no means crucial to me, and I was actually quite happy with the result.

    The way I did it this time means that I need to navigate to each folder within my big folder of exports from the Export notes to RTF or OPML script. I read somewhere about a way to make the commands work recursively, presumably going through each sub-directory in turn, so I may try that soon just to see if it works for the benefit of those with massive collections. For me, this represents a good balance between "manual" control and leveraging the power of Terminal to save some time.

  2. 181 Posted by Dana Leighton on 04 Jul, 2015 12:44 AM

    Dana Leighton's Avatar

    OK I am glad to know it worked on your system. On mine, textutil is dysfunctional. I create a txt file, try converting it to RTF with font and size, and I just get Helvetica 12. I will be getting a new Macbook at work, so I may try it on there and see if it's some weirdness in my OS installation.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac