mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
save changes
This commit is contained in:
parent
4b97b874d3
commit
0ecb5dce9d
1 changed files with 4 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ import os
|
|||
from etl.scraper.scraper import SharePointInstaller
|
||||
from etl.scraper.scraper import SharePointScraper
|
||||
|
||||
board_id = "6097548932"
|
||||
board_id = "4965130190"
|
||||
monday_key = "eyJhbGciOiJIUzI1NiJ9.eyJ0aWQiOjQ5ODc2ODQxOCwiYWFpIjoxMSwidWlkIjozNjE3ODAzNCwiaWFkIjoiMjAyNS0wNC0xMVQxMToyMzoxNy40NjdaIiwicGVyIjoibWU6d3JpdGUiLCJhY3RpZCI6MTM5OTc4MjMsInJnbiI6InVzZTEifQ.-2Lit4s46ZF6AXuMW9t0TxIaFLkHqD4Yo-PyM9i2XZY"
|
||||
monday = MondayClient(monday_key)
|
||||
|
||||
|
|
@ -17,10 +17,10 @@ os.environ["SHAREPOINT_CLIENT_ID"] = "6832a4c5-fb8c-4082-a746-4f51e1020f0d"
|
|||
os.environ["SHAREPOINT_CLIENT_SECRET"] = "xpC8Q~Frww48SM1V-D8lGy5iOY7P_cJ7FF3jgarQ"
|
||||
os.environ["SHAREPOINT_TENANT_ID"] = "10d5af8b-2cfd-4882-9ccd-b96e4812dacf"
|
||||
osmosis = SharePointScraper(SharePointInstaller.OSMOSIS_WAVE_2)
|
||||
parent_folder = "/Osmosis ACD/Osmosis ACD Projects/Installer Documentation/"
|
||||
parent_folder = "/Osmosis ACD/Osmosis ACD Projects/"
|
||||
|
||||
# Change this per installer
|
||||
parent_folder += "Platform Housing Group/Broadoak"
|
||||
parent_folder += "Stonewater/Wates"
|
||||
|
||||
|
||||
def extract_asset_ids(item, file_column_id):
|
||||
|
|
@ -102,6 +102,7 @@ def get_all_items(board_id, monday):
|
|||
def upload_to_sharepoint(to_upload, master_folder_name):
|
||||
osmosis.create_dir(master_folder_name, parent_folder)
|
||||
for file_path in to_upload:
|
||||
print(f"uploading {file_path}")
|
||||
osmosis.upload_file(file_path, parent_folder + f"/{master_folder_name}", file_path[5:])
|
||||
|
||||
# Step 1: Fetch column IDs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue