mirror of
https://github.com/hoshikawa2/openclaw-oci-pptx.git
synced 2026-03-06 18:21:04 +00:00
First commit
This commit is contained in:
@@ -177,7 +177,7 @@ content.json (validated / governed)
|
|||||||
↓
|
↓
|
||||||
PPTX Builder (template + content.json)
|
PPTX Builder (template + content.json)
|
||||||
↓
|
↓
|
||||||
openclaw_oci_apresentacao.pptx
|
openclaw_oci_presentation.pptx
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -391,7 +391,7 @@ export OPENCLAW_WORKDIR="$HOME/.openclaw/workspace/openclaw_folder"
|
|||||||
|
|
||||||
# Template + output
|
# Template + output
|
||||||
export PPTX_TEMPLATE_PATH="$OPENCLAW_WORKDIR/template_openclaw_oci_clean.pptx"
|
export PPTX_TEMPLATE_PATH="$OPENCLAW_WORKDIR/template_openclaw_oci_clean.pptx"
|
||||||
export PPTX_OUTPUT_PATH="$OPENCLAW_WORKDIR/openclaw_oci_apresentacao.pptx"
|
export PPTX_OUTPUT_PATH="$OPENCLAW_WORKDIR/openclaw_oci_presentation.pptx"
|
||||||
|
|
||||||
# Content JSON (if not set, defaults to $OPENCLAW_WORKDIR/content.json)
|
# Content JSON (if not set, defaults to $OPENCLAW_WORKDIR/content.json)
|
||||||
export OCI_CONTENT_FILE="$OPENCLAW_WORKDIR/content.json"
|
export OCI_CONTENT_FILE="$OPENCLAW_WORKDIR/content.json"
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ STEP 0 – FIXED WORKING DIRECTORY (MANDATORY)
|
|||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
All operations MUST occur inside:
|
All operations MUST occur inside:
|
||||||
$HOME/.openclaw/workspace/openclaw_folder
|
$HOME/.openclaw/workspace/openclaw_folder
|
||||||
|
|
||||||
Execute:
|
Execute:
|
||||||
cd $HOME/.openclaw/workspace/openclaw_folder
|
cd $HOME/.openclaw/workspace/openclaw_folder
|
||||||
|
|
||||||
|
----------------------------------------------
|
||||||
STEP 1 – PREPARATION (MANDATORY)
|
STEP 1 – PREPARATION (MANDATORY)
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
The file generate_openclaw_ppt_template.py is located in $HOME/.openclaw/workspace/openclaw_folder
|
The file generate_openclaw_ppt_template.py is located in $HOME/.openclaw/workspace/openclaw_folder
|
||||||
The file read_url is located in $HOME/.openclaw/workspace/openclaw_folder
|
The file read_url is located in $HOME/.openclaw/workspace/openclaw_folder
|
||||||
@@ -18,83 +20,90 @@ The file read_file is located in $HOME/.openclaw/workspace/openclaw_folder
|
|||||||
|
|
||||||
Required:
|
Required:
|
||||||
|
|
||||||
read_url for links
|
read_url for links
|
||||||
read_file for local files
|
read_file for local files
|
||||||
|
|
||||||
🔄 GITHUB LINK HANDLING (REQUIRED)
|
GITHUB LINK HANDLING (REQUIRED)
|
||||||
|
|
||||||
If the link contains:
|
If the link contains:
|
||||||
github.com/.../blob/...
|
github.com/.../blob/...
|
||||||
Automatically convert to:
|
Automatically convert to:
|
||||||
raw.githubusercontent.com/USER/REPO/BRANCH/PATH
|
raw.githubusercontent.com/USER/REPO/BRANCH/PATH
|
||||||
BEFORE calling read_url.
|
BEFORE calling read_url.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
Original:
|
Original:
|
||||||
https://github.com/user/repo/blob/main/app.py
|
https://github.com/user/repo/blob/main/app.py
|
||||||
Convert to:
|
Convert to:
|
||||||
https://raw.githubusercontent.com/user/repo/main/app.py
|
https://raw.githubusercontent.com/user/repo/main/app.py
|
||||||
Then call:
|
Then call:
|
||||||
read_url <raw_url>
|
read_url <raw_url>
|
||||||
|
|
||||||
If the returned content contains <html or <script>, extract only visible text, removing HTML tags.
|
If the returned content contains <html or <script>, extract only visible text, removing HTML tags.
|
||||||
|
|
||||||
* If the content cannot be read successfully → ABORT.
|
* If the content cannot be read successfully → ABORT.
|
||||||
|
|
||||||
MANDATORY PIPELINE:
|
MANDATORY PIPELINE:
|
||||||
|
|
||||||
1) Save material to file:
|
1) Save material to file:
|
||||||
(exec read_url <url> > $HOME/.openclaw/workspace/openclaw_folder/material_raw.txt)
|
(exec read_url <url> > $HOME/.openclaw/workspace/openclaw_folder/material_raw.txt)
|
||||||
|
|
||||||
2) Analyze material_raw.txt and generate content.json explicitly:
|
2) Analyze material_raw.txt and generate content.json explicitly:
|
||||||
(exec cat > $HOME/.openclaw/workspace/openclaw_folder/content.json << 'EOF'
|
(exec cat > $HOME/.openclaw/workspace/openclaw_folder/content.json << 'EOF'
|
||||||
<valid JSON only>
|
<valid JSON only>
|
||||||
EOF)
|
EOF)
|
||||||
|
|
||||||
cover_title (string)
|
cover_title (string)
|
||||||
introduction, technologies, architecture, problems, demo, conclusion (objects)
|
introduction, technologies, architecture, problems, demo, conclusion (objects)
|
||||||
- Each chapter object MUST have:
|
- Each chapter object MUST have:
|
||||||
bullets: 3–6 bullets (short, objective)
|
bullets: 3–6 bullets (short, objective)
|
||||||
keywords: 5–12 terms that appear literally in the material
|
keywords: 5–12 terms that appear literally in the material
|
||||||
evidence: 2–4 short excerpts (10–25 words) taken from the material, without HTML
|
evidence: 2–4 short excerpts (10–25 words) taken from the material, without HTML
|
||||||
- It is FORBIDDEN to use generic bullets without keywords from the material.
|
- It is FORBIDDEN to use generic bullets without keywords from the material.
|
||||||
- VALIDATION: if it is not possible to extract at least 20 unique keywords from the total material → ABORT.
|
- VALIDATION: if it is not possible to extract at least 20 unique keywords from the total material → ABORT.
|
||||||
|
|
||||||
3) Validate JSON:
|
3) Validate JSON:
|
||||||
(exec python -m json.tool $HOME/.openclaw/workspace/openclaw_folder/content.json)
|
(exec python -m json.tool $HOME/.openclaw/workspace/openclaw_folder/content.json)
|
||||||
|
|
||||||
Only after successful validation:
|
Only after successful validation:
|
||||||
(exec export OCI_LINK_DEMO="<url>")
|
(exec export OCI_LINK_DEMO="<url>")
|
||||||
(exec python generate_openclaw_ppt_template.py)
|
(exec python generate_openclaw_ppt_template.py)
|
||||||
|
|
||||||
STEP 4 – MODIFICATION VALIDATION [STRICT VERSION]
|
----------------------------------------------
|
||||||
|
STEP 2 – MODIFICATION VALIDATION [STRICT VERSION]
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
Before running:
|
Before running:
|
||||||
|
|
||||||
- Verify that each chapter contains at least 1 literal keyword from the material.
|
- Verify that each chapter contains at least 1 literal keyword from the material.
|
||||||
- Verify that at least 8 keywords appear in 4 or more slides.
|
- Verify that at least 8 keywords appear in 4 or more slides.
|
||||||
- Verify that each chapter contains at least 1 piece of evidence.
|
- Verify that each chapter contains at least 1 piece of evidence.
|
||||||
If it fails → ABORT.
|
If it fails → ABORT.
|
||||||
|
|
||||||
STEP 5 – EXECUTION
|
----------------------------------------------
|
||||||
|
STEP 3 – EXECUTION
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
Only now execute:
|
Only now execute:
|
||||||
|
|
||||||
SET THE ENVIRONMENT VARIABLE WITH THE URL PASSED AS A BASIS FOR DOCUMENTATION: `export OCI_LINK_DEMO=<link passed as documentation>`
|
SET THE ENVIRONMENT VARIABLE WITH THE URL PASSED AS A BASIS FOR DOCUMENTATION: `export OCI_LINK_DEMO=<link passed as documentation>`
|
||||||
|
|
||||||
SET THE ENVIRONMENT VARIABLE WITH THE FILE NAME GENERATED WITH CONTENT READ FROM THE LINK: `export OCI_CONTENT_FILE=<NAME OF THE GENERATED FILE>`
|
SET THE ENVIRONMENT VARIABLE WITH THE FILE NAME GENERATED WITH CONTENT READ FROM THE LINK: `export OCI_CONTENT_FILE=<NAME OF THE GENERATED FILE>`
|
||||||
|
|
||||||
`python $HOME/.openclaw/workspace/openclaw_folder/generate_openclaw_ppt_template.py`
|
`python $HOME/.openclaw/workspace/openclaw_folder/generate_openclaw_ppt_template.py`
|
||||||
|
|
||||||
STEP 6 – UPLOAD
|
----------------------------------------------
|
||||||
|
STEP 4 – UPLOAD
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
First, delete the file in object storage: `openclaw_oci_presentation.pptx`
|
First, delete the file in object storage: `openclaw_oci_presentation.pptx`
|
||||||
|
|
||||||
And only then upload it to Object Storage: `oci os object put \
|
And only then upload it to Object Storage: `oci os object put \
|
||||||
--bucket-name hoshikawa_template \
|
--bucket-name hoshikawa_template \
|
||||||
--file` $HOME/.openclaw/workspace/openclaw_folder/openclaw_oci_presentation.pptx \
|
--file` $HOME/.openclaw/workspace/openclaw_folder/openclaw_oci_presentation.pptx \
|
||||||
|
--force
|
||||||
|
|
||||||
--force
|
----------------------------------------------
|
||||||
|
STEP 5 – GENERATE PRE-AUTH LINK
|
||||||
STEP 7 – GENERATE PRE-AUTH LINK
|
----------------------------------------------
|
||||||
oci os preauth-request create ...
|
oci os preauth-request create ...
|
||||||
|
|||||||
Reference in New Issue
Block a user