Using a Photoshop PSD file as a template to create multiple Images

I have a Photoshop PSD image that is two layers: The image is transparent. Over that, I have a logo, that is semi-transparent. Over that logo, I have a Text Layer. That text layer contains some text, written using a particular font, size, character spacing, etc.

What I want is this:

  1. Open a specific PSD file
  2. Read a TXT file that contains short sentences. Iterate over it.
  3. For each sentence, modify the text layer to contain that sentence without disturbing the font settings, size, etc.
  4. Save a transparent PNG file of that new composition.

I can figure out #1, #2, and #4, but how do I do #3?