attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Make a notes on this topic within 4 pages with mnemonics to learn full topic in easy way in table or diagram or flowchart format

analyse_media
analyse_media
analyse_media
analyse_media
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist yet"

Running Command

mkdir -p /home/daytona/workspace/acid-group-notes && echo "done"

Writing File

~/acid-group-notes/generate_notes.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
                                 TableStyle, HRFlowable, KeepTogether)
from reportlab.lib.units import cm, mm
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus.flowables import Flowable
import os

OUTPUT = "/home/daytona/workspace/acid-group-notes/Acid_Group_Homeopathy_Notes.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=1.5*cm, leftMargin=1.5*cm,
    topMargin=1.5*cm, bottomMargin=1.5*cm,
    title="Acid Group - Homeopathy Notes",
    author="Study Notes"
)

W, H = A4

# ── Colour palette ──────────────────────────────────────────────────────────
C_NAVY   = colors.HexColor("#1a237e")
C_TEAL   = colors.HexColor("#006064")
C_AMBER  = colors.HexColor("#e65100")
C_GREEN  = colors.HexColor("#1b5e20")
C_RED    = colors.HexColor("#b71c1c")
C_PURPLE = colors.HexColor("#4a148c")
C_LGRAY  = colors.HexColor("#eceff1")
C_LBLUE  = colors.HexColor("#e3f2fd")
C_LGREEN = colors.HexColor("#e8f5e9")
C_LYELLOW= colors.HexColor("#fff9c4")
C_LRED   = colors.HexColor("#fce4ec")
C_LPUR   = colors.HexColor("#f3e5f5")
C_WHITE  = colors.white
C_BLACK  = colors.black
C_LORANGE= colors.HexColor("#fff3e0")
C_LTEAL  = colors.HexColor("#e0f7fa")

styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

# Define all custom styles
TITLE_S  = S("title_s",  fontName="Helvetica-Bold", fontSize=18, textColor=C_WHITE,
              alignment=TA_CENTER, spaceAfter=2)
SUB_S    = S("sub_s",    fontName="Helvetica-Bold", fontSize=11, textColor=C_WHITE,
              alignment=TA_CENTER)
HEAD_S   = S("head_s",   fontName="Helvetica-Bold", fontSize=10, textColor=C_NAVY,
              spaceAfter=3, spaceBefore=5)
BODY_S   = S("body_s",   fontName="Helvetica", fontSize=8.5, leading=12,
              spaceAfter=2)
SMALL_S  = S("small_s",  fontName="Helvetica", fontSize=7.5, leading=11)
BOLD_S   = S("bold_s",   fontName="Helvetica-Bold", fontSize=8.5, leading=12)
CENTER_S = S("center_s", fontName="Helvetica-Bold", fontSize=9, alignment=TA_CENTER,
              textColor=C_NAVY)
MNEMO_S  = S("mnemo_s",  fontName="Helvetica-Bold", fontSize=9, textColor=C_AMBER,
              backColor=C_LYELLOW, alignment=TA_CENTER, borderPad=3)
TABLE_H  = S("table_h",  fontName="Helvetica-Bold", fontSize=8, textColor=C_WHITE,
              alignment=TA_CENTER)
TABLE_B  = S("table_b",  fontName="Helvetica", fontSize=7.5, leading=10)
TABLE_BB = S("table_bb", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_NAVY)
FLOW_S   = S("flow_s",   fontName="Helvetica-Bold", fontSize=8, textColor=C_WHITE,
              alignment=TA_CENTER)
FLOW_TXT = S("flow_txt", fontName="Helvetica", fontSize=7.5, alignment=TA_CENTER,
              textColor=C_BLACK)
PAGE_H   = S("page_h",   fontName="Helvetica-Bold", fontSize=13, textColor=C_WHITE,
              alignment=TA_CENTER)

