Mime-Version: |
1.0 (Apple Message framework v1084) |
Content-Type: |
text/plain; charset=us-ascii |
Date: |
Fri, 8 Jul 2011 20:19:13 +0900 |
Reply-To: |
|
Subject: |
|
From: |
|
Content-Transfer-Encoding: |
quoted-printable |
Sender: |
|
Comments: |
|
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
|
|
|