attachment
attachment

Explain above topic according to bams first year charak samhita

analyse_media
Reading File
The image shows Chapter 2 of Charaka Samhita Sutra Sthana - the Apamargataṇḍulīyamadhyāya (अपामार्गतण्डुलीयमध्यायः). Here is a detailed explanation as per BAMS First Year Charaka Samhita curriculum:

अपामार्गतण्डुलीयमध्यायः

(Charaka Samhita - Sutra Sthana, Chapter 2)


अध्याय का परिचय (Introduction to the Chapter)

This chapter follows the Deerghanjiviteeya Adhyaya (Chapter 1) and was composed by Bhagavan Atreya. The chapter is named after Apamarga (Achyranthes aspera / Chirchita), specifically its seeds (Tandula = seeds/grains). Chakrapani notes that "Apamarga-beej" here means bhusi-rahit chawal (husked, fresh seeds capable of germination).
The purpose of this chapter is to describe the remaining drugs used in Panchakarma and the theoretical aspects of Panchakarma therapy.

१. पञ्चकर्मार्थ द्रव्य-संग्रह

(Drugs Used in Panchakarma Therapy - Shlokas 3-6)

मूल श्लोक:

अपामार्गस्य बीजानि पिप्पलीर्मरिचानि च। विडङ्गान्याथ शिग्रूणि सर्षपांस्तुम्बुरूणि च॥३॥
अजाजीं चाजगन्धां च पीलून्वेलां हरेणुकाम्। पृथ्वीकां सुरसां श्वेतां कुठेरकफणिज्झकौ॥४॥
शिरीषबीजं लशुनं हरिद्रे लवणद्वयम्। ज्योतिष्मतीं नागरं च दद्यौच्छीर्षविरेचने॥५॥
गौरवे शिरसः शूले पीनसेऽर्धावभेदके। क्रिमिव्याधावपस्मारे घ्राणनाशे प्रमोहके॥६॥

(१) शीर्षविरेचन द्रव्य और उनके प्रयोग

Sheersha Virechana Dravyas (Drugs for Nasal Purification / Nasya)

औषधियों की सूची (List of Drugs):

क्र.संस्कृत नामहिन्दी नामLatin/Common Name
1अपामार्गबीजचिचिड़ी का बीजAchyranthes aspera
2पिप्पलीपीपलPiper longum
3मरिचकाली मिर्चPiper nigrum
4विडङ्गवायविडङ्गEmbelia ribes
5शिग्रुसहिजन का बीजMoringa oleifera
6सर्षपसरसोंBrassica nigra
7तुम्बुरुतेजबल का फलZanthoxylum armatum
8अजाजीजीराCuminum cyminum
9अजगन्धाअजगन्धाCleome viscosa
10पीलुपीलू वृक्ष का बीजSalvadora persica
11वेला (एला)बड़ी इलायचीAmomum subulatum
12हरेणुसम्भालु के बीजVitex negundo
13पृथ्वीकामगरैलाNigella sativa
14सुरसातुलसीभेदOcimum sanctum var.
15श्वेताअपराजिताClitoria ternatea
16कुठेरकतुलसी भेदOcimum gratissimum
17फणिज्झकमरूवाOriganum majorana
18शिरीषबीजशिरीष के बीजAlbizia lebbeck
19लशुनलहसुनAllium sativum
20हरिद्राहल्दीCurcuma longa
21दारुहरिद्रादारुहल्दीBerberis aristata
22सैंधव लवणसेन्धा नमकRock salt
23कालानमककाला नमकBlack salt
24ज्योतिष्मतीमालकांगनीCelastrus paniculatus
25नागरसोंठZingiber officinale (dry)

शीर्षविरेचन के योग्य रोग (Indications for Shirovirechana / Nasya)

इन सभी द्रव्यों का उपयोग निम्न रोगों में शिरोविरेचन (Nasya) के रूप में करना चाहिए:
  1. गौरव शिरसः - सिर का भारीपन (Heaviness of head)
  2. शिरःशूल - सिरदर्द (Headache)
  3. पीनस - पुराना जुकाम / साइनसाइटिस (Chronic rhinitis / Sinusitis)
  4. अर्धावभेदक - अधकपारी (Hemicrania / Migraine)
  5. कृमिव्याधि - कृमिजन्य शिरोरोग (Headache due to worm infestation)
  6. अपस्मार - मिरगी (Epilepsy)
  7. घ्राणनाश - गंध-ज्ञान का नाश (Anosmia / Loss of smell)
  8. प्रमोह / मूर्च्छा - मूर्च्छा (Syncope / Fainting)