def page_header(title, subtitle, bg=C_NAVY):
    data = [[Paragraph(title, PAGE_H)],
            [Paragraph(subtitle, SUB_S)]]
    t = Table(data, colWidths=[W - 3*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX',        (0,0), (-1,-1), 1, C_WHITE),
        ('TOPPADDING',  (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('ALIGN',      (0,0), (-1,-1), 'CENTER'),
    ]))
    return t

def section_header(text, bg=C_TEAL):
    t = Table([[Paragraph(text, TABLE_H)]], colWidths=[W-3*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('TOPPADDING',  (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('BOX',        (0,0), (-1,-1), 0.5, C_WHITE),
    ]))
    return t

def mnemonic_box(mnemonic_text, meaning_text, bg=C_LYELLOW):
    data = [
        [Paragraph("🧠 MNEMONIC", S("m1", fontName="Helvetica-Bold", fontSize=8, textColor=C_AMBER))],
        [Paragraph(mnemonic_text, S("m2", fontName="Helvetica-Bold", fontSize=10, textColor=C_AMBER, alignment=TA_CENTER))],
        [Paragraph(meaning_text, S("m3", fontName="Helvetica", fontSize=7.5, textColor=C_BLACK, alignment=TA_CENTER))],
    ]
    t = Table(data, colWidths=[W-3*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX',        (0,0), (-1,-1), 1.5, C_AMBER),
        ('TOPPADDING',  (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('ALIGN',      (0,0), (-1,-1), 'CENTER'),
    ]))
    return t

# ════════════════════════════════════════════════════════════════════════════
# BUILD STORY
# ════════════════════════════════════════════════════════════════════════════
story = []
SP = lambda n=3: Spacer(1, n*mm)
HR = lambda: HRFlowable(width="100%", thickness=0.5, color=C_LGRAY, spaceAfter=2)

# ════════════════════════════════════════════════════
# PAGE 1 – INTRODUCTION + GROUP INDICATIONS
# ════════════════════════════════════════════════════
story.append(page_header("ACID GROUP - HOMOEOPATHY", 
                          "Dr. Arvind Jain | Perceiving Group Study | Quick Revision Notes", C_NAVY))
story.append(SP(3))

# Introduction table
story.append(section_header("INTRODUCTION & CLASSIFICATION", C_NAVY))
intro_data = [
    [Paragraph("<b>Acid =</b> Sharp, Pointed, Pungent, Sour tasting", TABLE_BB),
     Paragraph("<b>Types:</b> Organic & Inorganic", TABLE_BB)],
    [Paragraph("<b>Organic Acids</b><br/>Slow, progressive, deep pathology<br/>Involving vital organs of body", TABLE_B),
     Paragraph("<b>Inorganic Acids</b><br/>Rapid, acute, deep pathology<br/>Skin, mucous membrane, blood vessels", TABLE_B)],
    [Paragraph("<b>Reducing agents</b> (Organic) | <b>Oxidising agents</b> (Inorganic)<br/>Colourless, fuming, corrosive liquids", TABLE_B),
     Paragraph("<b>Uses:</b> Preservative, Curative,<br/>Destructive purposes", TABLE_B)],
]
t_intro = Table(intro_data, colWidths=[(W-3*cm)*0.5, (W-3*cm)*0.5])
t_intro.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (1,0), C_LBLUE),
    ('BACKGROUND', (0,1), (0,1), C_LGREEN),
    ('BACKGROUND', (1,1), (1,1), C_LRED),
    ('BACKGROUND', (0,2), (1,2), C_LYELLOW),
    ('BOX',        (0,0), (-1,-1), 1, C_NAVY),
    ('INNERGRID',  (0,0), (-1,-1), 0.5, colors.HexColor("#90caf9")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
]))
story.append(t_intro)
story.append(SP(3))

# Mnemonic 1
story.append(mnemonic_box(
    '"O-S-I"  Organic = Slow Internal  |  Inorganic = Swift & Intense',
    'O for Organic → Slow (vital organs) | I for Inorganic → Instant (skin/MM/blood)'
))
story.append(SP(3))

# GROUP INDICATIONS TABLE
story.append(section_header("10 GROUP INDICATIONS  →  Mnemonic: D-A-S-O-H-S-T-D-P-C", C_TEAL))
story.append(SP(1))

