mirror of
https://github.com/hoshikawa2/openclaw-oci-pptx.git
synced 2026-03-06 10:11:02 +00:00
First commit
This commit is contained in:
@@ -177,7 +177,7 @@ content.json (validated / governed)
|
||||
↓
|
||||
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
|
||||
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)
|
||||
export OCI_CONTENT_FILE="$OPENCLAW_WORKDIR/content.json"
|
||||
|
||||
@@ -5,12 +5,14 @@ STEP 0 – FIXED WORKING DIRECTORY (MANDATORY)
|
||||
----------------------------------------------
|
||||
|
||||
All operations MUST occur inside:
|
||||
$HOME/.openclaw/workspace/openclaw_folder
|
||||
$HOME/.openclaw/workspace/openclaw_folder
|
||||
|
||||
Execute:
|
||||
cd $HOME/.openclaw/workspace/openclaw_folder
|
||||
cd $HOME/.openclaw/workspace/openclaw_folder
|
||||
|
||||
----------------------------------------------
|
||||
STEP 1 – PREPARATION (MANDATORY)
|
||||
----------------------------------------------
|
||||
|
||||
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
|
||||
@@ -18,38 +20,38 @@ The file read_file is located in $HOME/.openclaw/workspace/openclaw_folder
|
||||
|
||||
Required:
|
||||
|
||||
read_url for links
|
||||
read_file for local files
|
||||
read_url for links
|
||||
read_file for local files
|
||||
|
||||
🔄 GITHUB LINK HANDLING (REQUIRED)
|
||||
GITHUB LINK HANDLING (REQUIRED)
|
||||
|
||||
If the link contains:
|
||||
github.com/.../blob/...
|
||||
Automatically convert to:
|
||||
raw.githubusercontent.com/USER/REPO/BRANCH/PATH
|
||||
BEFORE calling read_url.
|
||||
If the link contains:
|
||||
github.com/.../blob/...
|
||||
Automatically convert to:
|
||||
raw.githubusercontent.com/USER/REPO/BRANCH/PATH
|
||||
BEFORE calling read_url.
|
||||
|
||||
Example:
|
||||
Original:
|
||||
https://github.com/user/repo/blob/main/app.py
|
||||
Convert to:
|
||||
https://raw.githubusercontent.com/user/repo/main/app.py
|
||||
Then call:
|
||||
read_url <raw_url>
|
||||
Example:
|
||||
Original:
|
||||
https://github.com/user/repo/blob/main/app.py
|
||||
Convert to:
|
||||
https://raw.githubusercontent.com/user/repo/main/app.py
|
||||
Then call:
|
||||
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:
|
||||
|
||||
1) Save material to file:
|
||||
(exec read_url <url> > $HOME/.openclaw/workspace/openclaw_folder/material_raw.txt)
|
||||
1) Save material to file:
|
||||
(exec read_url <url> > $HOME/.openclaw/workspace/openclaw_folder/material_raw.txt)
|
||||
|
||||
2) Analyze material_raw.txt and generate content.json explicitly:
|
||||
(exec cat > $HOME/.openclaw/workspace/openclaw_folder/content.json << 'EOF'
|
||||
<valid JSON only>
|
||||
EOF)
|
||||
2) Analyze material_raw.txt and generate content.json explicitly:
|
||||
(exec cat > $HOME/.openclaw/workspace/openclaw_folder/content.json << 'EOF'
|
||||
<valid JSON only>
|
||||
EOF)
|
||||
|
||||
cover_title (string)
|
||||
introduction, technologies, architecture, problems, demo, conclusion (objects)
|
||||
@@ -60,41 +62,48 @@ EOF)
|
||||
- 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.
|
||||
|
||||
3) Validate JSON:
|
||||
(exec python -m json.tool $HOME/.openclaw/workspace/openclaw_folder/content.json)
|
||||
3) Validate JSON:
|
||||
(exec python -m json.tool $HOME/.openclaw/workspace/openclaw_folder/content.json)
|
||||
|
||||
Only after successful validation:
|
||||
(exec export OCI_LINK_DEMO="<url>")
|
||||
(exec python generate_openclaw_ppt_template.py)
|
||||
Only after successful validation:
|
||||
(exec export OCI_LINK_DEMO="<url>")
|
||||
(exec python generate_openclaw_ppt_template.py)
|
||||
|
||||
STEP 4 – MODIFICATION VALIDATION [STRICT VERSION]
|
||||
----------------------------------------------
|
||||
STEP 2 – MODIFICATION VALIDATION [STRICT VERSION]
|
||||
----------------------------------------------
|
||||
|
||||
Before running:
|
||||
|
||||
- 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 each chapter contains at least 1 piece of evidence.
|
||||
If it fails → ABORT.
|
||||
- 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 each chapter contains at least 1 piece of evidence.
|
||||
If it fails → ABORT.
|
||||
|
||||
STEP 5 – EXECUTION
|
||||
----------------------------------------------
|
||||
STEP 3 – EXECUTION
|
||||
----------------------------------------------
|
||||
|
||||
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 \
|
||||
--bucket-name hoshikawa_template \
|
||||
--file` $HOME/.openclaw/workspace/openclaw_folder/openclaw_oci_presentation.pptx \
|
||||
And only then upload it to Object Storage: `oci os object put \
|
||||
--bucket-name hoshikawa_template \
|
||||
--file` $HOME/.openclaw/workspace/openclaw_folder/openclaw_oci_presentation.pptx \
|
||||
--force
|
||||
|
||||
--force
|
||||
|
||||
STEP 7 – GENERATE PRE-AUTH LINK
|
||||
oci os preauth-request create ...
|
||||
----------------------------------------------
|
||||
STEP 5 – GENERATE PRE-AUTH LINK
|
||||
----------------------------------------------
|
||||
oci os preauth-request create ...
|
||||
|
||||
Reference in New Issue
Block a user