विमर्श (Commentary / Chakrapani's Commentary)

शीर्षविरेचन को सबसे पहले क्यों बताया गया?

यद्यपि पञ्चकर्म में वमन-विरेचन का क्रम पहले आता है, फिर भी यहाँ शिरोविरेचन का वर्णन सबसे पहले किया गया है। इसका कारण यह सूत्र है:
"यदुत्तमाङ्गमङ्गानां शिरस्तदभिधीयते" (सू. १७)
अर्थात् - शिर सभी अंगों में प्रधान है। जैसे वृक्ष के मूल के स्वस्थ रहने पर पूरा वृक्ष स्वस्थ रहता है, वैसे ही शिर के शोधन से शेष सारा शरीर स्वस्थ रहता है।
"अनामये शिरस्येव देहः सम्यक् प्रवर्धते" अर्थात् शिर के निरोग रहने पर शरीर भली-भाँति बढ़ता है।

पञ्चकर्म में शुद्धि का क्रम:

क्रमकर्मशुद्धि स्थान
1शिरोविरेचन (Nasya)शिर-शुद्धि (Head)
2वमन (Vamana)आमाशय-शुद्धि (Stomach)
3विरेचन (Virechana)पच्यमानाशय-शुद्धि (Small intestine)
4निरूह बस्तिपक्वाशय-शुद्धि (Colon)
5अनुवासन बस्तिपक्वाशय-शुद्धि (Colon)

परीक्षा की दृष्टि से महत्वपूर्ण बिन्दु (Important Points for BAMS Exam)

  1. यह अध्याय सूत्रस्थान का द्वितीय अध्याय है।
  2. इसे भगवान् आत्रेय ने कहा है।
  3. अध्याय का नाम - अपामार्गतण्डुलीय इसलिए पड़ा क्योंकि इसमें सर्वप्रथम अपामार्ग-बीज का नाम लिया गया है।
  4. अपामार्ग-तण्डुल = भूसी रहित, अंकुरोत्पत्ति-योग्य ताजे बीज लेने चाहिए।
  5. शीर्षविरेचन में कुल २५ द्रव्यों का वर्णन है (श्लोक ३-५)।
  6. शीर्षविरेचन = नस्य कर्म (Nasya) - पञ्चकर्म का एक भाग।
  7. "संग्रहः पाञ्चकर्मिकः" - इसी अध्याय के १४वें श्लोक में पञ्चकर्म का स्पष्ट निर्देश है।

सारांश: अपामार्गतण्डुलीयमध्याय में पञ्चकर्म में प्रयुक्त द्रव्यों का, विशेषतः शीर्षविरेचन (नस्य) में प्रयुक्त होने वाली २५ औषधियों का वर्णन है। शिर को सर्वप्रधान अंग मानते हुए शिरोशुद्धि को सर्वप्रथम स्थान दिया गया है। यह अध्याय BAMS प्रथम वर्ष के चरक संहिता पाठ्यक्रम में अत्यंत महत्वपूर्ण है।

Create a summary document on Charaka Samhita Chapter 2 for reference

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null && ls /home/daytona/skills/docx/scripts/…

Running Command

mkdir -p /home/daytona/workspace/charaka-ch2 && node -e "require('docx'); consol…

Writing File

~/charaka-ch2/create_doc.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, PageBreak
} = require('docx');
const fs = require('fs');

// ── colour palette ──────────────────────────────────────────────────────────
const MAROON   = "800000";
const GOLD     = "B8860B";
const DARKRED  = "8B0000";
const WHITE    = "FFFFFF";
const LTBROWN  = "FDF5E6";
const MIDBRN   = "F5E6D3";

