I have a text file as shown below - This is the input text file (can be CSV or tab de-limited):
File:1 Template Item Item_Colour Item_wt Grows_in Salad Raw fruit Apples Red_Green 300 snowy fruit Orange Oranges 250 Sunny fruit Grape Violet 25 Sunny Vegetable Carrot Red 100 Hilly Yes Yes
The first column template describes the text format (the template) that has to be generated. The subsequent columns the item that has to be populated in the selected template.
The output file should look something like this:
File:2 Template: Fruit Selected fruit :Apple Apple color is Red_Green The average weight of Apple is 300 gram Apple grow in regions that are snowy Template: Fruit Selected fruit :Orange Orange color is Orange The average weight of Orange is 250 gram Orange grow in regions that are sunny Template: Fruit Selected fruit :Grape Grape color is Violet The average weight of Orange is 25 gram Grape grow in regions that are sunny Template: Vegetable Selected Vegetable :Carrot Carrot can be used in salad It can be eaten raw Average weight of carrot is 100 gram Carrot grow in regions that are Hilly
The template_file can be in file:1 or can be separate file.
I’m using Sublime text 3 (free edition) as the text editor
I’ve learnt about Snippets and Emmet through YouTube.
I do not know how to process two files to generate a result
There are multiple instances of this and several other templates one below the other within the same text file.