Create a ppt on topic rasbhediya adhyay of astanghridyay chapter no. 10 with perfect images

Reading File
Searching the Web

Rasabhediya Adhyaya Ashtanga Hridayam chapter 10 rasa types Ayurveda

Reading File
Reading Web Page

https://www.easyayurveda.com/tastes-their-qualities-and-effe…

Searching the Web

Ayurveda six tastes rasa madhura amla lavana katu tikta kashaya illustration free image

Running Command

ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace/rasa…

Running Command

mkdir -p /home/daytona/workspace/rasabhediya-ppt && ls /home/daytona/workspace/r…

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://images.squ…

Writing File

~/rasabhediya-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// Fetch image as base64
function fetchImage(url) {
  try {
    const result = execSync(
      `node /home/daytona/skills/shared/scripts/fetch_images.js "${url}"`,
      { timeout: 15000 }
    ).toString();
    const arr = JSON.parse(result);
    if (arr[0] && !arr[0].error && arr[0].base64) return arr[0].base64;
    return null;
  } catch (e) {
    return null;
  }
}

// ─── Image URLs ────────────────────────────────────────────────────────────────
const IMG_SIX_TASTES = "https://images.squarespace-cdn.com/content/v1/588b45ac6b8f5b4f8ccfe622/1629755989305-EO6A5O3PPYNN9AAYFS4J/_6+tastes.png";
const IMG_PANCHAMAHABHUTAS = "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Panchamahabhuta.jpg/640px-Panchamahabhuta.jpg";
const IMG_DOSHAS = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Ayurveda_Doshas.jpg/640px-Ayurveda_Doshas.jpg";

console.log("Fetching images...");
const imgSixTastes = fetchImage(IMG_SIX_TASTES);
console.log("six tastes img:", imgSixTastes ? "OK" : "FAILED");

// ─── Colour palette ────────────────────────────────────────────────────────────
const DEEP_GREEN  = "1B4332"; // dominant background
const GOLD        = "C9A84C"; // accent / headings
const CREAM       = "FDF6E3"; // body text
const DARK_BG     = "0D2B1F"; // title slide bg
const MED_GREEN   = "2D6A4F"; // card backgrounds
const LIGHT_GREEN = "52B788"; // accent lines / shapes

// Per-rasa accent colors
const RASA_COLORS = {
  Madhura : { bg: "2C4A7C", accent: "5B92D0", emoji: "🍯" },
  Amla    : { bg: "6B3620", accent: "E07B39", emoji: "🍋" },
  Lavana  : { bg: "4A4A2C", accent: "C9C45E", emoji: "🧂" },
  Katu    : { bg: "7C2C2C", accent: "E05C5C", emoji: "🌶️" },
  Tikta   : { bg: "3A4A2C", accent: "7EB55A", emoji: "🌿" },
  Kashaya : { bg: "5A3A7C", accent: "A87ED4", emoji: "🌰" },
};