gi_data = [
    [Paragraph("<b>#</b>", TABLE_H), Paragraph("<b>Indication</b>", TABLE_H),
     Paragraph("<b>Key Detail</b>", TABLE_H), Paragraph("<b>Mnemonic Cue</b>", TABLE_H)],
    [Paragraph("1", TABLE_B), Paragraph("<b>DEBILITY</b>", TABLE_BB),
     Paragraph("Chronic progressive. Neuro-asthenia.<br/>Mental→ Acid Phos | Physical→ Muriatic Acid", TABLE_B),
     Paragraph("D – Down & Drained", S("mc", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_AMBER))],
    [Paragraph("2", TABLE_B), Paragraph("<b>ACRIDITY, OFFENSIVENESS & BURNING</b>", TABLE_BB),
     Paragraph("HALLMARK of acid group", TABLE_B),
     Paragraph("A – Acid Burns!", S("mc2", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_RED))],
    [Paragraph("3", TABLE_B), Paragraph("<b>SOURNESS</b>", TABLE_BB),
     Paragraph("Sour smell of all discharges – menses,<br/>leucorrhoea, vomiting, stools, pus", TABLE_B),
     Paragraph("S – Sour Smell Signals Acid", S("mc3", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_TEAL))],
    [Paragraph("4", TABLE_B), Paragraph("<b>ORGANIC vs INORGANIC</b>", TABLE_BB),
     Paragraph("Organic → Acute + Chronic | Inorganic → Acute", TABLE_B),
     Paragraph("O – Organ = Organic", S("mc4", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_PURPLE))],
    [Paragraph("5", TABLE_B), Paragraph("<b>HAEMORRHAGIC TENDENCY</b>", TABLE_BB),
     Paragraph("Blood: blackish-brown, non-coagulable<br/>Organic→Passive | Inorganic→Active bleeding", TABLE_B),
     Paragraph("H – Haemorrhage Heavy", S("mc5", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_RED))],
    [Paragraph("6", TABLE_B), Paragraph("<b>SKIN & MUCOUS MEMBRANE</b>", TABLE_BB),
     Paragraph("Inflammation → Ulceration → Gangrene", TABLE_B),
     Paragraph("S – Skin to Sores to Severe", S("mc6", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_TEAL))],
    [Paragraph("7", TABLE_B), Paragraph("<b>TENDENCY: CRACKS, FISSURES, FISTULAS</b>", TABLE_BB),
     Paragraph("Pseudo-membrane formation tendency", TABLE_B),
     Paragraph("T – Tears in Tissue", S("mc7", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_GREEN))],
    [Paragraph("8", TABLE_B), Paragraph("<b>DISCHARGES</b>", TABLE_BB),
     Paragraph("Acrid, excoriating, putrid,<br/>burning, offensive, haemorrhagic", TABLE_B),
     Paragraph("D – Dirty Discharges", S("mc8", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_NAVY))],
    [Paragraph("9", TABLE_B), Paragraph("<b>PAINS</b>", TABLE_BB),
     Paragraph("Pricking, stitching, splinter-like,<br/>sphincter-like pains", TABLE_B),
     Paragraph("P – Pricking Pins", S("mc9", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_AMBER))],
    [Paragraph("10", TABLE_B), Paragraph("<b>CRAVINGS & AVERSIONS</b>", TABLE_BB),
     Paragraph("CRAVES: Alcohol, fat, indigestible food<br/>AVERSE: Meat, bread", TABLE_B),
     Paragraph("C – Craves Alcohol! Avoid Meat.", S("mc10", fontName="Helvetica-Bold", fontSize=7.5, textColor=C_PURPLE))],
]

col_w = [(W-3*cm)*x for x in [0.05, 0.24, 0.45, 0.26]]
t_gi = Table(gi_data, colWidths=col_w, repeatRows=1)
t_gi.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_TEAL),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LGRAY]),
    ('BOX',        (0,0), (-1,-1), 1, C_TEAL),
    ('INNERGRID',  (0,0), (-1,-1), 0.3, colors.HexColor("#b2dfdb")),
    ('TOPPADDING',  (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ('LEFTPADDING', (0,0), (-1,-1), 4),
    ('VALIGN',     (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(t_gi)
story.append(SP(3))

story.append(mnemonic_box(
    '"D-A-S-O-H-S-T-D-P-C"',
    'Debility | Acridity+Burning | Sourness | Organic/Inorganic | Haemorrhage | Skin+MM | Tears(Fissures) | Discharges | Pains | Cravings'
))

# ════════════════════════════════════════════════════
# PAGE 2 – CONSTITUTION + SPHERE + MIASM + MODALITIES
# ════════════════════════════════════════════════════
from reportlab.platypus import PageBreak
story.append(PageBreak())

story.append(page_header("ACID GROUP – PAGE 2",
                          "Constitution | Sphere of Action | Miasm | Thermals | Modalities | Ailments From", C_TEAL))
story.append(SP(3))

# Constitution + Sphere side by side
story.append(section_header("CONSTITUTION  &  SPHERE OF ACTION", C_GREEN))
story.append(SP(2))

const_data = [
    [Paragraph("<b>CONSTITUTION</b>", TABLE_H), Paragraph("<b>SPHERE OF ACTION</b>", TABLE_H)],
    [Paragraph(
        "• <b>Thin, Weak, Broken Down</b><br/>"
        "• Pale, Anaemic, Shrivelled, Emaciated<br/>"
        "• Progressive weakness<br/>"
        "• Prematurely old looks<br/>"
        "• Rapid withering &amp; emaciation",
        TABLE_B),
     Paragraph(
        "• <b>CNS</b> – Central Nervous System<br/>"
        "• <b>Glands</b><br/>"
        "• <b>Kidneys</b><br/>"
        "• <b>Skin</b> &amp; <b>Mucous Membranes</b><br/>"
        "• <b>Endocrines</b><br/>"
        "• <b>Joints</b><br/>"
        "• <b>Blood</b> &amp; <b>Veins</b>",
        TABLE_B)],
]
t_cs = Table(const_data, colWidths=[(W-3*cm)*0.48, (W-3*cm)*0.52])
t_cs.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_GREEN),
    ('BACKGROUND', (0,1), (0,1), C_LGREEN),
    ('BACKGROUND', (1,1), (1,1), C_LTEAL),
    ('BOX',        (0,0), (-1,-1), 1, C_GREEN),
    ('INNERGRID',  (0,0), (-1,-1), 0.5, C_GREEN),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN',     (0,0), (-1,-1), 'TOP'),
]))
story.append(t_cs)
story.append(SP(2))

