how to automate report generation (write insert text)

I have a .text file, it contains filename(picture) , coordinates, of detected defects.
This information should be inside a report.
page 1 is header & info
page 2 list of contents, contains a table with issue number, brief description & coordinates.
page 3 …xx are report pages, that contain the before named picture, and a table, containing the same info as in index, plus more. these pages would be generated one per line in the text file.

Question is, is this a job for a Write script , if so, are there any example-scripts.
or is it a job for some sort of elready-existing functionality that maybe reads the text file as cvs, and processes it ?
or, is it somehow to be automated from terminal (linux) - using search&replace to populate correct places with text

FWIW You seem to be wanting to save structured data. That immediately says to use a database (hence Base).