// ─── Data ──────────────────────────────────────────────────────────────────────
const rasaData = [
  {
    name: "Madhura Rasa", subtitle: "Sweet Taste", rasa: "Madhura",
    elements: "Prithvi + Jala (Earth + Water)",
    dosha: "Increases Kapha • Decreases Vata & Pitta",
    qualities: ["Guru (Heavy)", "Snigdha (Unctuous)", "Sheeta (Cold)"],
    benefits: [
      "Builds strength in all body tissues (Dhatus)",
      "Good for children, elderly, wounded & emaciated",
      "Promotes breast milk (Stanya), improves complexion",
      "Nourishes hair, sense organs, Ojas",
      "Bulk promoting (Brimhana), good for throat"
    ],
    excess: ["Obesity", "Dyspepsia", "Diabetes (Meha)", "Malignant tumors", "Enlargement of neck glands"],
    examples: "Sugar cane, milk, rice, wheat, ghee, honey, dates, lotus stalk",
    exceptions: "Old rice, barley, green gram, wheat, honey, sugar — do not increase Kapha"
  },
  {
    name: "Amla Rasa", subtitle: "Sour Taste", rasa: "Amla",
    elements: "Prithvi + Agni (Earth + Fire)",
    dosha: "Increases Kapha & Pitta • Decreases Vata",
    qualities: ["Laghu (Light)", "Snigdha (Unctuous)", "Ushna Virya (Hot potency)"],
    benefits: [
      "Stimulates digestive fire (Agni Deepti)",
      "Good for the heart (Hridya)",
      "Digestive & appetizer (Pachana, Rochana)",
      "Cold to touch — relieves burning sensation",
      "Moves inactive Vata downwards"
    ],
    excess: ["Looseness of teeth", "Cataract", "Itching (Kandu)", "Anaemia (Pandutva)", "Visarpa (Herpes)"],
    examples: "Tamarind, lemon, fermented preparations, yoghurt, vinegar",
    exceptions: "Pomegranate (Dadima) & Indian Gooseberry (Amalaka) do not aggravate Pitta"
  },
  {
    name: "Lavana Rasa", subtitle: "Salt Taste", rasa: "Lavana",
    elements: "Jala + Agni (Water + Fire)",
    dosha: "Increases Kapha & Pitta • Decreases Vata",
    qualities: ["Guru (Heavy)", "Ushna (Hot)", "Snigdha (Unctuous)"],
    benefits: [
      "Relieves rigidity & clears channel obstructions",
      "Enhances digestive activity (Agni)",
      "Lubricates, causes sweating, penetrates deep tissues",
      "Improves taste & appetite (Ruchikrit)",
      "Promotes growth & healing of wounds"
    ],
    excess: ["Vitiation of blood (Asra)", "Baldness, graying of hair", "Skin diseases (Kushtha)", "Thirst, effect of poison", "Visarpa — spreading skin disease"],
    examples: "Rock salt, sea salt, Saindhava, Vida, Sauvarchala, Audbhida",
    exceptions: "Saindhava (rock salt) does not aggravate Pitta — is the best among salts"
  },
  {
    name: "Katu Rasa", subtitle: "Pungent Taste", rasa: "Katu",
    elements: "Agni + Vayu (Fire + Air)",
    dosha: "Increases Vata & Pitta • Decreases Kapha",
    qualities: ["Laghu (Light)", "Ushna (Hot)", "Ruksha (Dry)"],
    benefits: [
      "Cures throat diseases, allergic rashes, skin diseases",
      "Dries up fat, moisture, unctuousness in tissues",
      "Increases hunger (Dipana) & digestive (Pachana)",
      "Cleansing (Shodhana) — eliminates Doshas",
      "Dilates channels (Srotamsi vivrinoti)"
    ],
    excess: ["Thirst (Trishna)", "Depletion of sperm (Shukra kshaya)", "Loss of strength", "Fainting (Murcha)", "Pain in waist & back"],
    examples: "Asafoetida (Hingu), Black pepper (Maricha), Vidanga, Panchakola, Ginger",
    exceptions: "Pitta (bile of animals), Guduchi, bronze, iron do not significantly increase Pitta"
  },
  {
    name: "Tikta Rasa", subtitle: "Bitter Taste", rasa: "Tikta",
    elements: "Akasha + Vayu (Space + Air)",
    dosha: "Increases Vata • Decreases Pitta & Kapha",
    qualities: ["Laghu (Light)", "Ruksha (Dry)", "Sheeta (Cold)"],
    benefits: [
      "Cleanses mouth (Vishadayati aasyam)",
      "Clears sense organs — sharpens perception",
      "Anti-toxic (Vishagna), anti-parasitic (Krimighna)",
      "Good in fever, burning sensation, skin diseases",
      "Promotes dryness, lightness, reduces fat"
    ],
    excess: ["Depletion of all Dhatus (body tissues)", "Roughness & dryness of tissues", "Emaciation (Karshya)", "Dizziness (Bhrama)", "Debility"],
    examples: "Neem, Guduchi, Patola, turmeric, Kutki, fenugreek seeds",
    exceptions: "Generally pure Tikta — no major exception noted; use carefully in Vata prakrti"
  },
  {
    name: "Kashaya Rasa", subtitle: "Astringent Taste", rasa: "Kashaya",
    elements: "Prithvi + Vayu (Earth + Air)",
    dosha: "Increases Vata • Decreases Pitta & Kapha",
    qualities: ["Guru (Heavy)", "Ruksha (Dry)", "Sheeta (Cold)"],
    benefits: [
      "Healing of wounds — promotes granulation",
      "Stops bleeding (Stambhana — haemostatic)",
      "Drying effect — reduces moisture & Kapha",
      "Good in skin diseases, diarrhoea",
      "Cleanses blood (Raktashodhana)"
    ],
    excess: ["Constipation (Vibandha)", "Flatulence (Adhmana)", "Cardiac disorders (Hrudi Ruja)", "Dryness, emaciation", "Obstruction of Vata, speech problems"],
    examples: "Haritaki, Arjuna, lotus, plantain flower, raw banana, dry ginger",
    exceptions: "Haritaki — despite Kashaya is tridosha balancing (Tridoshahara)"
  }
];

