This repository consist of scripts for data extraction/modification for O1
These Scripts aims to help with the data migration process making it more efficient in the modification and extraction process:
- O1_Selenium_Migration.py; This script uses Python Selenium to help solve the limitation posted by Bentely API. By using Selenium to extract form data from the frontend.
- O1_Migration_Script_Bentley_API.py; This script uses Bentley API to extract forms, audit log, attachments and comments.
- Bentley_API_Reassigner.py; This script uses Bentley API to change the form status and reassign it to another user.
- Bentley_API_Size_Tracker.py; This script uses Benley API to download the froms, audit logs, attachments and comments from specific projects so the user can estimate the project size
- PDF_Creation_Date_Extractor.py; This script extracts the form creation date from the PDFs
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What needs to be installed beforehand: Selenium needs to bee installed before running the Selenium Migraation script
1. Selenium
A step by step series of examples that tell you how to get a development env running.
Using Python pip install to install selenium
pip install selenium
Run the scripts using the command:
python [Script_Name]
Note: Scripts that uses Bentley's API must have new token once in a while, to generate a new token:
- goto Bentley_Dev
- Click on "Try it out"
- Click on the dropdown box "No auth"
- Select "authorizationCode"
- Copy the whole line from Authorization under Headers, it starts with "Bearer"
- Replace the old "Bearer" in the script with the new one in "Authorization" under "HEADERS"