Subject: | |
From: | |
Reply To: | |
Date: | Fri, 8 Jul 2011 20:19:13 +0900 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello,
I wrote a very simple macro for NWP which will generate a Unicode text file from the frontmost Nisus Writer Pro rtf file. The Unicode file will be saved in the same folder, with a file name to which a suffix "_utf8" and the extension ".txt" are added. All the data -- not only the main text, but also the notes, tables... -- will be saved with this macro.
I think that I will use this macro to make a Unicode file for each of the "final" file of a work; I am writing a little Unicode search droplet in AppleScript, in order to be able to search in all the works I do.
I don't know if any of you will be interested in this macro, but I post it here.
Best regard,
Nobumi Iyanaga
Tokyo,
Japan
### macro begins
# Generate a unicode text file from the data of a NWP file. 11-07-11 ni
$doc = Document.active
if $doc == undefined
exit
end
$fpath = $doc.filePath
$newfpath = $fpath.filePathByAppendingComponentNameSuffix '_utf8'
$newfpath = $newfpath.filePathByChangingExtension 'txt'
Select All
Copy:Copy Text Only
$the_data = Read Clipboard
Write to File $the_data, $newfpath
### end of macro
|
|
|