Development: Adobe InDesign script – createMyXML

This script generates an xml file (.xml) from an indesign document (.indd)

It was written largely to streamline the web publishing process at Imprint and is a major component of the Web Publishing system that I developed.

Find it here: http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1252518

Details:
Two files are required:
* createMyXML.jsx
* createMyXML.map

Extract the the two into your InDesign scripts folder and follow the instructions below:

* Open the createMyXML.map file in a text editor
* Follow the instructions in the file and add your Paragraph Styles and associated xml tags
* Open your InDesign document
* Assign each story (i.e. all textboxes relating to a story) in the document a unique scripting label (Window->Automation->Scripting Label)
* Run the script
* The script will tag the content accordingly based on the Paragraph Styles used for content

Notes:
* The script will only tag textboxes
* Multiple pages are supported
* To avoid being prompted for the map file every time, open the createMyXML.jsx file in a text editor, browse down till you see /** —-EDIT—- */ and enter the location of the map file
* I have only tested this on Windows with InDesign CS2 (theoretically, it should work on Mac and CS as well)

The script is licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)


Tools used: JavaScript, Adobe Scripting Engine, Adobe InDesign

Development: Adobe Photoshop script – optimizeMyImages

This script resizes, formats and saves a batch of images from the selected folder to the JPEG format to a specified folder.

Description

The images are proportionally resized to either the maximum width or maximum height (depending on which is greater). If an image is smaller the the maximum width and height, it is not resized. (The max width and max height are set as constants in the script)

The images are converted to RGB.

The images are saved as medium-high quality JPEGs. If the image is already a JPEG, it is not converted. If the image is not a JPEG, it is saved as a JPEG.

The images are closed.

Requirements

  • The MAX_WIDTH and MAX_HEIGHT constants are set in the script

Limitations

PDFs are not supported

Issues

  • TIFs and PSDs may sometimes throw a save dialog at you. In this case, you’re forced to save a copy of the image, as cancelling the save dialog breaks the script execution.

Planned changes

  • If possible, disable prompts and dialogs (such as Save As)
  • Initial prompt upon running the script which gives user options to select max width, max height and colour mode options

Download

optimizeMyImages.jsx


Tools used: JavaScript, Adobe Scripting Engine, Adobe Photoshop