mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-07-27 14:35:10 +00:00
39 lines
No EOL
1.4 KiB
Python
39 lines
No EOL
1.4 KiB
Python
import os
|
|
from pdfReader.pdfReaderToText import pdfReaderToText
|
|
from etl.scraper.scraper import SharePointScraper, SharePointInstaller
|
|
from pprint import pprint, pformat
|
|
import logging
|
|
from etl.utils.logger import Logger
|
|
from etl.validator.validator import DomnaSharePointValidator
|
|
|
|
logger = Logger(name="main.py", level=logging.DEBUG).get_logger()
|
|
DATA_LOC_1 = "/tmp/sharepoint/Abdul Koddus/W.C. 03.03.2025/Southern Housing/10 Turnberry Close TN38 0WL/PRE SITE NOTES.pdf"
|
|
DATA_LOC_2 = "/tmp/sharepoint/Abdul Koddus/W.C. 03.03.2025/Southern Housing/16 Sunningdale Drive TN38 0WB/PRE SITE NOTES.pdf"
|
|
|
|
# Extract and trasform
|
|
pdfReader = pdfReaderToText(DATA_LOC_1)
|
|
doc2 = pdfReader.get_reader()
|
|
pdfReader2 = pdfReaderToText(DATA_LOC_2)
|
|
doc1 = pdfReader2.get_reader()
|
|
print(doc2.property_description.waterHeating)
|
|
|
|
|
|
# Transform
|
|
|
|
def main():
|
|
# south_coast_scraper = SharePointScraper(SharePointInstaller.SOUTH_COAST_INSULATION_SERVICE, development = True)
|
|
# south_coast_scraper.download_file_for_each_address()
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
|
|
# Current todo list
|
|
|
|
# - [x] Finish off scraping for section that I need to finish
|
|
# - [in progress] Pydantic format for deemed report
|
|
# - [] Generate deemed report -> scopre of automations thats possible
|
|
# - [] Docker compose to an sql database in docker compose (2 hours, then work on sql)
|
|
# - [] Deploy via terraform to aws (1 day) |