Python GIMP plug-in that loads an image from directory, inserts a text layer using data from a text file, saves the modified image and then iterates throught all the lines of the text file using GIMP.
Following variables need to be replaced with local directories:
path_data = 'C:\data.txt'
path_image_base = 'C:\image_base.jpeg'
path_ouput_directory = 'C:\'
Script python_fu_batch.py needs to be stored in Gimp plug-ins directory, then it can be executed from Gimp UI / File. In my laptop the script was located in C:\Users\User\AppData\Roaming\GIMP\2.10\plug-ins