# Constitution mnemonic
story.append(mnemonic_box(
    '"TAPE-W" → Thin | Anaemic | Pale | Emaciated | Weak | prematurely old',
    'Think of a worn-out TAPE that has lost its grip – like Acid patients!',
    C_LGREEN
))
story.append(SP(2))

# Sphere mnemonic
story.append(mnemonic_box(
    '"CGK-SMEJB" → CNS | Glands | Kidneys | Skin | MM | Endocrines | Joints | Blood',
    'Can Glands Kill? Skin May End Joint Bleeding!',
    C_LTEAL
))
story.append(SP(3))

# Miasm + Thermals
story.append(section_header("MIASM  |  THERMALS  |  AILMENTS FROM", C_PURPLE))
story.append(SP(2))

mta_data = [
    [Paragraph("<b>MIASM</b>", TABLE_H), 
     Paragraph("<b>THERMALS</b>", TABLE_H), 
     Paragraph("<b>AILMENTS FROM</b>", TABLE_H)],
    [Paragraph(
        "• Psora +1<br/>"
        "• Sycotic +2<br/>"
        "• <b>Tubercular +2</b><br/>"
        "• Syphilitic +2",
        TABLE_B),
     Paragraph(
        "<b>All acids = CHILLY</b><br/><br/>"
        "Exceptions (HOT):<br/>"
        "• Fluoric Acid<br/>"
        "• Picric Acid",
        TABLE_B),
     Paragraph(
        "• Stress +++<br/>"
        "• Debaucheries / Sex excess<br/>"
        "• Grief, Worries, Chagrin<br/>"
        "• Mortification<br/>"
        "• Sleeplessness<br/>"
        "• Stimulants / Alcohol<br/>"
        "• Injury &amp; Insect Bite",
        TABLE_B)],
]
t_mta = Table(mta_data, colWidths=[(W-3*cm)*x for x in [0.22, 0.28, 0.50]])
t_mta.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_PURPLE),
    ('BACKGROUND', (0,1), (0,1), C_LPUR),
    ('BACKGROUND', (1,1), (1,1), C_LORANGE),
    ('BACKGROUND', (2,1), (2,1), C_LRED),
    ('BOX',        (0,0), (-1,-1), 1, C_PURPLE),
    ('INNERGRID',  (0,0), (-1,-1), 0.5, colors.HexColor("#ce93d8")),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN',     (0,0), (-1,-1), 'TOP'),
]))
story.append(t_mta)
story.append(SP(3))

# Modalities table
story.append(section_header("MODALITIES", C_AMBER))
story.append(SP(2))

