Question: For this assignment, you will use Python3 to create a simple templating engine. Your program should take as input a generic template with placeholders for


For this assignment, you will use Python3 to create a simple templating engine. Your program should take as input a generic template with placeholders for generic data, a set of input files containing data which should be applied to the template, and a date. Instantiated templates using the input data will be output to a subdirectory This assignment requires only Python3. Do not use Python2, sed, awk, or bash Data Format Your program should only process input data for items with an inventory of less than 10%. For example, an item with a maximum quantity of 100 and a current quantity of 9 should generate an output file, whereas an item with a maximum quantity of 50 and a current quantity of 39 should not. 1. Data files will be stored inside a directory called data within the same directory as your script. 2. Each file will be named based on the item number, an integer with exactly four digits, followed by the extension item. 3. An item file consists of exactly three lines: simple_name (string with no whitespace) item_name (string) current_quantity (integer) maxquantity (integer) body (string) 4. Example file named 3923.item b_vater Bottled Water 35 99 The finest spring vater you can purchase! Template Format Templates will include variable names to be filled in with data using double angle brackets. For any data file of the format described above, each of the variables should be substituted with the data's actual value. Your program should work for arbitrary templates using the same variables listed below corresponding to the item values described above. .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
