generating select options in python

This commit is contained in:
frankknoll
2023-11-09 11:49:58 +01:00
parent eb69b5d553
commit be62c55b2d
4 changed files with 150 additions and 17643 deletions

View File

@@ -16,6 +16,19 @@ def updateHtmlFile(symptoms, vaccines, htmlFile, defaultSelectVaccineOptionText
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')
def updateHtmlFile4SymptomsCausedByCOVIDLots(symptoms, batches, htmlFile):
symptomOptions = getSymptomOptions(symptoms)
for selectElementId in ['symptomSelect', 'symptomSelectX', 'symptomSelectY']:
_saveOptions(
options = symptomOptions,
htmlFile = htmlFile,
selectElementId = selectElementId)
_saveOptions(
options = getVaccineOptions(batches, 'Select Batch'),
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')
def _saveOptions(options, htmlFile, selectElementId):
HtmlTransformerUtil().applySoupTransformerToFile(
file=htmlFile,