Skip to content

Commit

Permalink
Clean URL: Remove white spaces from url
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj725 committed Sep 26, 2024
1 parent 207585f commit 6f3f4ed
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,27 +218,30 @@ def select_drive(drives: list) -> tuple:
client_secret=app_client_secret,
tenant_id=tenant_id,
)
print("SharepointADHelper initialized.")
print("SharepointADHelper initialized.\n")

site_url = (
input(f"\nEnter Sharepoint Site URL (default={_site_url}): ") or _site_url
input(f"Enter Sharepoint Site URL (default={_site_url}): ") or _site_url
)
if not site_url:
print("\nSite URL is required. Exiting ...")
exit(1)
# remove white spaces from the site url
site_url = site_url.strip()

# Get SharePoint Site ID using URL
site_id = sharepoint_helper.get_site_id(site_url)
print(f"Derived Site Id: {site_id}\n")

# Get drive info using site id
print("Fetching drive info ...")
print("Fetching drive info ...\n")
drive_info = sharepoint_helper.get_drive_id(site_id)
drive_id, drive_name = select_drive(drive_info)
print(f"\nSharePoint Drive name: {drive_name}, Drive Id: {drive_id}")
print(f"SharePoint Drive name: {drive_name}, Drive Id: {drive_id}\n")

# Enter Folder path
folder_path = input("\nEnter folder path (default='/document'): ") or "/document"
def_folder_path = "documents"
folder_path = input(f"Enter folder path (default='{def_folder_path}'): ") or def_folder_path

# Initialize PebbloSafeRAG app
rag_app = PebbloSafeRAG(
Expand Down

0 comments on commit 6f3f4ed

Please sign in to comment.