mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-07-12 13:29:08 +00:00
41 lines
1.3 KiB
Python
41 lines
1.3 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.INFO).get_logger()
|
|
|
|
def main():
|
|
"""
|
|
This script returns a list of names that is misformatted in the sharepoint
|
|
"""
|
|
|
|
# Correct dates format checker
|
|
south_coast_scraper = SharePointScraper(SharePointInstaller.SOUTH_COAST_INSULATION)
|
|
south_coast_names = south_coast_scraper.list_of_names_that_has_the_wrong_date_format()
|
|
|
|
jjc_scraper = SharePointScraper(SharePointInstaller.JJC)
|
|
jjc_names = jjc_scraper.list_of_names_that_has_the_wrong_date_format()
|
|
|
|
logger.info("Good morning Cyrus")
|
|
if south_coast_names:
|
|
logger.info("South Coast with wrong date format:")
|
|
logger.info(pformat(south_coast_names))
|
|
|
|
if jjc_names:
|
|
logger.info("JJC with wrong date format")
|
|
logger.info(pformat(jjc_names))
|
|
|
|
# Make a quick script that checks if the Pictures folder exists in a certain fail directory
|
|
|
|
|
|
# Make a cron job in github runner for Cyrus for this
|
|
|
|
logger.info("Hope this helps! <3")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|