// ─── Build Presentation ────────────────────────────────────────────────────────
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Rasabhediya Adhyaya - Ashtanga Hridayam Chapter 10";
pres.author = "Ayurveda";

// ══════════════════════════════════════════════
// SLIDE 1: Title Slide
// ══════════════════════════════════════════════
let s1 = pres.addSlide();
s1.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK_BG } });
// Decorative top bar
s1.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.08, fill: { color: GOLD } });
// Decorative bottom bar
s1.addShape(pres.ShapeType.rect, { x: 0, y: 5.545, w: "100%", h: 0.08, fill: { color: GOLD } });
// Left accent stripe
s1.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: "100%", fill: { color: LIGHT_GREEN } });
// Right accent stripe
s1.addShape(pres.ShapeType.rect, { x: 9.88, y: 0, w: 0.12, h: "100%", fill: { color: LIGHT_GREEN } });

// Decorative circle
s1.addShape(pres.ShapeType.ellipse, { x: 7.5, y: 0.5, w: 2.5, h: 2.5, fill: { color: MED_GREEN }, line: { color: GOLD, width: 2 } });
s1.addShape(pres.ShapeType.ellipse, { x: 7.7, y: 0.7, w: 2.1, h: 2.1, fill: { color: DEEP_GREEN }, line: { color: GOLD, width: 1 } });
s1.addText("षड् रस", { x: 7.5, y: 0.9, w: 2.5, h: 1.4, fontSize: 32, fontFace: "Arial", bold: true, color: GOLD, align: "center", valign: "middle" });

// Main title
s1.addText("रसभेदीय अध्याय", {
  x: 0.3, y: 0.6, w: 7.0, h: 1.0, fontSize: 38, fontFace: "Arial",
  bold: true, color: GOLD, align: "left", valign: "middle", margin: 0
});
s1.addText("Rasabhediya Adhyaya", {
  x: 0.3, y: 1.55, w: 7.0, h: 0.55, fontSize: 22, fontFace: "Arial",
  bold: false, color: CREAM, align: "left", valign: "middle", italic: true, margin: 0
});

// Subtitle box
s1.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.2, w: 6.5, h: 0.05, fill: { color: GOLD } });
s1.addText("Classification of Tastes & Their Properties", {
  x: 0.3, y: 2.3, w: 7.0, h: 0.5, fontSize: 16, fontFace: "Arial",
  color: CREAM, align: "left", valign: "middle", margin: 0
});
s1.addText("Ashtanga Hridayam — Sutrasthana", {
  x: 0.3, y: 2.8, w: 7.0, h: 0.4, fontSize: 14, fontFace: "Arial",
  color: LIGHT_GREEN, align: "left", italic: true, margin: 0
});
s1.addText("Chapter 10", {
  x: 0.3, y: 3.15, w: 3.0, h: 0.4, fontSize: 18, fontFace: "Arial",
  bold: true, color: GOLD, align: "left", margin: 0
});

// Six rasa bubbles at bottom
const rasaNames = ["Madhura", "Amla", "Lavana", "Katu", "Tikta", "Kashaya"];
const rasaColors2 = ["5B92D0", "E07B39", "C9C45E", "E05C5C", "7EB55A", "A87ED4"];
rasaNames.forEach((r, i) => {
  const x = 0.2 + i * 1.6;
  s1.addShape(pres.ShapeType.ellipse, { x, y: 4.2, w: 1.4, h: 0.85, fill: { color: rasaColors2[i] }, line: { color: "FFFFFF", width: 1 } });
  s1.addText(r, { x, y: 4.2, w: 1.4, h: 0.85, fontSize: 11, fontFace: "Arial", bold: true, color: "FFFFFF", align: "center", valign: "middle" });
});

