mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
added solar
This commit is contained in:
parent
652afd5fd3
commit
66d77e8079
3 changed files with 14 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ pdfReader2 = pdfReaderToText(DATA_LOC_2)
|
|||
doc1 = pdfReader2.get_reader()
|
||||
print(doc2.property_description.waterHeating)
|
||||
|
||||
|
||||
# Transform
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from transform.types import (
|
|||
CompanyInfo, SurverySummaryInfo, AssessorInfo,
|
||||
PropertyDescription, PropertyDetail, Dimension,
|
||||
Walls, Roofs, Floors, Door, VentilationAndCooling,
|
||||
Lighting, WaterHeating, HotWaterCylinder,
|
||||
Lighting, WaterHeating, HotWaterCylinder, SolarWaterHeating
|
||||
)
|
||||
from datetime import datetime
|
||||
|
||||
|
|
@ -725,6 +725,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
"15.1 Hot Water Cylinder"
|
||||
]
|
||||
dict_ = self.two_columns_processor(data, sub_tites, avoid)
|
||||
|
||||
return HotWaterCylinder(
|
||||
volume=dict_.get("volume", ""),
|
||||
insulation_type=dict_.get("insulation_type", ""),
|
||||
|
|
@ -732,7 +733,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
thermostat=True if dict_.get("thermostat", "NO").upper() == "YES" else False,
|
||||
)
|
||||
|
||||
def get_section_16(self):
|
||||
def get_solar_water_heating(self):
|
||||
data = self.raw_data[self.raw_data.index("16.0 Solar Water Heating"):self.raw_data.index("17.0 Waste Water Heat Recovery System")]
|
||||
avoid = [
|
||||
"16.0 Solar Water Heating",
|
||||
|
|
@ -742,7 +743,11 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
"Solar Water Heating Details Known?"
|
||||
]
|
||||
|
||||
self.two_columns_processor(data, sub_titles, avoid, 16.0)
|
||||
dict_ = self.two_columns_processor(data, sub_titles, avoid)
|
||||
|
||||
return SolarWaterHeating(
|
||||
solar_water_heating_details_known=True if dict_("solar_water_heating_details_known", "NO").upper() == "YES" else False
|
||||
)
|
||||
|
||||
def get_section_17(self):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@ class HotWaterCylinder(BaseModel):
|
|||
insulation_thickness: str
|
||||
thermostat: bool
|
||||
|
||||
class SolarWaterHeating(BaseModel):
|
||||
solar_water_heating_details_known: bool
|
||||
|
||||
|
||||
|
||||
class PropertyDetail(BaseModel):
|
||||
age_band: str
|
||||
dimensions: List[Dimension] = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue