Extendscript of the Week: Create a upgraded copy of Book

Wednesday, October 12 2011 @ 7:09 AM, By anarora

 

As part of the series ‘Extendscript of the week’, we are providing an extendscript to Create a upgraded copy of Book that upgrades a legacy book and its components to latest FrameMaker version. This will show how to use FrameMaker ESTK to traverse a hierarchical book and perform operations on the components.

Download the zip file from BookUpgrade and unzip the content to local disk.

About the Script

  • It contains 3 scripts, BookUpgrade.jsx which is the caller function to handle the workflow, BookIterator.jsx which is used to iterate over the book components and BookUpgradeUtils.jsx that has utility functions (Open and Save) used in the automation
  • The script works on FM/MIF, nested books and its components as well as on the hierarchical components (Folders templates)
  • Any XML file, dita or map which is a part of the book is left untouched
  • The script traverses through the book, opens the book component file silently, saves it and then closes it. A backup of all the files will be created at the same location as the book files

Steps to use the Script?

  • Launch FrameMaker
  • Open any legacy book (or use the file Sample.book from the samples provided here: BookUpgradeSampleFiles)
  • With focus on book, run the script BookUpgrade.jsx
  • An alert will come, asking for your confirmation. If you click Cancel, the operation will be aborted
  • If you wish to continue by pressing OK, the script will run and convert all the chapters, including the Book itself, to FM10 version

Hope this simple automation will help to reduce your manual efforts and provide further insights into Extendscript usage.

Regards,
Anchal Arora

FrameMaker Engineering Team

(Resources: BookUpgradeScript , BookUpgradeSampleFiles)

  • Pingback: ExtendScript der Woche: »Buch-Upgrade« – FrameMaker-Automation mit FrameScript & ExtendScript

  • http://smalbro.dk Bjørn Smalbro

    I am looking for someone to help me do some further developments on this script. I’d like to be able to point it at a folder containing multiple fm files – both book files and single fm files – and run the conversion. It will take too much time running each book file and I am not sure whether all single fm files are used in book files. Can you point me to some developer ?

  • Categories

  • Archives

  • Authors

  • Useful Links

  • Recent Comments

    • Lois Patterson: I’m always happy to see math support, although I’m not currently using FrameMaker. I have...
    • Olga: I know it’s a really old post but I was unable to find any information online. I need to number the...
    • click: yes. http://wwwimages.adobe.com/www .adobe.com/content/dam/Adobe/e n/volume-licensing/pdfs/avl...
    • tiggyboo: I know the specs say IE 9 or greater is required – but was Server 12 developed specifically for IE or...
    • Ronny: Thank you, thank you!!!