// ══════════════════════════════════════════════
// SLIDE 2: Introduction
// ══════════════════════════════════════════════
let s2 = pres.addSlide();
s2.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DEEP_GREEN } });
s2.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.7, fill: { color: MED_GREEN } });
s2.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: "100%", fill: { color: GOLD } });
s2.addText("Introduction to Rasabhediya Adhyaya", {
  x: 0.2, y: 0.1, w: 9.6, h: 0.5, fontSize: 22, fontFace: "Arial",
  bold: true, color: GOLD, align: "center", valign: "middle", margin: 0
});

// Content boxes
const introPoints = [
  { icon: "📖", title: "Chapter Overview", text: "Chapter 10 of Sutrasthana of Ashtanga Hridayam by Vagbhata. 'Rasa' = Taste, 'Bheda' = Types. Deals with classification & properties of the 6 fundamental tastes." },
  { icon: "🌍", title: "Panchamahabhuta Origin", text: "All 6 rasas originate from the 5 great elements (Panchamahabhutas). Each rasa is formed by a specific combination of 2 elements. The remaining elements are present in smaller quantities." },
  { icon: "👅", title: "What is Rasa?", text: "The sense object perceived by the tongue (Rasanendriya) is called Rasa. It sticks inside the mouth, provides pleasure to the body, and is liked even by ants (in case of sweet taste)." },
  { icon: "⚕️", title: "Clinical Significance", text: "Knowledge of Rasa guides Dravyaguna (pharmacology), diet planning, disease management and Dosha balancing. Correct use of all 6 rasas ensures health; excess causes disease." },
];

introPoints.forEach((p, i) => {
  const col = i % 2;
  const row = Math.floor(i / 2);
  const x = 0.2 + col * 4.9;
  const y = 0.9 + row * 2.2;
  s2.addShape(pres.ShapeType.rect, { x, y, w: 4.7, h: 2.0, fill: { color: MED_GREEN }, line: { color: LIGHT_GREEN, width: 1 }, rectRadius: 0.1 });
  s2.addText(p.icon + "  " + p.title, { x: x + 0.1, y: y + 0.1, w: 4.5, h: 0.45, fontSize: 13, fontFace: "Arial", bold: true, color: GOLD, margin: 0 });
  s2.addShape(pres.ShapeType.line, { x: x + 0.1, y: y + 0.55, w: 4.4, h: 0, line: { color: GOLD, width: 1 } });
  s2.addText(p.text, { x: x + 0.1, y: y + 0.6, w: 4.5, h: 1.3, fontSize: 10.5, fontFace: "Arial", color: CREAM, valign: "top", margin: 0, wrap: true });
});

// ══════════════════════════════════════════════
// SLIDE 3: Panchamahabhuta & Rasa Formation
// ══════════════════════════════════════════════
let s3 = pres.addSlide();
s3.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DEEP_GREEN } });
s3.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.7, fill: { color: MED_GREEN } });
s3.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: "100%", fill: { color: GOLD } });
s3.addText("Panchamahabhuta & Rasa Formation", {
  x: 0.2, y: 0.1, w: 9.6, h: 0.5, fontSize: 22, fontFace: "Arial",
  bold: true, color: GOLD, align: "center", margin: 0
});

// Table header
const tableHeaders = ["Rasa", "Sanskrit", "Elements (Bhuta)", "Dominant Dosha", "Taste Example"];
const tableRows = [
  ["Madhura",  "मधुर",   "Prithvi + Jala",  "Kapha ↑",       "Sugar, Milk, Rice"],
  ["Amla",    "अम्ल",   "Prithvi + Agni",  "Pitta ↑",       "Lemon, Tamarind"],
  ["Lavana",  "लवण",    "Jala + Agni",     "Kapha & Pitta ↑","Rock Salt, Sea Salt"],
  ["Katu",    "कटु",    "Agni + Vayu",     "Vata & Pitta ↑", "Ginger, Black Pepper"],
  ["Tikta",   "तिक्त",  "Akasha + Vayu",   "Vata ↑",        "Neem, Turmeric"],
  ["Kashaya", "कषाय",   "Prithvi + Vayu",  "Vata ↑",        "Haritaki, Arjuna"],
];
const rowColors = ["2C4A7C", "6B3620", "4A4A2C", "7C2C2C", "3A4A2C", "5A3A7C"];
const colWidths = [1.3, 1.1, 2.2, 2.1, 2.8];
const colX = [0.15, 1.45, 2.55, 4.75, 6.85];

