« | Home | »

PS_BRAMUS.TextExport 1.2 – Automatically export all Text layers from Photoshop PSD to a Text file

JSXColleague Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to a text file. Since I’ve scripted Photoshop before (heck, I even steered Photoshop from within C#) it was no biggie for me to knock up a simple script, which I dubbed TextExport

After Johan placed his request, I quickly knocked up a script which loops all layers (1.0), then (pretty important) expanded it to loop groups of layers too (1.1) and finally added some user friendly stuff like giving one the option to choose where to save the file holding all text elements (1.2).

Download

Update November 2008:
PS_BRAMUS.TextExport is outdated and has been replaced with PS_BRAMUS.TextConvert which does both import and export!

Right here:

Installation / How to use

  • Download PS_BRAMUS.TextExport from the link above
  • Extract it to Presets/Scripts folder of your Photoshop installation folder (defaults to C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts on Windows)
  • Restart Photoshop if it was already running
  • Open the PSD you wish to export text from
  • Now, when having a file opened, go to File > Scripts and select PS_BRAMUS.TextExport.1.2 from the list. textexport-small.jpg
  • Wait until the output file appears :)

Configuration

Three settings in PS_BRAMUS.TextExport can be configured, all to be found in the .jsx file itself.

  • Open up PS_Bramus.TextExport-1.2.jsx with your favorite texteditor
  • If you want to choose where to save the file to, set useDialog to true. If set to false (default), the output file will be saved into your documents folder
  • If you don’t want the exported file to be openend after the export has run, set openFile to false. If set to true (default), the output file will automatically be opened by your default text editor.
  • In the export file, each line is separated by a separator string. Change this one to use one you like (defaults to *************************************).

Example

I’ve tested PS_BRAMUS.TextExport with a pretty complex PSD, which holds the design of 3RDS. Here are the results:

Input PSD

TextExport Input

Output TXT

TextExport Output

Make a donation

It certainly is no obligation but it would most certainly put a smile on my face ;)

Spread the word!

  • del.icio.us
  • digg
  • Ma.gnolia

About this entry

Best of Bram.us