// ── helper: make a simple bordered TableCell ────────────────────────────────
function tc(text, opts = {}) {
  const {
    bold = false, color = "000000", shade = null, width = null,
    align = AlignmentType.LEFT, colSpan = 1
  } = opts;

  const cellOpts = {
    columnSpan: colSpan,
    verticalAlign: VerticalAlign.CENTER,
    shading: shade ? { fill: shade, type: ShadingType.SOLID } : undefined,
    width: width ? { size: width, type: WidthType.DXA } : undefined,
    borders: {
      top:    { style: BorderStyle.SINGLE, size: 4, color: "8B4513" },
      bottom: { style: BorderStyle.SINGLE, size: 4, color: "8B4513" },
      left:   { style: BorderStyle.SINGLE, size: 4, color: "8B4513" },
      right:  { style: BorderStyle.SINGLE, size: 4, color: "8B4513" },
    },
    margins: { top: 80, bottom: 80, left: 120, right: 120 },
    children: [new Paragraph({
      alignment: align,
      children: [new TextRun({ text, bold, color, size: bold ? 20 : 19, font: "Cambria" })]
    })]
  };
  return new TableCell(cellOpts);
}

// ── helper: section heading ──────────────────────────────────────────────────
function sectionHead(text) {
  return new Paragraph({
    spacing: { before: 240, after: 120 },
    shading: { fill: MAROON, type: ShadingType.SOLID },
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text, bold: true, color: WHITE, size: 26, font: "Cambria" })]
  });
}

// ── helper: sub-heading ─────────────────────────────────────────────────────
function subHead(text) {
  return new Paragraph({
    spacing: { before: 200, after: 80 },
    shading: { fill: GOLD, type: ShadingType.SOLID },
    children: [new TextRun({ text, bold: true, color: WHITE, size: 22, font: "Cambria" })]
  });
}

// ── helper: body paragraph ───────────────────────────────────────────────────
function body(text, opts = {}) {
  const { bold = false, color = "1a1a1a", indent = false } = opts;
  return new Paragraph({
    spacing: { before: 60, after: 60 },
    indent: indent ? { left: 400 } : undefined,
    children: [new TextRun({ text, bold, color, size: 20, font: "Cambria" })]
  });
}

// ── helper: Sanskrit shloka block ───────────────────────────────────────────
function shloka(text) {
  return new Paragraph({
    spacing: { before: 100, after: 100 },
    indent: { left: 600, right: 600 },
    shading: { fill: LTBROWN, type: ShadingType.SOLID },
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text, italics: true, color: DARKRED, size: 20, font: "Cambria" })]
  });
}

// ── helper: bullet ───────────────────────────────────────────────────────────
function bullet(text, bold = false) {
  return new Paragraph({
    spacing: { before: 40, after: 40 },
    indent: { left: 400 },
    children: [
      new TextRun({ text: "• ", bold: true, color: MAROON, size: 20, font: "Cambria" }),
      new TextRun({ text, bold, color: "1a1a1a", size: 20, font: "Cambria" })
    ]
  });
}

function gap(n = 1) {
  return Array.from({ length: n }, () => new Paragraph({ spacing: { before: 60, after: 60 }, children: [] }));
}

