(tempPara)
| 197 | |
| 198 | |
| 199 | def tempProcess(tempPara): |
| 200 | print("Dumping event templates...") |
| 201 | if not os.path.exists(tempPara.savePath): |
| 202 | os.makedirs(tempPara.savePath) |
| 203 | |
| 204 | # read the templates |
| 205 | templates = [] |
| 206 | with open("./" + tempPara.templateName) as tl: |
| 207 | for line in tl: |
| 208 | templates.append([0, line.strip(), 0]) |
| 209 | |
| 210 | pd.DataFrame(templates, columns=["EventId", "EventTemplate", "Occurrences"]).to_csv( |
| 211 | "temp_templates.csv", index=False |
| 212 | ) |
| 213 | |
| 214 | |
| 215 | def matchTempLog(templates, logs): |