mod_data = [
    [Paragraph("<b>WORSE ( < ) AGGRAVATION</b>", TABLE_H),
     Paragraph("<b>BETTER ( > ) AMELIORATION</b>", TABLE_H)],
    [Paragraph(
        "• Night<br/>• Cold<br/>• Cold drinks +++<br/>"
        "• Draft<br/>• Touch +++<br/>• Exertion (Mental &amp; Physical)<br/>• Stimulants",
        TABLE_B),
     Paragraph(
        "• Warmth<br/>• Short sleep<br/>• Rest",
        TABLE_B)],
]
t_mod = Table(mod_data, colWidths=[(W-3*cm)*0.55, (W-3*cm)*0.45])
t_mod.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (0,0), C_RED),
    ('BACKGROUND', (1,0), (1,0), C_GREEN),
    ('BACKGROUND', (0,1), (0,1), C_LRED),
    ('BACKGROUND', (1,1), (1,1), C_LGREEN),
    ('BOX',        (0,0), (-1,-1), 1, C_AMBER),
    ('INNERGRID',  (0,0), (-1,-1), 0.5, C_AMBER),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN',     (0,0), (-1,-1), 'TOP'),
]))
story.append(t_mod)
story.append(SP(2))

story.append(mnemonic_box(
    '"CCC-DTE-S  |  WSR"',
    'Worse: Cold, Cold drinks, Cold draft, Touch, Exertion, Stimulants  |  Better: Warmth, Short sleep, Rest',
    C_LORANGE
))

# ════════════════════════════════════════════════════
# PAGE 3 – MIND (Flowchart + Key Features)
# ════════════════════════════════════════════════════
story.append(PageBreak())
story.append(page_header("ACID GROUP – PAGE 3",
                          "MIND – Mental Characteristics & Flowchart of Progression", C_RED))
story.append(SP(3))

# KEY MIND FEATURE
story.append(section_header("KEY MIND EXPRESSION: VINDICTIVENESS + HOPELESSNESS", C_RED))
story.append(SP(2))

mind_key_data = [
    [Paragraph("<b>PRIMARY EXPRESSION</b>", TABLE_H), Paragraph("<b>ORIGIN: Why They Are Like This?</b>", TABLE_H)],
    [Paragraph(
        "• <b>Vindictiveness</b> (revenge-seeking)<br/>"
        "• <b>Irritability</b><br/>"
        "• <b>Abusiveness</b> (foul language)<br/>"
        "• <b>Hatred</b><br/>"
        "• <b>Hopelessness</b><br/><br/>"
        "Present from childhood to old age.<br/>"
        "Never prescribe acids without vindictiveness!",
        TABLE_B),
     Paragraph(
        "Originally: <b>Lively, Jovial, Attractive</b><br/>"
        "High sexual desires, quick to respond.<br/><br/>"
        "BUT: have <b>LOW ENDURANCE</b><br/>"
        "When bombarded with stress → energy vanishes<br/>"
        "Resistance to disease = extremely weak<br/><br/>"
        "Sour relationship → Hatred toward humiliator<br/>"
        "Become revengeful, never moved by apology<br/>"
        "Derive happiness from others' suffering",
        TABLE_B)],
]
t_mind_key = Table(mind_key_data, colWidths=[(W-3*cm)*0.45, (W-3*cm)*0.55])
t_mind_key.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_RED),
    ('BACKGROUND', (0,1), (0,1), C_LRED),
    ('BACKGROUND', (1,1), (1,1), C_LYELLOW),
    ('BOX',        (0,0), (-1,-1), 1, C_RED),
    ('INNERGRID',  (0,0), (-1,-1), 0.5, colors.HexColor("#ef9a9a")),
    ('TOPPADDING',  (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN',     (0,0), (-1,-1), 'TOP'),
]))
story.append(t_mind_key)
story.append(SP(3))

# FLOWCHART OF MENTAL PROGRESSION
story.append(section_header("MENTAL PROGRESSION FLOWCHART", C_NAVY))
story.append(SP(2))

def flow_box(text, bg=C_NAVY, tc=C_WHITE, width_frac=1.0):
    col_w = (W - 3*cm) * width_frac
    t = Table([[Paragraph(text, S("fb", fontName="Helvetica-Bold", fontSize=8, 
                                   textColor=tc, alignment=TA_CENTER))]],
              colWidths=[col_w])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX',        (0,0), (-1,-1), 1.5, C_NAVY),
        ('TOPPADDING',  (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('ROUNDEDCORNERS', [4]),
    ]))
    return t

def arrow_row(text="↓"):
    return Table([[Paragraph(text, S("ar", fontName="Helvetica-Bold", fontSize=12, 
                                     textColor=C_NAVY, alignment=TA_CENTER))]],
                 colWidths=[W-3*cm])

# Start of flow
story.append(flow_box("🌟 ORIGINALLY: Active, Lively, Jovial, Strong Sex Drive, High Energy", 
                       bg=C_GREEN, tc=C_WHITE))