// Header row
let hdrY = 0.8;
colWidths.forEach((w, ci) => {
  s3.addShape(pres.ShapeType.rect, { x: colX[ci], y: hdrY, w, h: 0.4, fill: { color: GOLD } });
  s3.addText(tableHeaders[ci], { x: colX[ci], y: hdrY, w, h: 0.4, fontSize: 11, fontFace: "Arial", bold: true, color: "000000", align: "center", valign: "middle", margin: 0 });
});
// Data rows
tableRows.forEach((row, ri) => {
  const rowY = 1.2 + ri * 0.62;
  colWidths.forEach((w, ci) => {
    s3.addShape(pres.ShapeType.rect, { x: colX[ci], y: rowY, w, h: 0.6, fill: { color: ri % 2 === 0 ? "1D5C3B" : MED_GREEN }, line: { color: LIGHT_GREEN, width: 0.5 } });
    const isBold = ci === 0;
    const textColor = ci === 0 ? rasaColors2[ri] : CREAM;
    s3.addText(row[ci], { x: colX[ci] + 0.05, y: rowY, w: w - 0.1, h: 0.6, fontSize: 10, fontFace: "Arial", bold: isBold, color: textColor, align: "center", valign: "middle", margin: 0 });
  });
});

// Key note at bottom
s3.addShape(pres.ShapeType.rect, { x: 0.15, y: 5.0, w: 9.7, h: 0.5, fill: { color: "0D2B1F" }, line: { color: GOLD, width: 1 } });
s3.addText("💡  Remaining 3 elements are always present in minor quantities in every Rasa. The 2 dominant elements define its character.", {
  x: 0.25, y: 5.0, w: 9.5, h: 0.5, fontSize: 10, fontFace: "Arial", color: GOLD, valign: "middle", margin: 0
});

