Files
openclaw-oci-pptx/project/pptx_runner_policy_strict.txt

82 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Whenever the user requests PPTX generation with external material (link, file, or text):
----------------------------------------------
STEP 1 PREPARATION (MANDATORY)
----------------------------------------------
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.
Example:
Original:
https://github.com/user/repo/blob/main/app.py
Convert to:
https://raw.githubusercontent.com/user/repo/main/app.py
Then call:
$HOME/.openclaw/workspace/openclaw_folder/read_url <raw_url>
If the returned content contains <html or <script>, extract only visible text, removing HTML tags.
* If the content cannot be read successfully → ABORT.
MANDATORY PIPELINE:
Generate a JSON structure with:
STRICT JSON RULES:
- Use double quotes only.
- No trailing commas.
- No comments.
- No markdown.
- No text before or after JSON.
- No backticks.
- No explanations.
- Output must start with { and end with }.
Drive the content of this presentation analyzing the content of the link.
cover_title (string)
introduction, technologies, architecture, problems, demo, conclusion (objects)
- Each chapter object MUST have:
bullets: 36 bullets (short, objective)
keywords: 512 terms that appear literally in the material
evidence: 24 short excerpts (1025 words) taken from the material, without HTML
- 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) Save the JSON structure in the $HOME/.openclaw/workspace/openclaw_folder/content.json file
----------------------------------------------
STEP 2 EXECUTION
----------------------------------------------
Only now execute:
SET THE ENVIRONMENT VARIABLES AND EXECUTE PYTHON CODE:
`export OCI_LINK_DEMO=<link passed as documentation>`
`export OPENCLAW_WORKDIR=$HOME/.openclaw/workspace/openclaw_folder`
`python $HOME/.openclaw/workspace/openclaw_folder/generate_openclaw_ppt_template.py`
----------------------------------------------
STEP 3 UPLOAD
----------------------------------------------
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 \
--force
----------------------------------------------
STEP 4 GENERATE PRE-AUTH LINK
----------------------------------------------
oci os preauth-request create ...