story.append(arrow_row())
story.append(flow_box("⚡ BOMBARDED with Stress, Grief, Sorrow, Humiliation", bg=C_AMBER, tc=C_WHITE))
story.append(arrow_row())
story.append(flow_box("📉 LOW ENDURANCE → Energy Vanishes Completely", bg=C_RED, tc=C_WHITE))
story.append(arrow_row("↓  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ↓"))

# Two path table
path_data = [
    [Paragraph("<b>PATH A: BURNS OUT (Inward)</b>", TABLE_H),
     Paragraph("<b>PATH B: REACTIVE (Outward)</b>", TABLE_H)],
    [Paragraph(
        "Groan &amp; Moan<br/>↓<br/>"
        "Anxious (health anxiety, small illness = big disease)<br/>↓<br/>"
        "Fearful (fear of death, confusion)<br/>↓<br/>"
        "Memory weak → Forgetful<br/>↓<br/>"
        "Indifference to loved ones<br/>↓<br/>"
        "Guilt<br/>↓<br/>"
        "<b>SUICIDAL TENDENCY</b>",
        TABLE_B),
     Paragraph(
        "Highly Reactive &amp; Irritable<br/>↓<br/>"
        "Abusive, Acrid (foul language)<br/>↓<br/>"
        "Sours all relationships<br/>↓<br/>"
        "Marked Hatred (to humiliator)<br/>↓<br/>"
        "Revengeful (tortures the person)<br/>↓<br/>"
        "<b>VINDICTIVE</b><br/>"
        "(Never moved by any apology)<br/>↓<br/>"
        "<b>Happiness from others' suffering</b>",
        TABLE_B)],
]
t_path = Table(path_data, colWidths=[(W-3*cm)*0.5, (W-3*cm)*0.5])
t_path.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (0,0), C_NAVY),
    ('BACKGROUND', (1,0), (1,0), C_RED),
    ('BACKGROUND', (0,1), (0,1), C_LBLUE),
    ('BACKGROUND', (1,1), (1,1), C_LRED),
    ('BOX',        (0,0), (-1,-1), 1.5, C_NAVY),
    ('INNERGRID',  (0,0), (-1,-1), 1, C_NAVY),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN',     (0,0), (-1,-1), 'TOP'),
]))
story.append(t_path)
story.append(SP(2))

# Core concept
story.append(flow_box("Core Acid Property at MIND LEVEL: BURNING + ACRIDITY + CORROSIVENESS", 
                       bg=C_NAVY, tc=C_WHITE))
story.append(SP(3))

story.append(mnemonic_box(
    '"VIAHH" – Vindictive | Irritable | Abusive | Hatred | Hopeless',
    'Remember: A Vindictive person who VIAHH (via hate) burns everyone around them!'
))
story.append(SP(2))

story.append(mnemonic_box(
    'PATH A: "GAF-IGS" → Groan→Anxious→Fearful→Indifferent→Guilty→Suicidal',
    'PATH B: "HARV" → Highly reactive→Abusive→Revengeful→Vindictive',
    C_LRED
))

# ════════════════════════════════════════════════════
# PAGE 4 – CLINICAL + SUMMARY MASTER TABLE
# ════════════════════════════════════════════════════
story.append(PageBreak())
story.append(page_header("ACID GROUP – PAGE 4",
                          "Clinical Indications | Organic vs Inorganic | Master Summary", C_PURPLE))
story.append(SP(3))

# Clinical indications
story.append(section_header("CLINICAL INDICATIONS", C_RED))
story.append(SP(2))

clin_data = [
    [Paragraph("<b>Clinical Condition</b>", TABLE_H), 
     Paragraph("<b>Acid Group Connection</b>", TABLE_H),
     Paragraph("<b>Clinical Condition</b>", TABLE_H),
     Paragraph("<b>Acid Group Connection</b>", TABLE_H)],
    ["Multiple Sclerosis", "CNS sphere", "Ulcers", "MM + skin action"],
    ["Myelitis", "CNS + spinal", "Burns", "Corrosive action"],
    ["Malignancy", "Deep pathology", "Diabetes", "Endocrine sphere"],
    ["Renal Calculus", "Kidney sphere", "Calcaneal Spur", "Bone/joint sphere"],
    ["Anaemia", "Blood sphere", "Haemorrhagic Tendency", "Blood non-coagulable"],
]
# convert strings to paragraphs
from copy import deepcopy
clin_data2 = [clin_data[0]]
bg_colors = [C_WHITE, C_LGRAY]
for i, row in enumerate(clin_data[1:]):
    clin_data2.append([Paragraph(str(c), TABLE_BB if j%2==0 else TABLE_B) for j, c in enumerate(row)])