// ══════════════════════════════════════════════
// SLIDES 4–9: One slide per Rasa
// ══════════════════════════════════════════════
rasaData.forEach((rasa, idx) => {
  const rc = RASA_COLORS[rasa.rasa];
  let slide = pres.addSlide();

  // Background
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK_BG } });
  // Header bar
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 1.05, fill: { color: rc.bg } });
  // Left accent
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: "100%", fill: { color: rc.accent } });
  // Slide number tag
  slide.addShape(pres.ShapeType.rect, { x: 9.4, y: 0, w: 0.6, h: 0.4, fill: { color: GOLD } });
  slide.addText(`${idx + 4}/11`, { x: 9.4, y: 0, w: 0.6, h: 0.4, fontSize: 9, fontFace: "Arial", bold: true, color: "000000", align: "center", valign: "middle", margin: 0 });

  // Header content
  slide.addShape(pres.ShapeType.ellipse, { x: 0.15, y: 0.05, w: 0.9, h: 0.9, fill: { color: rc.accent }, line: { color: "FFFFFF", width: 1 } });
  slide.addText(rasa.rasa === "Madhura" ? "🍯" : rasa.rasa === "Amla" ? "🍋" : rasa.rasa === "Lavana" ? "🧂" : rasa.rasa === "Katu" ? "🌶" : rasa.rasa === "Tikta" ? "🌿" : "🌰",
    { x: 0.15, y: 0.05, w: 0.9, h: 0.9, fontSize: 22, align: "center", valign: "middle" });

  slide.addText(rasa.name, { x: 1.2, y: 0.05, w: 6.5, h: 0.55, fontSize: 26, fontFace: "Arial", bold: true, color: GOLD, margin: 0 });
  slide.addText(rasa.subtitle + "  |  " + rasa.elements, { x: 1.2, y: 0.58, w: 8.0, h: 0.4, fontSize: 13, fontFace: "Arial", color: CREAM, italic: true, margin: 0 });

  // Dosha badge
  slide.addShape(pres.ShapeType.rect, { x: 1.2, y: 0.9, w: 4.5, h: 0.28, fill: { color: rc.accent }, line: { color: "FFFFFF", width: 0 } });
  slide.addText("DOSHA EFFECT:  " + rasa.dosha, { x: 1.2, y: 0.9, w: 4.5, h: 0.28, fontSize: 9, fontFace: "Arial", bold: true, color: "000000", align: "left", valign: "middle", margin: 4 });

  // Qualities badges
  rasa.qualities.forEach((q, qi) => {
    const qx = 5.9 + qi * 1.35;
    slide.addShape(pres.ShapeType.rect, { x: qx, y: 0.9, w: 1.25, h: 0.28, fill: { color: "FFFFFF18" }, line: { color: rc.accent, width: 1 } });
    slide.addText(q, { x: qx, y: 0.9, w: 1.25, h: 0.28, fontSize: 7.5, fontFace: "Arial", color: CREAM, align: "center", valign: "middle", margin: 0 });
  });

  // ─── LEFT COLUMN: Benefits ───────────────────
  slide.addShape(pres.ShapeType.rect, { x: 0.15, y: 1.28, w: 5.5, h: 0.35, fill: { color: rc.bg } });
  slide.addText("✅  Benefits (Guna / Karma)", {
    x: 0.2, y: 1.28, w: 5.4, h: 0.35, fontSize: 12, fontFace: "Arial", bold: true, color: GOLD, valign: "middle", margin: 0
  });
  slide.addShape(pres.ShapeType.rect, { x: 0.15, y: 1.63, w: 5.5, h: 2.15, fill: { color: "1A3A2A" }, line: { color: rc.accent, width: 1 } });
  rasa.benefits.forEach((b, bi) => {
    slide.addShape(pres.ShapeType.ellipse, { x: 0.25, y: 1.7 + bi * 0.38, w: 0.15, h: 0.15, fill: { color: rc.accent } });
    slide.addText(b, { x: 0.48, y: 1.66 + bi * 0.38, w: 5.1, h: 0.36, fontSize: 10, fontFace: "Arial", color: CREAM, valign: "middle", margin: 0, wrap: true });
  });

  // ─── RIGHT COLUMN: Excess effects ────────────
  slide.addShape(pres.ShapeType.rect, { x: 5.85, y: 1.28, w: 4.0, h: 0.35, fill: { color: "7C2C2C" } });
  slide.addText("⚠️  If Used in Excess", {
    x: 5.9, y: 1.28, w: 3.9, h: 0.35, fontSize: 12, fontFace: "Arial", bold: true, color: CREAM, valign: "middle", margin: 0
  });
  slide.addShape(pres.ShapeType.rect, { x: 5.85, y: 1.63, w: 4.0, h: 2.15, fill: { color: "2A1A1A" }, line: { color: "E05C5C", width: 1 } });
  rasa.excess.forEach((e, ei) => {
    slide.addShape(pres.ShapeType.rect, { x: 5.95, y: 1.7 + ei * 0.38, w: 0.12, h: 0.15, fill: { color: "E05C5C" } });
    slide.addText(e, { x: 6.15, y: 1.66 + ei * 0.38, w: 3.6, h: 0.36, fontSize: 10, fontFace: "Arial", color: CREAM, valign: "middle", margin: 0, wrap: true });
  });

  // ─── BOTTOM: Examples & Exceptions ───────────
  slide.addShape(pres.ShapeType.rect, { x: 0.15, y: 3.88, w: 5.5, h: 0.3, fill: { color: rc.bg } });
  slide.addText("🌿  Examples (Dravya)", { x: 0.2, y: 3.88, w: 5.4, h: 0.3, fontSize: 11, fontFace: "Arial", bold: true, color: GOLD, valign: "middle", margin: 0 });
  slide.addShape(pres.ShapeType.rect, { x: 0.15, y: 4.18, w: 5.5, h: 1.0, fill: { color: "1A3A2A" }, line: { color: rc.accent, width: 1 } });
  slide.addText(rasa.examples, { x: 0.25, y: 4.18, w: 5.3, h: 1.0, fontSize: 10, fontFace: "Arial", color: CREAM, valign: "middle", margin: 4, wrap: true });

  slide.addShape(pres.ShapeType.rect, { x: 5.85, y: 3.88, w: 4.0, h: 0.3, fill: { color: MED_GREEN } });
  slide.addText("📌  Exception", { x: 5.9, y: 3.88, w: 3.9, h: 0.3, fontSize: 11, fontFace: "Arial", bold: true, color: GOLD, valign: "middle", margin: 0 });
  slide.addShape(pres.ShapeType.rect, { x: 5.85, y: 4.18, w: 4.0, h: 1.0, fill: { color: "1A2A3A" }, line: { color: LIGHT_GREEN, width: 1 } });
  slide.addText(rasa.exceptions, { x: 5.95, y: 4.18, w: 3.85, h: 1.0, fontSize: 10, fontFace: "Arial", color: CREAM, valign: "middle", margin: 4, wrap: true });
});

