mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-07-16 05:25:55 +00:00

The connector can process a Wikipedia page and output the HTML, the plain text contents, and the summary. No API key required Also add test case verifying that 3 files are indeed created (one for HTML, one for text, one for the summary).
19 lines
590 B
Bash
Executable File
19 lines
590 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Processes the Unstructured-IO/unstructured repository
|
|
# through Unstructured's library in 2 processes.
|
|
|
|
# Structured outputs are stored in wikipedia-ingest-output/
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
cd "$SCRIPT_DIR"/../../.. || exit 1
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
|
--wikipedia-page-title "Open Source Software" \
|
|
--structured-output-dir wikipedia-ingest-output \
|
|
--num-processes 2 \
|
|
--verbose
|
|
|
|
# Alternatively, you can call it using:
|
|
# unstructured-ingest --wikipedia-page-title "..." ...
|