organizing a course

Posts: 18
Joined: Sun Jan 31, 2010 8:55 pm

Mon Aug 30, 2010 3:02 am Post

Such is the way with simple hacks!

I am not surprised that it doesn't work with images. If you want to play around with it, open up Applescript Editor, and run

Code: Select all

the clipboard as record

after copying some RTF content with images.

It looks like the relevant chunk of data is in an RTFD class instead of an RTF class. So the first modification to the script above would be to ask for class RTFD instead of class RTF.

If you do that, the bit of perl in the script more or less decodes the RTFD data, enough so that you can tell more or less what it is supposed to be: a chunk of RTF text with a reference to an image, followed by the image itself in some sort of embedded format. Ordinary RTFD files on OS X are folders containing some RTF and the associated image files.

So getting this to work with images means (a) finding a reliable way to decode the chunk of RTFD data that the applescript gives you (perhaps just chopping off the image data?) and (b) working out a way of getting it into a form that textutil can recognize and convert.

This is all beyond me!


Posts: 61
Joined: Tue Mar 30, 2010 3:11 am

Mon Aug 30, 2010 4:06 am Post

Thanks, David, I dont know any programming at all, so its even more beyond me. But now that I understand whats needed - in the general sense - I can ask the computing guys at work for help.

Ive played around with the compile as web archive method in Scriv, and while it does it require using an intermediary between Scriv and Moodle (eg Dreamweaver) that at least gives me the opportunity to do a global search and replace of all the image location info (which is not possible within the Moodle RTE). Thus I dont have to edit each image separately in Moodle.