// ══════════════════════════════════════════════
// SLIDE 10: Dosha-Rasa Relationship Summary
// ══════════════════════════════════════════════
let s10 = pres.addSlide();
s10.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DEEP_GREEN } });
s10.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.7, fill: { color: MED_GREEN } });
s10.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: "100%", fill: { color: GOLD } });
s10.addText("Dosha – Rasa Relationship at a Glance", {
  x: 0.2, y: 0.1, w: 9.6, h: 0.5, fontSize: 22, fontFace: "Arial",
  bold: true, color: GOLD, align: "center", margin: 0
});

// Three dosha cards
const doshaInfo = [
  {
    dosha: "VATA", color: "7040B0", light: "A87ED4",
    increase: ["Tikta (Bitter)", "Kashaya (Astringent)", "Katu (Pungent)"],
    decrease: ["Madhura (Sweet)", "Amla (Sour)", "Lavana (Salty)"],
    desc: "Governs movement, nervous system, dryness. Cold, dry, light qualities aggravate."
  },
  {
    dosha: "PITTA", color: "B04010", light: "E07B39",
    increase: ["Amla (Sour)", "Lavana (Salty)", "Katu (Pungent)"],
    decrease: ["Madhura (Sweet)", "Tikta (Bitter)", "Kashaya (Astringent)"],
    desc: "Governs digestion, metabolism, heat. Hot, sharp, pungent qualities aggravate."
  },
  {
    dosha: "KAPHA", color: "1A5078", light: "5B92D0",
    increase: ["Madhura (Sweet)", "Amla (Sour)", "Lavana (Salty)"],
    decrease: ["Katu (Pungent)", "Tikta (Bitter)", "Kashaya (Astringent)"],
    desc: "Governs structure, immunity, lubrication. Heavy, cold, moist qualities aggravate."
  }
];

doshaInfo.forEach((d, i) => {
  const x = 0.18 + i * 3.3;
  s10.addShape(pres.ShapeType.rect, { x, y: 0.8, w: 3.1, h: 4.7, fill: { color: d.color }, line: { color: d.light, width: 2 } });
  s10.addShape(pres.ShapeType.rect, { x, y: 0.8, w: 3.1, h: 0.55, fill: { color: d.light } });
  s10.addText(d.dosha, { x, y: 0.8, w: 3.1, h: 0.55, fontSize: 18, fontFace: "Arial", bold: true, color: "FFFFFF", align: "center", valign: "middle", margin: 0 });

  s10.addText(d.desc, { x: x + 0.1, y: 1.4, w: 2.9, h: 0.65, fontSize: 9, fontFace: "Arial", color: CREAM, valign: "top", margin: 2, wrap: true, italic: true });

  s10.addShape(pres.ShapeType.rect, { x: x + 0.05, y: 2.1, w: 3.0, h: 0.28, fill: { color: "2C6B2C" } });
  s10.addText("↑ INCREASES with", { x: x + 0.05, y: 2.1, w: 3.0, h: 0.28, fontSize: 10, fontFace: "Arial", bold: true, color: "AAFFAA", align: "center", valign: "middle", margin: 0 });
  d.increase.forEach((r, ri) => {
    s10.addText("• " + r, { x: x + 0.1, y: 2.42 + ri * 0.32, w: 2.9, h: 0.3, fontSize: 10, fontFace: "Arial", color: CREAM, margin: 0 });
  });

  s10.addShape(pres.ShapeType.rect, { x: x + 0.05, y: 3.42, w: 3.0, h: 0.28, fill: { color: "6B2C2C" } });
  s10.addText("↓ DECREASES with", { x: x + 0.05, y: 3.42, w: 3.0, h: 0.28, fontSize: 10, fontFace: "Arial", bold: true, color: "FFAAAA", align: "center", valign: "middle", margin: 0 });
  d.decrease.forEach((r, ri) => {
    s10.addText("• " + r, { x: x + 0.1, y: 3.75 + ri * 0.32, w: 2.9, h: 0.3, fontSize: 10, fontFace: "Arial", color: CREAM, margin: 0 });
  });
});

