nisus.com
https://www.nisus.com/forum/

Batch modify rtf properties
https://www.nisus.com/forum/viewtopic.php?f=18&t=6913
Page 1 of 1

Author:  jmm [ 2017-12-22 00:24:01 ]
Post subject:  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?

Author:  martin [ 2017-12-26 14:09:40 ]
Post subject:  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.
Code:
$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

More complex macros are possible of course, but hopefully this gets you started.

Author:  jmm [ 2017-12-26 14:30:19 ]
Post subject:  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.

Author:  phspaelti [ 2017-12-29 20:27:08 ]
Post subject:  Re: Batch modify rtf properties

jmm wrote:
It seems very time consuming to open and save each file if processing a large number of rtfs.

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:
I wonder if this could be handled by Applescript for batch processing.

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.
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?

jmm wrote:
Or does Nisus provide actions for workflows regarding document properties, as Microsoft Word does for Automator?

Automator isn't really good for anything. Who uses that?

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/