// ══════════════════════════════════════════════════════════════════════════════
// BUILD DOCUMENT
// ══════════════════════════════════════════════════════════════════════════════
const children = [

  // ── TITLE PAGE ─────────────────────────────────────────────────────────────
  new Paragraph({
    spacing: { before: 480, after: 120 },
    alignment: AlignmentType.CENTER,
    shading: { fill: MAROON, type: ShadingType.SOLID },
    children: [new TextRun({ text: "CHARAKA SAMHITA", bold: true, color: WHITE, size: 48, font: "Cambria" })]
  }),
  new Paragraph({
    spacing: { before: 0, after: 80 },
    alignment: AlignmentType.CENTER,
    shading: { fill: MAROON, type: ShadingType.SOLID },
    children: [new TextRun({ text: "Sutra Sthana • Chapter 2", bold: true, color: "FFD700", size: 30, font: "Cambria" })]
  }),
  new Paragraph({
    spacing: { before: 0, after: 200 },
    alignment: AlignmentType.CENTER,
    shading: { fill: MAROON, type: ShadingType.SOLID },
    children: [new TextRun({ text: "अपामार्गतण्डुलीयमध्यायः", bold: true, color: "FFE4B5", size: 34, font: "Cambria" })]
  }),
  new Paragraph({
    spacing: { before: 80, after: 80 },
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Apamargataṇḍulīyamadhyāyaḥ", italics: true, color: DARKRED, size: 26, font: "Cambria" })]
  }),
  new Paragraph({
    spacing: { before: 40, after: 40 },
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Quick-Reference Summary for BAMS First Year", color: "444444", size: 22, font: "Cambria" })]
  }),
  new Paragraph({
    spacing: { before: 40, after: 400 },
    alignment: AlignmentType.CENTER,
    children: [new TextRun({ text: "Commentator: Chakrapani  |  Narrated by: Bhagavan Atreya", italics: true, color: "666666", size: 18, font: "Cambria" })]
  }),

  // ── 1. OVERVIEW ─────────────────────────────────────────────────────────────
  sectionHead("1. Chapter Overview"),
  ...gap(),

  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        tc("Attribute", { bold: true, shade: MAROON, color: WHITE }),
        tc("Details",   { bold: true, shade: MAROON, color: WHITE }),
      ]}),
      new TableRow({ children: [
        tc("Sthana",       { shade: MIDBRN }),
        tc("Sutra Sthana (सूत्रस्थान)", {}),
      ]}),
      new TableRow({ children: [
        tc("Chapter No.",  { shade: MIDBRN }),
        tc("2nd Chapter (द्वितीय अध्याय)", {}),
      ]}),
      new TableRow({ children: [
        tc("Chapter Name", { shade: MIDBRN }),
        tc("अपामार्गतण्डुलीयमध्यायः", {}),
      ]}),
      new TableRow({ children: [
        tc("Named After",  { shade: MIDBRN }),
        tc("Apamarga (Achyranthes aspera / Chirchita) — first drug listed in the chapter", {}),
      ]}),
      new TableRow({ children: [
        tc("Narrated By",  { shade: MIDBRN }),
        tc("Bhagavan Atreya (भगवान् आत्रेय)", {}),
      ]}),
      new TableRow({ children: [
        tc("Follows",      { shade: MIDBRN }),
        tc("Deerghanjiviteeya Adhyaya (Chapter 1)", {}),
      ]}),
      new TableRow({ children: [
        tc("Main Topic",   { shade: MIDBRN }),
        tc("Panchakarma drugs — especially Shirovirechana (Nasya / Nasal Purification)", {}),
      ]}),
      new TableRow({ children: [
        tc("Key Sloka Ref",{ shade: MIDBRN }),
        tc("Shlokas 3–6 (drugs); Shloka 14 — 'Sangrahah Panchakarmikaḥ' (Panchakarma reference)", {}),
      ]}),
    ]
  }),
  ...gap(),

  body("Note on the Name: The chapter is named Apamarga-Tanduliya because Apamarga seeds appear first in the drug list. Chakrapani clarifies that 'Tandula' here means bhusi-rahit (de-husked), fresh seeds capable of germination — not just any seed."),

  // ── 2. OPENING VERSES ───────────────────────────────────────────────────────
  ...gap(),
  sectionHead("2. Opening Verses (Shlokas 1–2)"),
  ...gap(),

  shloka("अथातोऽपामार्गतण्डुलीयमध्यायं व्याख्यास्यामः ॥१॥"),
  shloka("इति ह स्माह भगवानात्रेयः ॥२॥"),
  ...gap(),
  body("Translation: 'We shall now explain the Apamargataṇḍulīya chapter — thus spoke Bhagavan Atreya.'"),

  // ── 3. SHIROVIRECHANA DRUGS ─────────────────────────────────────────────────
  ...gap(),
  sectionHead("3. Shirovirechana Dravyas — Shlokas 3–5"),
  ...gap(),

  subHead("Sanskrit Shlokas"),
  shloka("अपामार्गस्य बीजानि पिप्पलीर्मरिचानि च ।  विडङ्गान्याथ शिग्रूणि सर्षपांस्तुम्बुरूणि च ॥३॥"),
  shloka("अजाजीं चाजगन्धां च पीलून्वेलां हरेणुकाम् ।  पृथ्वीकां सुरसां श्वेतां कुठेरकफणिज्झकौ ॥४॥"),
  shloka("शिरीषबीजं लशुनं हरिद्रे लवणद्वयम् ।  ज्योतिष्मतीं नागरं च दद्यौच्छीर्षविरेचने ॥५॥"),
  ...gap(),

  subHead("Complete Drug List (25 Dravyas)"),
  ...gap(),

  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        tc("No.", { bold: true, shade: MAROON, color: WHITE, width: 600 }),
        tc("Sanskrit Name", { bold: true, shade: MAROON, color: WHITE }),
        tc("Hindi Name",    { bold: true, shade: MAROON, color: WHITE }),
        tc("Botanical Name",{ bold: true, shade: MAROON, color: WHITE }),
      ]}),
      ...[
        ["1",  "अपामार्गबीज (Apamargabīja)",    "चिचिड़ी के बीज",         "Achyranthes aspera"],
        ["2",  "पिप्पली (Pippalī)",               "पीपल",                    "Piper longum"],
        ["3",  "मरिच (Maricha)",                  "काली मिर्च",              "Piper nigrum"],
        ["4",  "विडङ्ग (Viḍaṅga)",               "वायविडंग",                "Embelia ribes"],
        ["5",  "शिग्रु (Śigru)",                  "सहिजन के बीज",            "Moringa oleifera"],
        ["6",  "सर्षप (Sarṣapa)",                 "सरसों",                   "Brassica nigra"],
        ["7",  "तुम्बुरु (Tumburu)",              "तेजबल का फल",             "Zanthoxylum armatum"],
        ["8",  "अजाजी (Ajājī)",                  "जीरा",                    "Cuminum cyminum"],
        ["9",  "अजगन्धा (Ajagandhā)",            "अजगन्धा",                 "Cleome viscosa"],
        ["10", "पीलु (Pīlu)",                     "पीलू वृक्ष के बीज",       "Salvadora persica"],
        ["11", "वेला/एला (Velā)",                 "बड़ी इलायची",             "Amomum subulatum"],
        ["12", "हरेणु (Hareṇu)",                  "सम्भालु के बीज",          "Vitex negundo"],
        ["13", "पृथ्वीका (Pṛthvīkā)",            "मगरैला",                  "Nigella sativa"],
        ["14", "सुरसा (Surasā)",                  "तुलसीभेद",                "Ocimum sanctum var."],
        ["15", "श्वेता (Śvetā)",                  "अपराजिता",                "Clitoria ternatea"],
        ["16", "कुठेरक (Kuṭheraka)",              "तुलसी भेद",               "Ocimum gratissimum"],
        ["17", "फणिज्झक (Phaṇijjhaka)",          "मरूवा",                   "Origanum majorana"],
        ["18", "शिरीषबीज (Śirīṣabīja)",          "शिरीष के बीज",            "Albizia lebbeck"],
        ["19", "लशुन (Laśuna)",                   "लहसुन",                   "Allium sativum"],
        ["20", "हरिद्रा (Haridrā)",               "हल्दी",                   "Curcuma longa"],
        ["21", "दारुहरिद्रा (Dāruharidrā)",       "दारुहल्दी",               "Berberis aristata"],
        ["22", "सैंधव लवण (Saindhava Lavaṇa)",   "सेन्धा नमक",              "Rock Salt"],
        ["23", "काल लवण (Kāla Lavaṇa)",          "काला नमक",                "Black Salt"],
        ["24", "ज्योतिष्मती (Jyotiṣmatī)",       "मालकांगनी",               "Celastrus paniculatus"],
        ["25", "नागर (Nāgara)",                   "सोंठ",                    "Zingiber officinale (dry)"],
      ].map((row, i) =>
        new TableRow({ children: row.map(cell => tc(cell, { shade: i % 2 === 0 ? LTBROWN : WHITE })) })
      )
    ]
  }),
  ...gap(),

  // ── 4. INDICATIONS ──────────────────────────────────────────────────────────
  sectionHead("4. Indications of Shirovirechana — Shloka 6"),
  ...gap(),

  shloka("गौरवे शिरसः शूले पीनसेऽर्धावभेदके ।  क्रिमिव्याधावपस्मारे घ्राणनाशे प्रमोहके ॥६॥"),
  ...gap(),

  body("The above 25 drugs are to be administered as Shirovirechana (Nasya) in the following conditions:", { bold: true }),
  ...gap(),

  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        tc("No.", { bold: true, shade: MAROON, color: WHITE, width: 600 }),
        tc("Sanskrit Term",  { bold: true, shade: MAROON, color: WHITE }),
        tc("Hindi",          { bold: true, shade: MAROON, color: WHITE }),
        tc("Modern Equivalent", { bold: true, shade: MAROON, color: WHITE }),
      ]}),
      ...[
        ["1", "गौरव शिरसः", "सिर का भारीपन", "Heaviness of head"],
        ["2", "शिरःशूल", "सिरदर्द", "Headache"],
        ["3", "पीनस", "पुराना जुकाम / नासा-शोथ", "Chronic Rhinitis / Sinusitis"],
        ["4", "अर्धावभेदक", "अधकपारी", "Hemicrania / Migraine"],
        ["5", "कृमिव्याधि", "कृमिजन्य शिरोरोग", "Headache due to worm infestation"],
        ["6", "अपस्मार", "मिरगी", "Epilepsy"],
        ["7", "घ्राणनाश", "गंध-ज्ञान का नाश", "Anosmia / Loss of smell"],
        ["8", "प्रमोह / मूर्च्छा", "मूर्च्छा, बेहोशी", "Syncope / Fainting"],
      ].map((row, i) =>
        new TableRow({ children: row.map(cell => tc(cell, { shade: i % 2 === 0 ? LTBROWN : WHITE })) })
      )
    ]
  }),
  ...gap(),

  // ── 5. PANCHAKARMA ORDER ────────────────────────────────────────────────────
  sectionHead("5. Panchakarma — Order of Purification (Vimarsha)"),
  ...gap(),

  subHead("Why is Shirovirechana described FIRST?"),
  ...gap(),

  body("Although the usual Panchakarma sequence begins with Vamana and Virechana, Acharya Charaka describes Shirovirechana (Nasya) first. The justification comes from Sutra 17:"),
  ...gap(),
  shloka("यदुत्तमाङ्गमङ्गानां शिरस्तदभिधीयते"),
  body("Translation: 'Among all limbs, the head (Shira) is the most important (Uttamanga).'"),
  ...gap(),
  shloka("अनामये शिरस्येव देहः सम्यक् प्रवर्धते"),
  body("Translation: 'Only when the head is free from disease does the body grow/flourish properly.'"),
  ...gap(),

  body("Just as a tree thrives when its root (mula) is healthy, the entire body remains healthy when the head is purified. Hence, head purification takes priority."),
  ...gap(),

  subHead("Sequence of the 5 Karmas"),
  ...gap(),

  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        tc("Order", { bold: true, shade: MAROON, color: WHITE, width: 800 }),
        tc("Karma (Action)", { bold: true, shade: MAROON, color: WHITE }),
        tc("Organ Purified", { bold: true, shade: MAROON, color: WHITE }),
        tc("Sanskrit", { bold: true, shade: MAROON, color: WHITE }),
      ]}),
      ...[
        ["1st", "Shirovirechana / Nasya",  "Head (Shira)",              "शिर-शुद्धि"],
        ["2nd", "Vamana (Emesis)",         "Stomach (Amasaya)",         "आमाशय-शुद्धि"],
        ["3rd", "Virechana (Purgation)",   "Small intestine",           "पच्यमानाशय-शुद्धि"],
        ["4th", "Niruha Basti",            "Colon (Pakvasaya)",         "पक्वाशय-शुद्धि"],
        ["5th", "Anuvasana Basti",         "Colon (Pakvasaya)",         "पक्वाशय-शुद्धि"],
      ].map((row, i) =>
        new TableRow({ children: row.map(cell => tc(cell, { shade: i % 2 === 0 ? LTBROWN : WHITE })) })
      )
    ]
  }),
  ...gap(),

  // ── 6. KEY EXAM POINTS ──────────────────────────────────────────────────────
  sectionHead("6. Important Points for BAMS Examination"),
  ...gap(),

  bullet("This chapter is the 2nd chapter of Sutra Sthana of Charaka Samhita.", true),
  bullet("Narrated by Bhagavan Atreya; compiled by Agnivesha; commentary by Chakrapani."),
  bullet("Chapter named 'Apamarga-Tanduliya' because Apamarga seeds are listed first among drugs."),
  bullet("'Tandula' = bhusi-rahit (de-husked), fresh, germination-capable seeds of Apamarga."),
  bullet("Total drugs for Shirovirechana = 25 dravyas (Shlokas 3-5)."),
  bullet("Shloka 14 explicitly mentions Panchakarma: 'Sangrahah Panchakarmikaḥ'."),
  bullet("Shira = Uttamanga (most important organ) — justifies Shirovirechana being first."),
  bullet("Shirovirechana = Nasya karma — one of the five Panchakarma procedures."),
  bullet("8 indications for Shirovirechana are listed in Shloka 6."),
  bullet("Vimarsha commentary notes: the chapter also covers remaining drugs from Panchakarma (after Chapter 1's Muliniya dravyas)."),
  bullet("Key Sutra: 'Yaduttamangamanganam shirastadabhidhiyate' (Su. 17) — head is supreme organ."),
  ...gap(),

  // ── 7. GLOSSARY ─────────────────────────────────────────────────────────────
  sectionHead("7. Quick Glossary"),
  ...gap(),

  new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [
      new TableRow({ children: [
        tc("Term", { bold: true, shade: MAROON, color: WHITE }),
        tc("Meaning", { bold: true, shade: MAROON, color: WHITE }),
      ]}),
      ...[
        ["Shirovirechana / Nasya", "Nasal purification therapy — instillation of drugs through nose"],
        ["Tandula",    "Seeds (specifically de-husked, fresh seeds capable of germination)"],
        ["Panchakarma","Five purification procedures in Ayurveda"],
        ["Vimarsha",   "Commentary / critical notes added by commentators like Chakrapani"],
        ["Uttamanga",  "Supreme organ / the head"],
        ["Sthana",     "Section of a classical Ayurvedic text"],
        ["Adhyaya",    "Chapter"],
        ["Amasaya",    "Stomach"],
        ["Pakvasaya",  "Colon / large intestine"],
        ["Apsamara",   "Epilepsy"],
        ["Pinas",      "Chronic rhinitis / sinusitis"],
        ["Ardha-avabhedaka", "Hemicrania / migraine"],
      ].map((row, i) =>
        new TableRow({ children: row.map(cell => tc(cell, { shade: i % 2 === 0 ? LTBROWN : WHITE })) })
      )
    ]
  }),
  ...gap(),

  // ── FOOTER NOTE ─────────────────────────────────────────────────────────────
  new Paragraph({
    spacing: { before: 300, after: 60 },
    alignment: AlignmentType.CENTER,
    shading: { fill: MAROON, type: ShadingType.SOLID },
    children: [new TextRun({ text: "Charaka Samhita | Sutra Sthana | Chapter 2 — Reference Summary for BAMS First Year", color: WHITE, size: 18, font: "Cambria" })]
  }),
];

