diff --git a/README.md b/README.md index 2c64982..24e3670 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/project/pptx_runner_policy_strict.txt b/project/pptx_runner_policy_strict.txt index c4482bb..c4d144d 100644 --- a/project/pptx_runner_policy_strict.txt +++ b/project/pptx_runner_policy_strict.txt @@ -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,83 +20,90 @@ 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 + 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 -If the returned content contains , extract only visible text, removing HTML tags. + If the returned content contains , 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 > $HOME/.openclaw/workspace/openclaw_folder/material_raw.txt) + 1) Save material to file: + (exec read_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' - -EOF) + 2) Analyze material_raw.txt and generate content.json explicitly: + (exec cat > $HOME/.openclaw/workspace/openclaw_folder/content.json << 'EOF' + + EOF) - cover_title (string) - introduction, technologies, architecture, problems, demo, conclusion (objects) - - Each chapter object MUST have: - bullets: 3–6 bullets (short, objective) - keywords: 5–12 terms that appear literally in the material - 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. - - VALIDATION: if it is not possible to extract at least 20 unique keywords from the total material → ABORT. + cover_title (string) + introduction, technologies, architecture, problems, demo, conclusion (objects) + - Each chapter object MUST have: + bullets: 3–6 bullets (short, objective) + keywords: 5–12 terms that appear literally in the material + 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. + - 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="") -(exec python generate_openclaw_ppt_template.py) + Only after successful validation: + (exec export OCI_LINK_DEMO="") + (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=` + SET THE ENVIRONMENT VARIABLE WITH THE URL PASSED AS A BASIS FOR DOCUMENTATION: `export OCI_LINK_DEMO=` -SET THE ENVIRONMENT VARIABLE WITH THE FILE NAME GENERATED WITH CONTENT READ FROM THE LINK: `export OCI_CONTENT_FILE=` + SET THE ENVIRONMENT VARIABLE WITH THE FILE NAME GENERATED WITH CONTENT READ FROM THE LINK: `export OCI_CONTENT_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 ... \ No newline at end of file +---------------------------------------------- +STEP 5 – GENERATE PRE-AUTH LINK +---------------------------------------------- + oci os preauth-request create ...