col_cw = [(W-3*cm)*x for x in [0.27, 0.23, 0.27, 0.23]]
t_clin = Table(clin_data2, colWidths=col_cw, repeatRows=1)
t_clin.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_RED),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LGRAY]),
    ('BACKGROUND', (0,1), (0,-1), C_LRED),
    ('BACKGROUND', (2,1), (2,-1), C_LRED),
    ('BOX',        (0,0), (-1,-1), 1, C_RED),
    ('INNERGRID',  (0,0), (-1,-1), 0.3, colors.HexColor("#ef9a9a")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 4),
]))
story.append(t_clin)
story.append(SP(2))

story.append(mnemonic_box(
    '"MMRUBDCHA" → Multiple sclerosis | Myelitis | Renal calculus | Ulcers | Burns | Diabetes | Calcaneal spur | Haemorrhage | Anaemia',
    'Many Medical Renal Units Burn Diabetics: Calcified Haemorrhagic Anaemia!',
    C_LRED
))
story.append(SP(3))

# Organic vs Inorganic master comparison
story.append(section_header("ORGANIC vs INORGANIC ACIDS – MASTER COMPARISON", C_NAVY))
story.append(SP(2))

comp_data = [
    [Paragraph("<b>Feature</b>", TABLE_H),
     Paragraph("<b>ORGANIC ACIDS</b>", TABLE_H),
     Paragraph("<b>INORGANIC ACIDS</b>", TABLE_H)],
    ["Onset", "Slow, Progressive", "Rapid, Acute"],
    ["Depth", "Deep – vital organs", "Deep – skin/MM/blood"],
    ["Disease Type", "Chronic (mainly)", "Acute predominantly"],
    ["Haemorrhage", "PASSIVE bleeding", "ACTIVE bleeding"],
    ["Chemical role", "Reducing agents", "Oxidising agents"],
    ["Classic examples", "Acetic, Lactic, Oxalic, Formic, Picric", "Nitric, Muriatic, Sulphuric, Phosphoric"],
    ["Debility type", "Mental sphere (Acid Phos)", "Physical sphere (Muriatic Acid)"],
]
comp_data2 = [comp_data[0]]
for i, row in enumerate(comp_data[1:]):
    comp_data2.append([Paragraph(str(c), TABLE_BB if j==0 else TABLE_B) for j, c in enumerate(row)])

col_compw = [(W-3*cm)*x for x in [0.26, 0.37, 0.37]]
t_comp = Table(comp_data2, colWidths=col_compw, repeatRows=1)
t_comp.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_NAVY),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LGRAY]),
    ('BACKGROUND', (1,1), (1,-1), C_LGREEN),
    ('BACKGROUND', (2,1), (2,-1), C_LRED),
    ('BOX',        (0,0), (-1,-1), 1, C_NAVY),
    ('INNERGRID',  (0,0), (-1,-1), 0.3, colors.HexColor("#90caf9")),
    ('TOPPADDING',  (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 4),
]))
story.append(t_comp)
story.append(SP(3))

# FINAL MASTER MNEMONIC BOX
story.append(section_header("MASTER MNEMONIC SUMMARY", C_AMBER))
story.append(SP(2))

