Batch modify rtf properties
Batch modify rtf properties
I realize it is possible to modify keywords or authors of single rtf files in Nissus Writer Pro. But I need to do it for a large number of files. Could anybody advise me how to do it in Terminal, with an Applescript or any other app?
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Batch modify rtf properties
It should be possible to accomplish your task directly in Nisus Writer using a macro. Here's an example macro that's quite straightforward. It will ask you to choose one or more files (in a standard file dialog) and then set the author and keywords to some fixed pre-determined values.
More complex macros are possible of course, but hopefully this gets you started.
Code: Select all
$filePaths = Choose Files
ForEach $filePath in $filePaths
$doc = Document.open($filePath)
$doc.setProperty("author", "Dr Seuss")
$doc.setProperty("keywords", "chartreuse, ova, piggy")
Save
$doc.close
End
Re: Batch modify rtf properties
It seems very time consuming to open and save each file if processing a large number of rtfs.
I wonder if this could be handled by Applescript for batch processing.
Or does Nisus provide actions for workflows regarding document properties, as Microsoft Word does for Automator?
Thank you.
I wonder if this could be handled by Applescript for batch processing.
Or does Nisus provide actions for workflows regarding document properties, as Microsoft Word does for Automator?
Thank you.
Re: Batch modify rtf properties
Have you tried Martin's macro? You can select lots of files and it will go through all of them and change them accordingly.jmm wrote:It seems very time consuming to open and save each file if processing a large number of rtfs.
You could save the central part of Martin's macro and then write an applescript, that uses that and applies it to relevant selections of files via an applescript.jmm wrote:I wonder if this could be handled by Applescript for batch processing.
But alternatively you could write a Nisus macro that goes through the file hierarchy and changes all relevant files in the path. NWP's ability to manipulate files is no more cumbersome than applescript's, so you don't gain much from using applescript.
Which solution you choose, really depends on your set-up, and what you are trying to achieve. Do you have a regular stream of files that need to be changed in this way?
Automator isn't really good for anything. Who uses that?jmm wrote:Or does Nisus provide actions for workflows regarding document properties, as Microsoft Word does for Automator?
philip