title: Editing Photoshop PSD text layers programmatically
body: <p>I have a multi-layered PSD, with one specific layer being non-rasterized text.  I'm trying to figure out a way I can, from a bash/perl/python/whatever-else program:</p>
  
  <ol>
  <li>load the PSD</li>
  <li>edit the text in said layer</li>
  <li>flatten all layers in the image</li>
  <li>save as a web-friendly format like PNG or JPG</li>
  </ol>
  
  <p>I immediately thought of <a href="http://www.imagemagick.org/" rel="noreferrer">ImageMagick</a>, but I don't think I can edit the text layer through IM.  If I can accomplish the first two steps some other programmatic way, I can always use ImageMagick to perform the last two steps.</p>
  
  <p>After a couple of hours of googling and searching CPAN and PyPI, I still have found nothing promising.  Does anyone have advice or ideas on the subject?</p>