// ── BUILD & WRITE ────────────────────────────────────────────────────────────
const doc = new Document({
  styles: {
    default: {
      document: {
        run: { font: "Cambria", size: 20 }
      }
    }
  },
  sections: [{
    properties: {
      page: {
        margin: { top: 1000, bottom: 1000, left: 1100, right: 1100 }
      }
    },
    children
  }]
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync('/home/daytona/workspace/charaka-ch2/Charaka_Samhita_Chapter2_Summary.docx', buf);
  console.log('Done: Charaka_Samhita_Chapter2_Summary.docx');
}).catch(e => { console.error(e); process.exit(1); });
Running Command

cd /home/daytona/workspace/charaka-ch2 && node create_doc.js 2>&1

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/works…

Running Command

python3 -c "import zipfile, sys; z=zipfile.ZipFile('/home/daytona/workspace/char…

Your summary document is ready to download:

Charaka Samhita Chapter2 Summary

Word Document · DOCX


Here is what the document contains (7 sections, fully formatted with colour-coded headings, tables, and Sanskrit shlokas):
SectionContent
1. Chapter OverviewQuick-reference table: Sthana, Chapter No., name, narrator, main topic
2. Opening VersesShlokas 1-2 with translation
3. Shirovirechana DravyasAll 3 shlokas (3-5) + complete table of all 25 drugs with Sanskrit, Hindi, and botanical names
4. IndicationsShloka 6 + table of all 8 indications with Sanskrit, Hindi, and modern equivalents
5. Panchakarma OrderWhy Shirovirechana is first (with key sutras) + table of all 5 karmas in sequence
6. Exam Points11 bullet-point key facts for BAMS First Year exams
7. Glossary12 important terms with meanings
The document uses a maroon-and-gold colour scheme appropriate for a classical Ayurvedic text, with all Sanskrit shlokas displayed in italic red against a warm background for easy identification.
This is a shared conversation. Sign in to Orris to start your own chat.