« | Home | »

PS_BRAMUS.TextExport 1.3 – Automatically export all Text layers from Photoshop PSD to a Text file (PSD2TXT)

JSXColleague Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to a text file (viz. a PSD2TXT tool/script), enabling one to slice even faster than he already can. Last week I released the first version of the script (v 1.2), now it’s time for an update.

What has changed?

  • UPD: Base rewrite, now gets all layers (sets & regular ones) in one variable.
  • UPD: Gives a nice warning, instead of a javascript error, when no file is open.
  • ADD: Layer Path & Layer Name in export.
  • ADD: Cycle Multiple Files when more than one file is open (user can still choose to only parse the current document though).

Download PS_BRAMUS.TextExport (PSD2TXT)

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.3 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.3.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 *************************************).

When running PS_BRAMUS.TextExport on multiple files, the useDialog & openFile parameters will be overriden. All files will be saved as nameofyourpsdfile.txt in your documents folder and only a notice that the files were saved will be shown.

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

Tags

, , ,


About this entry

Best of Bram.us