NISUS Archives

July 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nobumi Iyanaga <[log in to unmask]>
Reply To:
Date:
Fri, 8 Jul 2011 20:19:13 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
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

ATOM RSS1 RSS2