mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-07-12 11:35:53 +00:00

Given the tendency for shell scripts to easily enter into a few levels of indentation and long line lengths, update the default to 2 spaces.
29 lines
1016 B
Bash
Executable File
29 lines
1016 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Processes multiple files in a nested folder structure from Salesforce
|
|
# through Unstructured's library in 2 processes.
|
|
|
|
# Available categories are: Account, Case, Campaign, EmailMessage, Lead
|
|
|
|
# Structured outputs are stored in salesforce-output/
|
|
|
|
# Using JWT authorization
|
|
# https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm
|
|
# https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connected_app.htm
|
|
|
|
# private-key-path is the path to the key file
|
|
|
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
|
cd "$SCRIPT_DIR"/../../.. || exit 1
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
|
salesforce \
|
|
--username "$SALESFORCE_USERNAME" \
|
|
--consumer-key "$SALESFORCE_CONSUMER_KEY" \
|
|
--private-key-path "$SALESFORCE_PRIVATE_KEY_PATH" \
|
|
--categories "EmailMessage,Account,Lead,Case,Campaign" \
|
|
--output-dir salesforce-output \
|
|
--preserve-downloads \
|
|
--reprocess \
|
|
--verbose
|