Make ppt of flow charts of characteristics symptoms of medicine pulstatilla, calcarea carb, bryonia alba, arnica montana, sulphur, chamomilla, cocculus, aconite, apis malifica, rush tox, make sure all ppts are looke like hand written and used different colours pen
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
mkdir -p /home/daytona/workspace/homeo-remedies-ppt && node -e "require('pptxgen…
~/homeo-remedies-ppt/make_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "Homeopathic Remedies - Characteristic Symptoms";
// ── Handwritten-style font stack (Caveat is best; fallback to Segoe Print, Comic Sans MS)
const HW_FONT = "Caveat";
// Pen-colour palette (one dominant colour per remedy)
const PALETTES = [
{ bg: "FFF8F0", box: "FF6B35", arrow: "D94F00", title: "B03000", text: "4A1A00", accent: "FFAB76" }, // Pulsatilla – warm orange
{ bg: "F0F8FF", box: "2D7DD2", arrow: "1A5EA0", title: "0D3B6E", text: "0A2540", accent: "7EC8E3" }, // Calc carb – blue
{ bg: "F5FFF5", box: "3A9E3A", arrow: "1E6B1E", title: "144E14", text: "0D2E0D", accent: "82D782" }, // Bryonia – green
{ bg: "FFFBF0", box: "C07000", arrow: "8A5000", title: "5A3000", text: "3B1A00", accent: "FFCC66" }, // Arnica – golden
{ bg: "FFF0FF", box: "9B30D9", arrow: "6B1A9A", title: "3D0066", text: "220033", accent: "D89EF5" }, // Sulphur – violet
{ bg: "FFF5F5", box: "D94040", arrow: "9E2020", title: "6B0000", text: "3B0000", accent: "F5A0A0" }, // Chamomilla – red
{ bg: "F0F5FF", box: "4070C0", arrow: "254A90", title: "0E2B60", text: "091836", accent: "90B4F0" }, // Cocculus – indigo
{ bg: "F0FFFF", box: "00A0A0", arrow: "006868", title: "003A3A", text: "002020", accent: "80E0E0" }, // Aconite – teal
{ bg: "FFFFF0", box: "B09000", arrow: "786000", title: "4A3800", text: "2A2000", accent: "E8D070" }, // Apis mel – amber
{ bg: "FFF0F5", box: "E04080", arrow: "A02050", title: "600030", text: "360018", accent: "F0A0C0" }, // Rhus tox – rose
];
// ── Flowchart data per remedy
// Each node: { label, sub? }
// Arrows connect top→down (central chain), with side branches where noted
const REMEDIES = [
{
name: "Pulsatilla",
sub: "(Windflower)",
nodes: [
{ label: "Mild, Yielding,\nTimid Temperament" },
{ label: "Changeable Symptoms\n& Moods" },
{ label: "Thirstless\n(even with fever)" },
{ label: "Symptoms Worse\nin Warm Room / Heat" },
{ label: "Better Open Air\n& Cold Applications" },
{ label: "Thick, Bland,\nYellow-Green Discharges" },
{ label: "Wandering Pains\n(move joint to joint)" },
{ label: "Weeps Easily;\nDesires Sympathy" },
],
side: [
{ from: 1, label: "Hormonal\nDisturbances" },
{ from: 4, label: "Digestive\nComplaints after\nRich/Fatty food" },
],
},
{
name: "Calcarea Carbonica",
sub: "(Oyster Shell)",
nodes: [
{ label: "Fat, Fair, Flabby\nConstitution" },
{ label: "Profuse Sweating\n(head, neck at night)" },
{ label: "Craves Eggs &\nIndigestible things" },
{ label: "Cold, Damp\nFeet & Hands" },
{ label: "Slow Development\nin Children" },
{ label: "Anxiety about\nHealth & Future" },
{ label: "Glandular\nEnlargement" },
{ label: "Worse Cold, Damp\n& Exertion" },
],
side: [
{ from: 2, label: "Teeth & Bone\nWeakness" },
{ from: 5, label: "Leucorrhoea\n(milky)" },
],
},
{
name: "Bryonia Alba",
sub: "(Wild Hops)",
nodes: [
{ label: "All Symptoms Worse\nfrom Any Motion" },
{ label: "Better Absolute\nRest & Pressure" },
{ label: "Great Thirst for\nLarge Quantities" },
{ label: "Dryness of all\nMucous Membranes" },
{ label: "Stitching,\nBursting Pains" },
{ label: "Irritable;\nWants to go Home" },
{ label: "Inflammation of\nSerous Membranes" },
{ label: "Constipation\n(large, dry, hard stool)" },
],
side: [
{ from: 3, label: "Dry Cough\n(must hold chest)" },
{ from: 6, label: "Worse 9 PM" },
],
},
{
name: "Arnica Montana",
sub: "(Leopard's Bane)",
nodes: [
{ label: "Trauma, Bruising\n& Mechanical Injury" },
{ label: "Bed Feels Too Hard;\nSore, Bruised\nSensation" },
{ label: "Says 'I am\nNot Sick'" },
{ label: "Fear of Being\nTouched" },
{ label: "Haemorrhage:\nBright Red Blood" },
{ label: "Overexertion;\nMuscle Soreness" },
{ label: "Head Hot;\nBody Cool" },
{ label: "Worse Touch,\nMotion, Rest" },
],
side: [
{ from: 1, label: "Post-Surgical\nRecovery" },
{ from: 4, label: "Cardiac\nWeakness after\nExertion" },
],
},
{
name: "Sulphur",
sub: "(Sublimed Sulphur)",
nodes: [
{ label: "Burning Sensations\n(palms, soles, vertex)" },
{ label: "Worse Heat, Bathing\n& Standing" },
{ label: "Great Itching &\nScratch-Till-Bleeds" },
{ label: "Dirty, Unhealthy\nSkin; Offensive Odour" },
{ label: "Hungry at 11 AM;\nDiarrhoea at 5 AM" },
{ label: "Philosophical;\nRagged Philosopher\nType" },
{ label: "Every Discharge\nExcoriating & Offensive" },
{ label: "Relapsing Cases;\nAntipsoric" },
],
side: [
{ from: 2, label: "Red Orifices\n(lips, ears, anus)" },
{ from: 5, label: "Skin Eruptions\nSuppressed" },
],
},
{
name: "Chamomilla",
sub: "(German Chamomile)",
nodes: [
{ label: "Extreme\nHyperaesthesia\n(oversensitivity to pain)" },
{ label: "Uncivil, Rude,\nImpatient" },
{ label: "Pain Unbearable;\nMakes Patient\nAngry" },
{ label: "Better by\nCarrying / Rocking" },
{ label: "One Cheek Red,\nOne Pale" },
{ label: "Teething\nComplaints in\nChildren" },
{ label: "Green, Watery,\nHot Diarrhoea\n('rotten egg' smell)" },
{ label: "Worse Night,\nHeat, Coffee" },
],
side: [
{ from: 3, label: "Earache &\nNeuralgia" },
{ from: 6, label: "Colic; Spasms\nin Infants" },
],
},
{
name: "Cocculus Indicus",
sub: "(Indian Cockle)",
nodes: [
{ label: "Motion Sickness\n(sea, car, train)" },
{ label: "Nausea from\nRiding & Sight\nof Food" },
{ label: "Vertigo with\nNausea & Vomiting" },
{ label: "Hollow Feeling\nin Head & Chest" },
{ label: "Time Passes\nToo Quickly\n(mental)" },
{ label: "Exhaustion from\nNursing / Loss\nof Sleep" },
{ label: "Trembling &\nWeakness of Limbs" },
{ label: "Worse Riding,\nLoss of Sleep,\nEmotions" },
],
side: [
{ from: 2, label: "Paralytic\nSymptoms" },
{ from: 5, label: "Spasms of\nOesophagus" },
],
},
{
name: "Aconite Napellus",
sub: "(Monkshood)",
nodes: [
{ label: "Sudden, Violent\nOnset of Disease" },
{ label: "Great Fear,\nAnxiety & Restlessness" },
{ label: "Predicts Time\nof Death" },
{ label: "High Fever with\nDry, Hot Skin\n(no sweat)" },
{ label: "Worse Cold\nDry Wind &\nMidnight" },
{ label: "Tingling &\nNumberness" },
{ label: "Thirst for\nCold Water" },
{ label: "Better Open Air;\nPerspiration" },
],
side: [
{ from: 1, label: "Shock after\nFright / Accident" },
{ from: 4, label: "Croup;\nLaryngitis\nat midnight" },
],
},
{
name: "Apis Mellifica",
sub: "(Honey Bee)",
nodes: [
{ label: "Oedema &\nPuffiness (face,\neyelids, extremities)" },
{ label: "Burning, Stinging\nPains" },
{ label: "Better Cold\nApplications" },
{ label: "Worse Heat,\nTouch & Pressure" },
{ label: "Thirstless\n(characteristic)" },
{ label: "Jealousy &\nBusy,\nRestless Nature" },
{ label: "Urinary Problems:\nScanty, Burning" },
{ label: "Anaphylactic-type\nReactions" },
],
side: [
{ from: 1, label: "Ovarian Cysts\n& Tumours" },
{ from: 5, label: "Serous\nMembrane\nInflammation" },
],
},
{
name: "Rhus Toxicodendron",
sub: "(Poison Ivy)",
nodes: [
{ label: "Worse Initial\nMotion; Better\nContinued Motion" },
{ label: "Restlessness;\nCannot Stay\nStill" },
{ label: "Red, Swollen,\nItching Skin\n(Herpetic)" },
{ label: "Stiffness after\nRest; 'Rusty Gate'\nSymptom" },
{ label: "Triangular Red\nTip of Tongue" },
{ label: "Better Warmth,\nHeat & Rubbing" },
{ label: "Worse Damp,\nCold & Night" },
{ label: "Ligament &\nTendon Strains" },
],
side: [
{ from: 2, label: "Typhoid-type\nFever" },
{ from: 5, label: "Vesicular\nEruptions" },
],
},
];
// ─────────────────────────────────────────────────────────────────────────────
// Helper: draw one flowchart slide
// ─────────────────────────────────────────────────────────────────────────────
function addRemedySlide(pres, remedy, pal, idx) {
const slide = pres.addSlide();
// ── Background
slide.background = { color: pal.bg };
// ── Decorative "notebook lines" (subtle horizontal lines)
for (let i = 0; i < 14; i++) {
slide.addShape(pres.ShapeType.line, {
x: 0, y: 0.55 + i * 0.5, w: 13.3, h: 0,
line: { color: pal.accent + "55", width: 0.5 },
});
}
// ── Red margin line (notebook style)
slide.addShape(pres.ShapeType.line, {
x: 0.75, y: 0, w: 0, h: 7.5,
line: { color: "FF9999", width: 1.2 },
});
// ── Title badge
slide.addShape(pres.ShapeType.roundRect, {
x: 0.5, y: 0.18, w: 12.3, h: 0.72,
fill: { color: pal.box },
line: { color: pal.arrow, width: 2 },
rectRadius: 0.15,
});
slide.addText(remedy.name + " " + remedy.sub, {
x: 0.5, y: 0.18, w: 12.3, h: 0.72,
fontFace: HW_FONT, fontSize: 28, bold: true,
color: "FFFFFF", align: "center", valign: "middle", margin: 0,
});
// ── Slide number (small, pencil-grey)
slide.addText(`${idx + 1} / ${REMEDIES.length}`, {
x: 12.2, y: 0.1, w: 0.9, h: 0.28,
fontFace: HW_FONT, fontSize: 12, color: "AAAAAA", align: "right",
});
// Layout: 8 main nodes in 2 columns × 4 rows
// Column A (left chain) col B (right chain)
// We draw them as a top-down flow in TWO columns to fit 8 nodes
const COL_A_X = 0.9;
const COL_B_X = 7.1;
const ROW_Y = [1.15, 2.2, 3.25, 4.3]; // 4 rows each column
const BOX_W = 5.5;
const BOX_H = 0.82;
const ARROW_H = 0.38; // gap between boxes = ROW_Y[n+1] - ROW_Y[n] - BOX_H
// Split 8 nodes: first 4 left, last 4 right
const leftNodes = remedy.nodes.slice(0, 4);
const rightNodes = remedy.nodes.slice(4, 8);
// draw column helper
function drawColumn(nodes, colX) {
nodes.forEach((node, i) => {
const y = ROW_Y[i];
// Drop shadow
slide.addShape(pres.ShapeType.roundRect, {
x: colX + 0.07, y: y + 0.07, w: BOX_W, h: BOX_H,
fill: { color: pal.accent + "66" },
line: { color: "FFFFFF00", width: 0 },
rectRadius: 0.18,
});
// Main box
slide.addShape(pres.ShapeType.roundRect, {
x: colX, y: y, w: BOX_W, h: BOX_H,
fill: { color: "FFFFFF" },
line: { color: pal.box, width: 2.2 },
rectRadius: 0.18,
});
// Label
slide.addText(node.label, {
x: colX + 0.12, y: y, w: BOX_W - 0.24, h: BOX_H,
fontFace: HW_FONT, fontSize: 17, color: pal.title,
align: "center", valign: "middle", margin: 0,
wrap: true,
});
// Arrow down (except last)
if (i < nodes.length - 1) {
const arrowY = y + BOX_H;
slide.addShape(pres.ShapeType.line, {
x: colX + BOX_W / 2, y: arrowY,
w: 0, h: ROW_Y[i + 1] - arrowY,
line: { color: pal.arrow, width: 2.2 },
});
// Arrowhead triangle
const headY = ROW_Y[i + 1] - 0.04;
const midX = colX + BOX_W / 2;
slide.addShape(pres.ShapeType.triangle, {
x: midX - 0.1, y: headY - 0.14, w: 0.2, h: 0.14,
fill: { color: pal.arrow },
line: { color: pal.arrow, width: 0 },
rotate: 180,
});
}
});
}
drawColumn(leftNodes, COL_A_X);
drawColumn(rightNodes, COL_B_X);
// Connecting arrow from bottom of left col to top of right col
// Draw a curved-ish path using a bent line
const connY1 = ROW_Y[3] + BOX_H / 2;
const connY2 = ROW_Y[0] + BOX_H / 2;
const connX1 = COL_A_X + BOX_W;
const connX2 = COL_B_X;
// horizontal line from left box end → midpoint
const midX = (connX1 + connX2) / 2;
// Draw as 3 segments: right → down/up → right
slide.addShape(pres.ShapeType.line, {
x: connX1, y: connY1, w: midX - connX1 + 0.02, h: 0,
line: { color: pal.arrow, width: 2 },
});
slide.addShape(pres.ShapeType.line, {
x: midX, y: connY2, w: 0, h: connY1 - connY2,
line: { color: pal.arrow, width: 2 },
});
slide.addShape(pres.ShapeType.line, {
x: midX, y: connY2, w: connX2 - midX, h: 0,
line: { color: pal.arrow, width: 2 },
});
// Arrowhead at connX2, connY2
slide.addShape(pres.ShapeType.triangle, {
x: connX2 - 0.14, y: connY2 - 0.1, w: 0.14, h: 0.2,
fill: { color: pal.arrow },
line: { color: pal.arrow, width: 0 },
rotate: 90,
});
// ── Side-branch callouts (up to 2)
const sideCallouts = remedy.side || [];
sideCallouts.forEach((sc, si) => {
// sc.from = index into remedy.nodes (0-based)
const fromIdx = sc.from;
const isLeft = fromIdx < 4;
const rowIdx = isLeft ? fromIdx : fromIdx - 4;
const colX = isLeft ? COL_A_X : COL_B_X;
const boxY = ROW_Y[rowIdx];
const centerY = boxY + BOX_H / 2;
// Side bubble: left side of left col, right side of right col
const bubbleW = 2.4;
const bubbleH = 0.72;
let bubbleX, lineFromX, lineToX;
if (isLeft) {
bubbleX = COL_A_X - bubbleW - 0.35;
lineFromX = COL_A_X;
lineToX = bubbleX + bubbleW;
} else {
bubbleX = COL_B_X + BOX_W + 0.35;
lineFromX = COL_B_X + BOX_W;
lineToX = bubbleX;
}
const bubbleY = centerY - bubbleH / 2;
// Dashed connector
slide.addShape(pres.ShapeType.line, {
x: Math.min(lineFromX, lineToX), y: centerY,
w: Math.abs(lineToX - lineFromX), h: 0,
line: { color: pal.box, width: 1.5, dashType: "dash" },
});
// Bubble
slide.addShape(pres.ShapeType.ellipse, {
x: bubbleX, y: bubbleY, w: bubbleW, h: bubbleH,
fill: { color: pal.accent + "BB" },
line: { color: pal.box, width: 1.8 },
});
slide.addText(sc.label, {
x: bubbleX, y: bubbleY, w: bubbleW, h: bubbleH,
fontFace: HW_FONT, fontSize: 13, color: pal.title,
align: "center", valign: "middle", margin: 0,
wrap: true,
});
});
// ── Decorative corner doodle (a small star/asterisk)
slide.addText("✦", {
x: 0.1, y: 0.05, w: 0.5, h: 0.4,
fontFace: HW_FONT, fontSize: 20, color: pal.box + "AA",
});
slide.addText("✦", {
x: 12.7, y: 7.0, w: 0.5, h: 0.4,
fontFace: HW_FONT, fontSize: 16, color: pal.accent,
});
}
// ─────────────────────────────────────────────────────────────────────────────
// Title slide
// ─────────────────────────────────────────────────────────────────────────────
function addTitleSlide(pres) {
const slide = pres.addSlide();
slide.background = { color: "1A1A2E" };
// Watercolour-style background blobs
const blobs = [
{ x: 0, y: 0, w: 5, h: 3.5, color: "16213E" },
{ x: 8, y: 4, w: 5.3, h: 3.5, color: "0F3460" },
{ x: 4, y: 2, w: 5.5, h: 3.5, color: "533483" + "88" },
];
blobs.forEach(b => {
slide.addShape(pres.ShapeType.ellipse, {
x: b.x, y: b.y, w: b.w, h: b.h,
fill: { color: b.color },
line: { color: "FFFFFF00", width: 0 },
});
});
slide.addText("Homeopathic Remedies", {
x: 1, y: 1.2, w: 11.3, h: 1.3,
fontFace: HW_FONT, fontSize: 52, bold: true,
color: "E8D5FF", align: "center", valign: "middle",
glow: { size: 8, opacity: 0.4, color: "C084FC" },
});
slide.addText("Characteristic Symptoms — Flowchart Guide", {
x: 1, y: 2.65, w: 11.3, h: 0.8,
fontFace: HW_FONT, fontSize: 26,
color: "A5C8FF", align: "center", valign: "middle",
});
const names = REMEDIES.map(r => r.name).join(" • ");
slide.addText(names, {
x: 0.5, y: 3.7, w: 12.3, h: 0.6,
fontFace: HW_FONT, fontSize: 17,
color: "CCAAFF", align: "center",
});
slide.addShape(pres.ShapeType.line, {
x: 2, y: 3.55, w: 9.3, h: 0,
line: { color: "7C3AED", width: 1.5 },
});
slide.addText("Hand-crafted Symptom Flowcharts", {
x: 1, y: 6.7, w: 11.3, h: 0.55,
fontFace: HW_FONT, fontSize: 18, italic: true,
color: "9999CC", align: "center",
});
}
// ─────────────────────────────────────────────────────────────────────────────
// BUILD
// ─────────────────────────────────────────────────────────────────────────────
addTitleSlide(pres);
REMEDIES.forEach((remedy, idx) => {
addRemedySlide(pres, remedy, PALETTES[idx], idx);
});
const outPath = "/home/daytona/workspace/homeo-remedies-ppt/Homeopathic_Remedies_Flowcharts.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("✓ Written:", outPath);
}).catch(e => {
console.error("Error:", e);
process.exit(1);
});
cd /home/daytona/workspace/homeo-remedies-ppt && node make_ppt.js 2>&1
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
~/homeo-remedies-ppt/make_ppt.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/homeo-remedies-ppt/make_ppt.js'
cd /home/daytona/workspace/homeo-remedies-ppt && node make_ppt.js 2>&1 | grep -v…
ls -lh /home/daytona/workspace/homeo-remedies-ppt/Homeopathic_Remedies_Flowchart…
Homeopathic Remedies Flowcharts
Presentation · PPTX
| Slide | Remedy | Pen Colour Theme |
|---|---|---|
| 1 | Title slide | Deep purple / indigo |
| 2 | Pulsatilla | Warm orange |
| 3 | Calcarea Carbonica | Sky blue |
| 4 | Bryonia Alba | Forest green |
| 5 | Arnica Montana | Golden amber |
| 6 | Sulphur | Violet / purple |
| 7 | Chamomilla | Crimson red |
| 8 | Cocculus Indicus | Indigo |
| 9 | Aconite Napellus | Teal |
| 10 | Apis Mellifica | Warm amber |
| 11 | Rhus Toxicodendron | Rose pink |
Make notes of flow charts of characteristics symptoms of medicine pulstatilla, calcarea carb, bryonia alba, arnica montana, sulphur, chamomilla, cocculus, aconite, apis malifica, rush tox, make sure all notess are looke like hand written and used different colours pen
python3 -c "import reportlab; print(reportlab.Version)" && python3 -c "from repo…
fc-list | grep -i "caveat\|Patrick\|Indie\|Shadows\|Schoolbell\|Permanent\|Rock …
# Download a free handwriting font mkdir -p /home/daytona/workspace/homeo-notes/…
~/homeo-notes/make_notes.py
"""
Handwritten-style flowchart notes for 10 Homeopathic Remedies
Each remedy gets one A4 page that looks like a hand-drawn notebook page.
"""
import math
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import mm
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
# ── Register handwriting fonts
pdfmetrics.registerFont(TTFont("Kalam", "/home/daytona/workspace/homeo-notes/fonts/Kalam-Regular.ttf"))
pdfmetrics.registerFont(TTFont("KalamBold", "/home/daytona/workspace/homeo-notes/fonts/Kalam-Bold.ttf"))
W, H = A4 # 595 x 842 pt
# ── Pen colour per remedy (R, G, B 0-1)
PENS = [
((0.85, 0.25, 0.05), (1.00, 0.92, 0.88)), # Pulsatilla – burnt orange / warm cream bg
((0.05, 0.38, 0.72), (0.90, 0.95, 1.00)), # Calcarea Carb – cobalt blue / light blue bg
((0.10, 0.52, 0.10), (0.92, 1.00, 0.92)), # Bryonia – forest green / mint bg
((0.65, 0.40, 0.00), (1.00, 0.97, 0.88)), # Arnica – golden brown / ivory bg
((0.52, 0.10, 0.72), (0.97, 0.92, 1.00)), # Sulphur – deep violet / lavender bg
((0.78, 0.08, 0.08), (1.00, 0.92, 0.92)), # Chamomilla – scarlet red / blush bg
((0.18, 0.30, 0.72), (0.90, 0.93, 1.00)), # Cocculus – indigo blue / pale blue bg
((0.00, 0.55, 0.55), (0.88, 1.00, 1.00)), # Aconite – teal / aqua bg
((0.60, 0.45, 0.00), (1.00, 0.98, 0.88)), # Apis – amber / yellow-cream bg
((0.78, 0.15, 0.42), (1.00, 0.92, 0.96)), # Rhus Tox – raspberry / rose bg
]
# ── Flowchart data: (name, sub_name, list_of_symptom_strings, list_of_side_notes)
# side_notes: (attach_to_index, text)
REMEDIES = [
(
"Pulsatilla", "(Windflower)",
[
"Mild, Yielding &\nTimid Temperament",
"Changeable Symptoms\n& Moods",
"Thirstless\n(even in fever)",
"Worse Warm Room\n& Heat",
"Better Open Air &\nCold Applications",
"Thick, Bland Yellow-\nGreen Discharges",
"Wandering Pains\n(move joint to joint)",
"Weeps Easily;\nDesires Sympathy",
],
[(1, "Hormonal\nDisturbances"), (4, "Rich/Fatty Food\nDisgests Poorly")],
),
(
"Calcarea Carbonica", "(Oyster Shell)",
[
"Fat, Fair, Flabby\nConstitution",
"Profuse Head Sweat\nat Night",
"Craves Eggs &\nIndigestible Things",
"Cold, Damp Hands\n& Feet",
"Slow Development\nin Children",
"Anxiety about\nHealth & Future",
"Glandular\nEnlargement",
"Worse Cold, Damp\n& Exertion",
],
[(2, "Teeth & Bone\nWeakness"), (5, "Milky\nLeucorhhoea")],
),
(
"Bryonia Alba", "(Wild Hops)",
[
"Worse from\nAny Motion",
"Better Absolute\nRest & Pressure",
"Great Thirst for\nLarge Cold Drinks",
"Dryness of all\nMucous Membranes",
"Stitching &\nBursting Pains",
"Irritable;\nWants to go Home",
"Serous Membrane\nInflammation",
"Constipation — Large\nDry Hard Stool",
],
[(3, "Dry Cough\n(holds chest)"), (5, "Worse 9 PM")],
),
(
"Arnica Montana", "(Leopard's Bane)",
[
"Trauma, Bruising &\nMechanical Injury",
"Bed Feels Too Hard;\nSore Bruised Sensation",
"Says 'I am NOT Sick'\n(denies illness)",
"Fear of Being\nTouched",
"Bright Red\nHaemorrhage",
"Muscle Soreness from\nOverexertion",
"Head Hot;\nBody Cool",
"Worse Touch,\nMotion & Rest",
],
[(1, "Post-Surgery\nRecovery"), (4, "Cardiac Weakness\nafter Exertion")],
),
(
"Sulphur", "(Sublimed Sulphur)",
[
"Burning Sensations\n(palms, soles, vertex)",
"Worse Heat,\nBathing & Standing",
"Great Itching;\nScratch Till Bleeding",
"Dirty, Unhealthy Skin;\nOffensive Odour",
"Hungry at 11 AM;\nDiarrhoea at 5 AM",
"Ragged Philosopher\nType (philosophical)",
"Every Discharge\nExcoriating & Offensive",
"Relapsing Cases;\nDeep Antipsoric",
],
[(1, "Red Orifices:\nlips, ears, anus"), (5, "Suppressed Skin\nEruptions → Deep Dis.")],
),
(
"Chamomilla", "(German Chamomile)",
[
"Extreme Hypersensitivity\nto Pain",
"Uncivil, Rude &\nImpatient",
"Pain Unbearable —\nMakes Patient Angry",
"Better by Carrying\nor Rocking",
"One Cheek Red,\nOne Cheek Pale",
"Teething Complaints\nin Children",
"Green Watery Hot\nDiarrhoea (rotten egg)",
"Worse Night, Heat\n& Coffee",
],
[(2, "Earache &\nNeuralgia"), (5, "Colic; Spasms\nin Infants")],
),
(
"Cocculus Indicus", "(Indian Cockle)",
[
"Motion Sickness\n(car, sea, train)",
"Nausea from Riding\n& Sight of Food",
"Vertigo with\nNausea & Vomiting",
"Hollow Feeling in\nHead & Chest",
"Time Passes Too\nQuickly (mental)",
"Exhaustion from\nNursing / Loss of Sleep",
"Trembling &\nWeakness of Limbs",
"Worse Riding, Sleep\nLoss & Emotions",
],
[(2, "Paralytic\nSymptoms"), (5, "Spasms of\nOesophagus")],
),
(
"Aconite Napellus", "(Monkshood)",
[
"Sudden, Violent\nOnset of Disease",
"Great Fear, Anxiety\n& Restlessness",
"Predicts Own\nTime of Death",
"High Fever with\nDry Hot Skin (no sweat)",
"Worse Cold Dry Wind\n& Midnight",
"Tingling &\nNumbness",
"Great Thirst\nfor Cold Water",
"Better Open Air;\nPerspiration",
],
[(1, "Shock after\nFright/Accident"), (4, "Croup; Laryngitis\nat Midnight")],
),
(
"Apis Mellifica", "(Honey Bee)",
[
"Oedema & Puffiness\n(face, eyelids, body)",
"Burning, Stinging\nPains",
"Better Cold\nApplications",
"Worse Heat,\nTouch & Pressure",
"Thirstless\n(characteristic feature)",
"Jealousy; Busy &\nRestless Nature",
"Urinary: Scanty\n& Burning",
"Anaphylactic-type\nReactions",
],
[(1, "Ovarian Cysts\n& Tumours"), (5, "Serous Membrane\nInflammation")],
),
(
"Rhus Toxicodendron", "(Poison Ivy)",
[
"Worse Initial Motion;\nBetter Continued Motion",
"Restlessness —\nCannot Stay Still",
"Red, Swollen, Itching\nSkin (herpetic)",
"Stiffness after Rest:\n'Rusty Gate' Symptom",
"Triangular Red\nTip of Tongue",
"Better Warmth,\nHeat & Rubbing",
"Worse Damp,\nCold & Night",
"Ligament & Tendon\nStrains",
],
[(1, "Typhoid-type\nFever"), (5, "Vesicular\nEruptions")],
),
]
# ─────────────────────────────────────────────────────────────────────────────
# Drawing helpers
# ─────────────────────────────────────────────────────────────────────────────
def draw_notebook_bg(c, pen_rgb, bg_rgb):
"""Fill page with cream bg, faint ruled lines, red margin line."""
c.setFillColorRGB(*bg_rgb)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Ruled lines
c.setStrokeColorRGB(0.75, 0.82, 0.95)
c.setLineWidth(0.4)
y = H - 55*mm
while y > 18*mm:
c.line(0, y, W, y)
y -= 8*mm
# Red margin
c.setStrokeColorRGB(0.88, 0.35, 0.35)
c.setLineWidth(1.0)
c.line(22*mm, 0, 22*mm, H)
# Spiral holes (left side decoration)
c.setFillColorRGB(0.80, 0.80, 0.80)
for yh in [H*0.2, H*0.5, H*0.8]:
c.circle(10*mm, yh, 3.5*mm, fill=1, stroke=0)
c.setFillColorRGB(*bg_rgb)
c.circle(10*mm, yh, 2.5*mm, fill=1, stroke=0)
c.setFillColorRGB(0.80, 0.80, 0.80)
def wrap_text_lines(text, max_chars=22):
"""Split on existing newlines; result already split."""
return text.split("\n")
def draw_flowbox(c, x, y, w, h, text, pen_rgb, bg_rgb, font_size=9.5):
"""Draw a rounded rectangle box with handwritten text."""
# Shadow
sr, sg, sb = [max(0, v - 0.25) for v in pen_rgb]
c.setFillColorRGB(sr, sg, sb, 0.18)
c.roundRect(x+1.5, y-1.5, w, h, 4*mm, fill=1, stroke=0)
# Box fill
c.setFillColorRGB(1, 1, 1)
c.roundRect(x, y, w, h, 4*mm, fill=1, stroke=0)
# Box border
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(1.8)
c.roundRect(x, y, w, h, 4*mm, fill=0, stroke=1)
# Text
lines = wrap_text_lines(text)
c.setFillColorRGB(*pen_rgb)
c.setFont("KalamBold", font_size)
total_text_h = len(lines) * (font_size + 2)
start_y = y + h/2 + total_text_h/2 - font_size
for i, line in enumerate(lines):
tw = c.stringWidth(line, "KalamBold", font_size)
c.drawString(x + (w - tw)/2, start_y - i*(font_size+2), line)
def draw_arrow_down(c, x, y_top, y_bot, pen_rgb):
"""Draw a downward arrow from y_top to y_bot at centre x."""
c.setStrokeColorRGB(*pen_rgb)
c.setFillColorRGB(*pen_rgb)
c.setLineWidth(1.8)
c.line(x, y_top, x, y_bot + 4)
# Arrowhead
head_size = 4
p = c.beginPath()
p.moveTo(x, y_bot)
p.lineTo(x - head_size, y_bot + head_size*1.8)
p.lineTo(x + head_size, y_bot + head_size*1.8)
p.close()
c.drawPath(p, fill=1, stroke=0)
def draw_side_bubble(c, attach_x, attach_y, side, text, pen_rgb, accent_rgb):
"""Draw an oval callout bubble to the left or right of a box."""
bw = 34*mm
bh = 14*mm
if side == "left":
bx = attach_x - bw - 8*mm
else:
bx = attach_x + 8*mm
by = attach_y - bh/2
# Dashed connector line
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(1.2)
c.setDash([3, 3], 0)
if side == "left":
c.line(attach_x, attach_y, bx + bw, attach_y)
else:
c.line(attach_x, attach_y, bx, attach_y)
c.setDash([], 0)
# Oval fill
c.setFillColorRGB(*accent_rgb)
c.ellipse(bx, by, bx+bw, by+bh, fill=1, stroke=0)
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(1.5)
c.ellipse(bx, by, bx+bw, by+bh, fill=0, stroke=1)
# Text
lines = text.split("\n")
fs = 8.5
c.setFillColorRGB(*pen_rgb)
c.setFont("KalamBold", fs)
total_h = len(lines) * (fs + 1.5)
sy = attach_y + total_h/2 - fs
for i, ln in enumerate(lines):
tw = c.stringWidth(ln, "KalamBold", fs)
c.drawString(bx + (bw - tw)/2, sy - i*(fs+1.5), ln)
def draw_curved_connector(c, x1, y1, x2, y2, pen_rgb):
"""Draw an S-curve connecting bottom-left column to top-right column."""
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(1.8)
c.setDash([], 0)
mx = (x1 + x2) / 2
p = c.beginPath()
p.moveTo(x1, y1)
p.curveTo(mx, y1, mx, y2, x2, y2)
c.drawPath(p, fill=0, stroke=1)
# Arrowhead at x2, y2
c.setFillColorRGB(*pen_rgb)
head = 4
ap = c.beginPath()
ap.moveTo(x2, y2)
ap.lineTo(x2 - head, y2 + head*1.8)
ap.lineTo(x2 + head, y2 + head*1.8)
ap.close()
c.drawPath(ap, fill=1, stroke=0)
# ─────────────────────────────────────────────────────────────────────────────
# Page builder
# ─────────────────────────────────────────────────────────────────────────────
def make_accent(pen_rgb, strength=0.55):
"""Lighter tinted version of pen colour for bubble fill."""
return tuple(1 - (1 - v) * strength for v in pen_rgb)
def draw_remedy_page(c, name, sub, nodes, sides, pen_rgb, bg_rgb, page_num, total):
c.setPageSize(A4)
draw_notebook_bg(c, pen_rgb, bg_rgb)
accent = make_accent(pen_rgb, 0.35)
# ── Title area
c.setFillColorRGB(*pen_rgb)
c.setFont("KalamBold", 22)
c.drawString(26*mm, H - 20*mm, name)
c.setFont("Kalam", 13)
tw_sub = c.stringWidth(sub, "Kalam", 13)
name_w = c.stringWidth(name, "KalamBold", 22)
c.drawString(26*mm + name_w + 4*mm, H - 19.5*mm, sub)
# Underline title
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(1.8)
c.line(26*mm, H - 22*mm, 26*mm + name_w + tw_sub + 10*mm, H - 22*mm)
# Page number
c.setFont("Kalam", 10)
c.setFillColorRGB(0.55, 0.55, 0.55)
c.drawRightString(W - 10*mm, H - 18*mm, f"{page_num}/{total}")
# Decorative star / doodle top right
c.setFont("KalamBold", 18)
c.setFillColorRGB(*pen_rgb)
c.drawString(W - 22*mm, H - 22*mm, "✦")
# ── Flowchart layout
# A4: 595 x 842 pt (1mm = 2.835pt)
# Two columns of 4 boxes each
# Boxes: width ~108pt, height ~44pt, gap 10pt
BOX_W = 108
BOX_H = 44
GAP = 14 # vertical gap between boxes (for arrow)
COL_A_X = 26*mm # left column x
COL_B_X = W/2 + 10*mm # right column x
TOP_Y = H - 38*mm # top of first box
left_nodes = nodes[:4]
right_nodes = nodes[4:]
def column_y(row):
"""Bottom-left corner y of box at row (0-indexed)"""
return TOP_Y - row * (BOX_H + GAP) - BOX_H
# Draw columns
for col_idx, (col_x, col_nodes) in enumerate([(COL_A_X, left_nodes), (COL_B_X, right_nodes)]):
for row, node_text in enumerate(col_nodes):
bx = col_x
by = column_y(row)
draw_flowbox(c, bx, by, BOX_W, BOX_H, node_text, pen_rgb, bg_rgb)
# Arrow down (not after last)
if row < len(col_nodes) - 1:
cx = bx + BOX_W/2
draw_arrow_down(c, cx, by, column_y(row+1) + BOX_H, pen_rgb)
# Curved connector: bottom of left col → top of right col
x_left = COL_A_X + BOX_W
y_left = column_y(3) + BOX_H/2 # mid-height of last left box
x_right = COL_B_X
y_right = column_y(0) + BOX_H/2 # mid-height of first right box
draw_curved_connector(c, x_left, y_left, x_right, y_right, pen_rgb)
# ── Side callout bubbles
for (attach_idx, bubble_text) in sides:
is_left = attach_idx < 4
col_x = COL_A_X if is_left else COL_B_X
row = attach_idx if is_left else attach_idx - 4
by = column_y(row)
mid_y = by + BOX_H/2
if is_left:
attach_x = col_x
side = "left"
else:
attach_x = col_x + BOX_W
side = "right"
draw_side_bubble(c, attach_x, mid_y, side, bubble_text, pen_rgb, accent)
# ── Legend strip at bottom
c.setFillColorRGB(*pen_rgb)
c.setFont("Kalam", 8)
legend = "Symptoms flow top→down • Dashed lines = associated/secondary symptoms • Oval = side effects/variants"
lw = c.stringWidth(legend, "Kalam", 8)
c.drawString((W - lw)/2, 10*mm, legend)
# Small underline
c.setStrokeColorRGB(*pen_rgb)
c.setLineWidth(0.5)
c.line((W - lw)/2, 9.2*mm, (W + lw)/2, 9.2*mm)
# ─────────────────────────────────────────────────────────────────────────────
# Cover page
# ─────────────────────────────────────────────────────────────────────────────
def draw_cover(c):
c.setPageSize(A4)
# Dark notebook bg
c.setFillColorRGB(0.10, 0.10, 0.20)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Grid dots
c.setFillColorRGB(0.25, 0.25, 0.45)
for xi in range(int(W//14)):
for yi in range(int(H//14)):
c.circle(xi*14 + 7, yi*14 + 7, 0.8, fill=1, stroke=0)
# Colour stripe bar (10 pen colours)
stripe_w = W / 10
for i, (pen, _) in enumerate(PENS):
c.setFillColorRGB(*pen)
c.rect(i * stripe_w, H - 12*mm, stripe_w, 12*mm, fill=1, stroke=0)
# Title
c.setFillColorRGB(0.95, 0.88, 1.0)
c.setFont("KalamBold", 30)
title = "Homeopathic Remedies"
c.drawCentredString(W/2, H - 38*mm, title)
c.setFillColorRGB(0.75, 0.90, 1.0)
c.setFont("KalamBold", 18)
c.drawCentredString(W/2, H - 50*mm, "Characteristic Symptoms — Flowchart Notes")
# Divider
c.setStrokeColorRGB(0.55, 0.35, 0.90)
c.setLineWidth(2)
c.line(30*mm, H - 54*mm, W - 30*mm, H - 54*mm)
# Remedy list with colour dots
remedy_names = [r[0] for r in REMEDIES]
c.setFont("Kalam", 13)
col_w = W / 2
for i, rname in enumerate(remedy_names):
col = i % 2
row = i // 2
rx = col * col_w + 35*mm
ry = H - 68*mm - row * 14*mm
pen_c = PENS[i][0]
c.setFillColorRGB(*pen_c)
c.circle(rx - 5*mm, ry + 3, 3, fill=1, stroke=0)
c.drawString(rx, ry, rname)
# Footer note
c.setFillColorRGB(0.60, 0.60, 0.80)
c.setFont("Kalam", 10)
c.drawCentredString(W/2, 22*mm, "Hand-drawn style notes • Each remedy on its own colour-coded page")
c.drawCentredString(W/2, 14*mm, "For educational reference only")
c.showPage()
# ─────────────────────────────────────────────────────────────────────────────
# MAIN
# ─────────────────────────────────────────────────────────────────────────────
OUT = "/home/daytona/workspace/homeo-notes/Homeopathic_Remedies_Notes.pdf"
c = canvas.Canvas(OUT, pagesize=A4)
c.setTitle("Homeopathic Remedies - Characteristic Symptoms Flowchart Notes")
c.setAuthor("Handwritten Notes")
draw_cover(c)
total_pages = len(REMEDIES)
for idx, (name, sub, nodes, sides) in enumerate(REMEDIES):
pen_rgb, bg_rgb = PENS[idx]
draw_remedy_page(c, name, sub, nodes, sides, pen_rgb, bg_rgb, idx+1, total_pages)
c.showPage()
c.save()
print(f"✓ Saved: {OUT}")
cd /home/daytona/workspace/homeo-notes && python3 make_notes.py 2>&1
ls -lh /home/daytona/workspace/homeo-notes/Homeopathic_Remedies_Notes.pdf
Homeopathic Remedies Notes
PDF Document · PDF
| Page | Remedy | Pen Colour |
|---|---|---|
| Cover | All 10 remedies listed | Dark notebook with rainbow stripe |
| 1 | Pulsatilla | Burnt orange |
| 2 | Calcarea Carbonica | Cobalt blue |
| 3 | Bryonia Alba | Forest green |
| 4 | Arnica Montana | Golden brown |
| 5 | Sulphur | Deep violet |
| 6 | Chamomilla | Scarlet red |
| 7 | Cocculus Indicus | Indigo blue |
| 8 | Aconite Napellus | Teal |
| 9 | Apis Mellifica | Amber |
| 10 | Rhus Toxicodendron | Raspberry rose |