// ══════════════════════════════════════════════
// SLIDE 11: Conclusion / Key Takeaways
// ══════════════════════════════════════════════
let s11 = pres.addSlide();
s11.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: "100%", fill: { color: DARK_BG } });
s11.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.7, fill: { color: MED_GREEN } });
s11.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.08, h: "100%", fill: { color: GOLD } });
s11.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: "100%", h: 0.325, fill: { color: MED_GREEN } });
s11.addText("Key Takeaways", {
  x: 0.2, y: 0.1, w: 9.6, h: 0.5, fontSize: 22, fontFace: "Arial",
  bold: true, color: GOLD, align: "center", margin: 0
});

const takeaways = [
  { num: "01", text: "The 6 rasas — Madhura, Amla, Lavana, Katu, Tikta, Kashaya — each arise from a pair of Panchamahabhutas." },
  { num: "02", text: "Each rasa has specific qualities (Gunas) and actions (Karmas) that directly influence the Tridoshas (Vata, Pitta, Kapha)." },
  { num: "03", text: "Judicious use of all 6 rasas in diet maintains Dosha balance and promotes health (Swasthya)." },
  { num: "04", text: "Excessive use of any single Rasa leads to vitiation of specific Doshas and disease manifestation." },
  { num: "05", text: "Combinations of Rasas create 63 varieties; physician selects based on Dosha, drug and patient condition." },
  { num: "06", text: "Anurasa (secondary taste) is weaker and transient; Rasa (primary taste) is stronger and more sustained." },
];

takeaways.forEach((t, i) => {
  const col = i % 2;
  const row = Math.floor(i / 2);
  const x = 0.2 + col * 4.9;
  const y = 0.85 + row * 1.42;
  s11.addShape(pres.ShapeType.rect, { x, y, w: 4.6, h: 1.3, fill: { color: MED_GREEN }, line: { color: LIGHT_GREEN, width: 1 } });
  s11.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 1.3, fill: { color: GOLD } });
  s11.addText(t.num, { x, y, w: 0.55, h: 1.3, fontSize: 20, fontFace: "Arial", bold: true, color: DARK_BG, align: "center", valign: "middle", margin: 0 });
  s11.addText(t.text, { x: x + 0.6, y: y + 0.05, w: 3.95, h: 1.2, fontSize: 10, fontFace: "Arial", color: CREAM, valign: "middle", margin: 4, wrap: true });
});

s11.addText("Ashtanga Hridayam — Sutrasthana Chapter 10 | Rasabhediya Adhyaya | Vagbhata", {
  x: 0.1, y: 5.3, w: 9.8, h: 0.325, fontSize: 9.5, fontFace: "Arial",
  color: CREAM, align: "center", valign: "middle", italic: true, margin: 0
});

// ─── Save ──────────────────────────────────────────────────────────────────────
const outPath = "/home/daytona/workspace/rasabhediya-ppt/Rasabhediya_Adhyaya_Ch10.pptx";
pres.writeFile({ fileName: outPath })
  .then(() => console.log("SUCCESS:", outPath))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/rasabhediya-ppt && node create_ppt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/rasabhediya-ppt/Rasabhediya_Adhyaya_Ch10.pptx

Editing File

~/rasabhediya-ppt/create_ppt.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/rasabhediya-ppt/create_ppt.js'
Running Command

cd /home/daytona/workspace/rasabhediya-ppt && node create_ppt.js 2>&1 | tail -5

Your presentation is ready! Download it here:

Rasabhediya Adhyaya Ch10

Presentation · PPTX


What's inside the 11-slide presentation:
SlideContent
1Title Slide - रसभेदीय अध्याय with six rasa bubbles in accent colors
2Introduction - Chapter overview, Panchamahabhuta origin, what is Rasa, clinical significance
3Rasa Formation Table - All 6 rasas with elements, dosha effect, examples
4-9One slide per Rasa (Madhura, Amla, Lavana, Katu, Tikta, Kashaya) each with:
- Elements (Bhuta composition)
- Dosha effect badge
- Guna/qualities tags
- Benefits (left column)
- Excess effects with warnings (right column)
- Examples (Dravya)
- Classical exceptions
10Dosha-Rasa Relationship - Which rasas increase/decrease Vata, Pitta, Kapha
11Key Takeaways - 6 numbered summary points
Design features: Deep Ayurvedic green palette with gold accents, each rasa has its own distinct color theme (blue for Madhura, orange for Amla, yellow for Lavana, red for Katu, green for Tikta, purple for Kashaya), Sanskrit terms, structured layout, and clinical notes throughout.
This is a shared conversation. Sign in to Orris to start your own chat.