RTFD --> HTML conversion?

kilowatt

mach-o mach-o man
Hello all,

I'm wondering if there's a way to convert RTFD files (which contain images) into HTML. Preferably, something that is either command-line, or apple scriptable.

I've been googling all day, have only found one such utility, yet it depends on an old program distributed binary-only.

Any help would be great!

Thanks!
 
'I'm wondering if there's a way to convert RTFD files (which contain images) into HTML.', yes.

'... either command-line, or apple scriptable.', yes and yes.

'Any help would be great!', well - a '.rtdf' file is really a 'Package'.

To view the contents of a 'Package' one only needs to do a right button click (<control> click - for single button users), 'Show Package Contents' menu item selection. In the resultant displayed folder will be one graphic file for each graphic image viewed within the '.rtfd' file (by a capable text editor), plus a 'TXT.rtf' file.
Launch 'Terminal', enter ...

cat

..., drag the 'TXT.rtf' file onto the 'Terminal' window, click on the 'Terminal' window (to make it the front most), and press the <return> key.

You should then see the format of the '.rtfd' file, and its graphic images and text relationships.

Now it is just a matter of using AppleScript, Bash, C, Cocoa, C++, Perl, Python, Ruby, etc.
 
Hello from 2011!

I would love to be able to have this process automated too. I just need the rtf from the rtfd file (i.e. no images).

I realise I can do this using Show Package Contents (helpfully described by barhar in post #2 above). Would love to automate this.
 
Back
Top