master_data = [
    [Paragraph("<b>Topic</b>", TABLE_H),
     Paragraph("<b>Mnemonic</b>", TABLE_H),
     Paragraph("<b>Full Form</b>", TABLE_H)],
    ["Group Indications",
     "D-A-S-O-H-S-T-D-P-C",
     "Debility | Acridity+Burning | Sourness | Organic-Inorganic | Haemorrhage | Skin+MM | Tears | Discharges | Pains | Cravings"],
    ["Constitution",
     "TAPE-W",
     "Thin | Anaemic | Pale | Emaciated | Weak (prematurely old)"],
    ["Sphere of Action",
     "CGK-SMEJB",
     "CNS | Glands | Kidneys | Skin | MM | Endocrines | Joints | Blood"],
    ["Mind (Key)",
     "VIAHH",
     "Vindictive | Irritable | Abusive | Hatred | Hopeless"],
    ["Mind Path A",
     "GAF-IGS",
     "Groan→Anxious→Fearful→Indifferent→Guilt→Suicidal"],
    ["Mind Path B",
     "HARV",
     "Highly reactive→Abusive→Revengeful→Vindictive"],
    ["Thermals",
     "All CHILLY (FP Hot)",
     "Fluoric acid & Picric acid are HOT; rest are CHILLY"],
    ["Modalities (worse)",
     "CCC-DTE-S",
     "Cold, Cold drinks, Cold draft, Touch, Exertion, Stimulants"],
    ["Modalities (better)",
     "WSR",
     "Warmth | Short sleep | Rest"],
    ["Clinical",
     "MMRUBDCHA",
     "Multiple sclerosis, Myelitis, Renal calculus, Ulcers, Burns, Diabetes, Calcaneal spur, Haemorrhage, Anaemia"],
    ["Ailments from",
     "SGCM-SIS",
     "Stress | Grief | Chagrin | Mortification | Sleeplessness | Injury | Stimulants"],
]
master_data2 = [master_data[0]]
row_bg = [C_LYELLOW, C_LGREEN, C_LBLUE, C_LRED, C_LPUR, C_LORANGE, C_LTEAL,
          C_LYELLOW, C_LGREEN, C_LBLUE, C_LRED, C_LPUR]
for i, row in enumerate(master_data[1:]):
    master_data2.append([Paragraph(str(c), 
                         TABLE_BB if j==0 else 
                         S("mn"+str(i)+str(j), fontName="Helvetica-Bold", fontSize=8, textColor=C_AMBER) if j==1 
                         else TABLE_B) 
                        for j, c in enumerate(row)])

col_masterw = [(W-3*cm)*x for x in [0.20, 0.22, 0.58]]
t_master = Table(master_data2, colWidths=col_masterw, repeatRows=1)
t_master.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_AMBER),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_LYELLOW, C_LGREEN]),
    ('BACKGROUND', (1,1), (1,-1), C_LYELLOW),
    ('BOX',        (0,0), (-1,-1), 1.5, C_AMBER),
    ('INNERGRID',  (0,0), (-1,-1), 0.3, colors.HexColor("#ffcc80")),
    ('TOPPADDING',  (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ('LEFTPADDING', (0,0), (-1,-1), 4),
    ('VALIGN',     (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(t_master)
story.append(SP(2))

# Footer note
story.append(Table(
    [[Paragraph("Notes by Dr. Arvind Jain | Perceiving Group Study | Acid Group Homeopathy", 
                S("footer", fontName="Helvetica-Oblique", fontSize=7, textColor=C_WHITE, alignment=TA_CENTER))]],
    colWidths=[W-3*cm]
))

# ── Build ─────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
print(f"File size: {os.path.getsize(OUTPUT):,} bytes")
Running Command

cd /home/daytona/workspace/acid-group-notes && python generate_notes.py 2>&1

PDF generated successfully! Here are your notes:

Acid Group Homeopathy Notes

PDF Document · PDF


Here's what's inside each of the 4 pages:
Page 1 - Introduction & Group Indications
  • Classification table: Organic vs Inorganic acids at a glance
  • Full 10 Group Indications table with mnemonic cues per point
  • Master mnemonic: "D-A-S-O-H-S-T-D-P-C"
Page 2 - Constitution, Sphere, Miasm, Modalities
  • Side-by-side table: Constitution vs Sphere of Action
  • Mnemonic "TAPE-W" for constitution (Thin, Anaemic, Pale, Emaciated, Weak)
  • Mnemonic "CGK-SMEJB" for sphere of action
  • Miasm, Thermals (all CHILLY except Fluoric & Picric), and Modalities table with "CCC-DTE-S | WSR"
Page 3 - Mind (Flowchart)
  • Full mental progression flowchart: Lively/Jovial → Low Endurance → Two paths
  • Path A (burns inward): Groan→Anxious→Fearful→Forgetful→Indifference→Suicidal - mnemonic "GAF-IGS"
  • Path B (reactive outward): Irritable→Abusive→Revengeful→Vindictive - mnemonic "HARV"
  • Key mental mnemonic: "VIAHH" (Vindictive, Irritable, Abusive, Hatred, Hopeless)
Page 4 - Clinical + Master Summary
  • Clinical indications table with 10 conditions and their sphere connections
  • Organic vs Inorganic master comparison table
  • Complete Master Mnemonic Reference Table with all mnemonics consolidated in one place
This is a shared conversation. Sign in to Orris to start your own chat.