Provide a short flashcard topics of antifungal drugs

Reading File
Running Command

python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/8d546623-6126-4b68-b131-dbee119f684e/ANTIFUNGAL DRUGS.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() if text: print(f'--- PAGE {i+1} ---') print(text[:2000]) "

Running Command

python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/8d546623-6126-4b68-b131-dbee119f684e/ANTIFUNGAL DRUGS.pdf') as pdf: all_text = [] for i, page in enumerate(pdf.pages): text = page.extract_text() if text: all_text.append(f'--- PAGE {i+1} ---\n{text}') full = '\n'.join(all_text) print(full[:8000]) "

Running Command

python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/8d546623-6126-4b68-b131-dbee119f684e/ANTIFUNGAL DRUGS.pdf') as pdf: page = pdf.pages[0] print('Words:', page.extract_words()[:20]) print('Text:', repr(page.extract_text())) # Try chars chars = page.chars print('Chars count:', len(chars)) if chars: print('First char:', chars[0]) "

Running Command

python3 -c " import subprocess # Convert first few pages to images and run OCR result = subprocess.run(['pdftoppm', '-r', '150', '-l', '10', '/home/daytona/workspace/attachments/8d546623-6126-4b68-b131-dbee119f684e/ANTIFUNGAL DRUGS.pdf', '/tmp/antifungal_page'], capture_output=True, text=True) print('stdout:', result.stdout) print('stderr:', result.stderr) print('returncode:', result.returncode) import os files = sorted([f for f in os.listdir('/tmp') if f.startswith('antifungal_page')]) print('Generated files:', files[:15]) "

Running Command

python3 -c " import subprocess, os # Run OCR on first 10 pages for i in range(1, 11): fname = f'/tmp/antifungal_page-{i:02d}.ppm' out = f'/tmp/antifungal_ocr_{i:02d}' subprocess.run(['tesseract', fname, out, '-l', 'eng'], capture_output=True) # Read OCR results for i in range(1, 11): fname = f'/tmp/antifungal_ocr_{i:02d}.txt' if os.path.exists(fname): with open(fname) as f: content = f.read().strip() if content: print(f'=== PAGE {i} ===') print(content[:600]) print() "

Running Command

# Convert and OCR remaining pages 11-56 python3 -c " import subprocess, os result = subprocess.run(['pdftoppm', '-r', '150', '-f', '11', '-l', '56', '/home/daytona/workspace/attachments/8d546623-6126-4b68-b131-dbee119f684e/ANTIFUNGAL DRUGS.pdf', '/tmp/antifungal_page'], capture_output=True, text=True) print('returncode:', result.returncode) files = sorted([f for f in os.listdir('/tmp') if f.startswith('antifungal_page')]) print('Total files:', len(files)) "

Running Command

python3 -c " import subprocess, os # OCR pages 11-56 for i in range(11, 57): fname = f'/tmp/antifungal_page-{i:02d}.ppm' out = f'/tmp/antifungal_ocr_{i:02d}' if os.path.exists(fname) and not os.path.exists(out + '.txt'): subprocess.run(['tesseract', fname, out, '-l', 'eng'], capture_output=True) # Print all OCR text all_text = [] for i in range(1, 57): fname = f'/tmp/antifungal_ocr_{i:02d}.txt' if os.path.exists(fname): with open(fname) as f: content = f.read().strip() if content: all_text.append(f'=== PAGE {i} ===\n{content}') print('\n\n'.join(all_text)) " 2>/dev/null

Reading File
Running Command

ls /home/daytona/workspace/

Running Command

mkdir -p /home/daytona/workspace/antifungal-flashcards && ls /home/daytona/workspace/antifungal-flashcards

Writing File

~/antifungal-flashcards/flashcards.js

const PptxGenJS = require("/home/daytona/skills/pptx/node_modules/pptxgenjs");

const pptx = new PptxGenJS();
pptx.layout = "LAYOUT_WIDE"; // 13.33 x 7.5 inches

// Color palette - deep teal/navy theme
const BG_DARK = "0D2137";
const BG_CARD = "0A3D62";
const ACCENT = "00B4D8";
const ACCENT2 = "48CAE4";
const WHITE = "FFFFFF";
const LIGHT_GRAY = "E0F2F7";
const YELLOW = "FFD166";
const RED = "EF476F";
const GREEN = "06D6A0";
const ORANGE = "F4A261";

// Flashcard data
const flashcards = [
  {
    title: "Antifungal Drug Classification",
    front: "What are the 4 main classes of antifungal drugs?",
    back: [
      "1. Polyenes — Amphotericin B, Nystatin",
      "2. Azoles — Imidazoles (Ketoconazole, Miconazole, Clotrimazole) & Triazoles (Itraconazole, Fluconazole, Voriconazole)",
      "3. Allylamines — Terbinafine, Naftifine",
      "4. Others — Flucytosine (5-FC), Griseofulvin, Echinocandins"
    ],
    tag: "Classification",
    tagColor: ACCENT
  },
  {
    title: "Polyenes – Mechanism of Action",
    front: "How do Polyenes (Amphotericin B, Nystatin) kill fungi?",
    back: [
      "• Bind to ergosterol in the fungal cell membrane",
      "• Form pores → unregulated ion channels",
      "• Leakage of ions and metabolites → cell death",
      "• Selectivity: bind ergosterol > cholesterol",
      "• However selectivity is POOR → significant toxicity"
    ],
    tag: "Mechanism",
    tagColor: GREEN
  },
  {
    title: "Amphotericin B – Pharmacokinetics",
    front: "Key PK features of Amphotericin B?",
    back: [
      "• Nearly insoluble in water → given as colloidal suspension",
      "• IV route for systemic infections (Fungizone + sodium desoxycholate)",
      "• Oral → poorly absorbed (used only for intestinal Candida)",
      "• Elimination: via kidneys, t½ = 15 days",
      "• Renal insufficiency does NOT significantly affect half-life",
      "• Liposomal forms: AmBisome, Amphotec, Abelcet (less toxic)"
    ],
    tag: "Pharmacokinetics",
    tagColor: ACCENT2
  },
  {
    title: "Amphotericin B – Clinical Uses",
    front: "What infections is Amphotericin B used for?",
    back: [
      "Drug of choice for most SYSTEMIC fungal infections:",
      "• Systemic Candidiasis, Cryptococcus neoformans",
      "• Histoplasma capsulatum, Blastomyces dermatitidis",
      "• Aspergillus fumigatus, Mucor",
      "Also used: topical ointments, intrathecal (fungal meningitis),",
      "fungal arthritis, Candiduria"
    ],
    tag: "Clinical Uses",
    tagColor: YELLOW
  },
  {
    title: "Amphotericin B – Adverse Effects",
    front: "What are the adverse effects of Amphotericin B?",
    back: [
      "Infusion-related (ACUTE): Fever, chills, muscle spasm, nausea/vomiting, headache, hypotension → Slow infusion + premedication",
      "Slow (CHRONIC) toxicity:",
      "• Renal damage (most significant!): prerenal failure (reversible) + tubular injury (irreversible)",
      "• K⁺ and Mg²⁺ loss, tubular acidosis → give normal saline",
      "• Liver dysfunction",
      "• ↓ Erythropoietin → anemia"
    ],
    tag: "Adverse Effects",
    tagColor: RED
  },
  {
    title: "Resistance to Amphotericin B",
    front: "How do fungi develop resistance to Amphotericin B?",
    back: [
      "Resistance occurs when ergosterol binding is impaired:",
      "• Decreasing membrane concentration of ergosterol",
      "• Modifying the sterol target molecule → reduced drug affinity"
    ],
    tag: "Resistance",
    tagColor: ORANGE
  },
  {
    title: "Flucytosine (5-FC) – Mechanism & PK",
    front: "Mechanism, PK, and uses of Flucytosine?",
    back: [
      "MOA: Converted by fungal cytosine deaminase → 5-fluorouracil",
      "→ Blocks thymidylate synthetase → ↓ RNA & DNA synthesis",
      "Selective toxicity: mammalian cells LACK cytosine deaminase",
      "PK: Well absorbed orally; eliminated via kidneys",
      "(renal failure ↑ plasma t½ significantly)",
      "Use: Combined with Amphotericin B for Cryptococcus & Candida",
      "ADR: Bone marrow depression (leukopenia, thrombocytopenia), GI distress, hepatotoxicity"
    ],
    tag: "Antimetabolite",
    tagColor: GREEN
  },
  {
    title: "Azoles – Mechanism of Action",
    front: "How do Azole antifungals work?",
    back: [
      "Inhibit fungal cytochrome P450 enzyme",
      "→ Block ergosterol synthesis",
      "→ ↑ Cell membrane permeability → fungal cell death",
      "Two subgroups:",
      "• Imidazoles (older): Ketoconazole, Miconazole, Clotrimazole",
      "• Triazoles (newer, better): Itraconazole, Fluconazole, Voriconazole",
      "General ADR: minor GI reactions, liver enzyme abnormalities"
    ],
    tag: "Mechanism",
    tagColor: GREEN
  },
  {
    title: "Ketoconazole",
    front: "Key features of Ketoconazole?",
    back: [
      "• Oral, t½ = 12 hr; metabolized by liver (urine excretion)",
      "• Use: systemic + mucocutaneous fungal infections; Candida prophylaxis in immunosuppressed",
      "• ADR: Nausea, GI distress, pruritus; FATAL hepatotoxicity (stop if hepatitis occurs)",
      "• Also inhibits HUMAN steroid synthesis (P450) →",
      "  – Gynecomastia in males",
      "  – Menstrual irregularities in females",
      "  – ↓ Cortisol → used for Cushing's disease",
      "• Now fallen out of use in USA (dermatology only)"
    ],
    tag: "Imidazole",
    tagColor: ACCENT
  },
  {
    title: "Triazoles Comparison",
    front: "Compare Itraconazole, Fluconazole, and Voriconazole",
    back: [
      "Itraconazole (oral/IV): Wider spectrum than ketoconazole; choice for Histoplasma, Blastomyces, Sporothrix; treats onychomycosis; poor CNS penetration",
      "Fluconazole (oral/IV): Highly water soluble; excellent CNS penetration; least drug interactions; useful for Cryptococcal meningitis & Candidemia; NO activity vs Aspergillus",
      "Voriconazole (oral/IV): Newest triazole; 90% oral bioavailability; BEST against Aspergillosis; ADR: rash, elevated hepatic enzymes, transient visual disturbance"
    ],
    tag: "Triazoles",
    tagColor: ACCENT2
  },
  {
    title: "Echinocandins",
    front: "What are Echinocandins and how do they work?",
    back: [
      "• Newest class of antifungal agents",
      "• Drug: Caspofungin (IV only)",
      "• MOA: Bind to fungal CELL WALL → Inhibit β-glucan synthesis → Disruption of cell wall → cell death",
      "• (Unique: target is cell WALL not membrane)",
      "• Well tolerated",
      "• Use: Invasive aspergillosis that failed Amphotericin B"
    ],
    tag: "Echinocandins",
    tagColor: YELLOW
  },
  {
    title: "Griseofulvin",
    front: "Mechanism, uses, and ADR of Griseofulvin?",
    back: [
      "MOA: Binds to newly forming keratin → concentrates in keratinized skin/hair/nails → protects from fungal invasion",
      "Selective toxicity: lacks active transport into mammalian cells",
      "PK: ~50% oral absorption (↑ with fatty meal); metabolized by liver to glucuronide",
      "Use: Dermatophytes (Trichophyton, Epidermophyton, Microsporum) causing Tinea (ringworm); 2-6 wks (skin/hair); months (nails)",
      "ADR: Headache (common initially), mental confusion, GI distress",
      "NOTE: Largely replaced by Itraconazole or Terbinafine"
    ],
    tag: "Natural Product",
    tagColor: GREEN
  },
  {
    title: "Terbinafine (Lamisil)",
    front: "What is the mechanism and use of Terbinafine?",
    back: [
      "• Class: Synthetic Allylamine — oral",
      "• MOA: Inhibits squalene epoxidase → blocks ergosterol synthesis",
      "• Keratophilic + Fungicidal",
      "• Use: Dermatophytes, onychomycosis (drug of choice)",
      "• ADR: GI upset, headache",
      "(Also: Naftifine — topical allylamine, same MOA)"
    ],
    tag: "Allylamine",
    tagColor: ORANGE
  },
  {
    title: "Topical Antifungals",
    front: "What topical antifungals are available and for what?",
    back: [
      "Nystatin: Topical (cream/ointment/suppository) for Candida; too toxic for parenteral; oral prep for GI Candida",
      "Miconazole: Topical for dermatophytes & vaginal Candida; long t½ (24hr)",
      "Clotrimazole: Topical for cutaneous & vaginal infections",
      "Econazole: Topical only",
      "Naftifine: Broad-spectrum fungicidal allylamine; inhibits squalene epoxidase; faster onset than imidazoles",
      "Undecylenic acid: Fatty acid for Tinea pedis (athlete's foot)",
      "Tolnaftate: Synthetic; superficial dermatophyte infections"
    ],
    tag: "Topical",
    tagColor: ACCENT
  },
  {
    title: "Drugs of Choice – Quick Reference",
    front: "Match the infection to the drug of choice",
    back: [
      "Systemic Candida: Amphotericin B (± Flucytosine)",
      "Cryptococcus neoformans (meningitis): Fluconazole",
      "Aspergillus / Mucor: Amphotericin B",
      "Coccidioides immitis: Fluconazole → Ketoconazole",
      "Blastomyces / Histoplasma: Itraconazole → Ketoconazole",
      "Superficial Candida: Miconazole or Clotrimazole (topical)",
      "Dermatophytes (superficial): Miconazole / Clotrimazole → Griseofulvin",
      "Onychomycosis: Terbinafine or Itraconazole",
      "Pneumocystis carinii: TMP-SMX → Pentamidine"
    ],
    tag: "Drug of Choice",
    tagColor: RED
  }
];

// --- Helper functions ---
function addCard(slide, cardData, cardIndex) {
  // Background
  slide.addShape(pptx.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: "100%",
    fill: { color: BG_DARK }
  });

  // Top accent bar
  slide.addShape(pptx.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 0.08,
    fill: { color: ACCENT }
  });

  // Card number (top left)
  slide.addText(`${cardIndex + 1} / ${flashcards.length}`, {
    x: 0.3, y: 0.12, w: 1.5, h: 0.3,
    fontSize: 11, color: ACCENT, bold: false, fontFace: "Calibri"
  });

  // Tag badge (top right)
  slide.addShape(pptx.ShapeType.roundRect, {
    x: 10.5, y: 0.1, w: 2.5, h: 0.35,
    fill: { color: cardData.tagColor },
    line: { color: cardData.tagColor },
    rectRadius: 0.08
  });
  slide.addText(cardData.tag, {
    x: 10.5, y: 0.1, w: 2.5, h: 0.35,
    fontSize: 11, color: BG_DARK, bold: true, align: "center", fontFace: "Calibri"
  });

  // Title
  slide.addText(cardData.title, {
    x: 0.3, y: 0.5, w: 12.7, h: 0.55,
    fontSize: 22, color: WHITE, bold: true, fontFace: "Calibri",
    align: "left"
  });

  // Divider line
  slide.addShape(pptx.ShapeType.line, {
    x: 0.3, y: 1.1, w: 12.7, h: 0,
    line: { color: ACCENT, width: 1.5 }
  });

  // FRONT panel (left)
  slide.addShape(pptx.ShapeType.roundRect, {
    x: 0.25, y: 1.25, w: 4.0, h: 5.8,
    fill: { color: "0E2D45" },
    line: { color: ACCENT, width: 1 },
    rectRadius: 0.12
  });
  slide.addText("❓ QUESTION", {
    x: 0.35, y: 1.35, w: 3.8, h: 0.35,
    fontSize: 11, color: ACCENT, bold: true, fontFace: "Calibri", align: "center"
  });
  slide.addShape(pptx.ShapeType.line, {
    x: 0.35, y: 1.72, w: 3.8, h: 0,
    line: { color: ACCENT, width: 0.5 }
  });
  slide.addText(cardData.front, {
    x: 0.35, y: 1.82, w: 3.8, h: 5.0,
    fontSize: 15, color: WHITE, bold: false, fontFace: "Calibri",
    align: "center", valign: "middle", wrap: true
  });

  // Arrow between panels
  slide.addText("➜", {
    x: 4.35, y: 3.8, w: 0.6, h: 0.5,
    fontSize: 22, color: ACCENT2, align: "center"
  });

  // BACK panel (right)
  slide.addShape(pptx.ShapeType.roundRect, {
    x: 5.05, y: 1.25, w: 7.95, h: 5.8,
    fill: { color: BG_CARD },
    line: { color: ACCENT2, width: 1 },
    rectRadius: 0.12
  });
  slide.addText("✅ ANSWER", {
    x: 5.15, y: 1.35, w: 7.75, h: 0.35,
    fontSize: 11, color: ACCENT2, bold: true, fontFace: "Calibri", align: "center"
  });
  slide.addShape(pptx.ShapeType.line, {
    x: 5.15, y: 1.72, w: 7.75, h: 0,
    line: { color: ACCENT2, width: 0.5 }
  });

  const backText = cardData.back.join("\n");
  slide.addText(backText, {
    x: 5.2, y: 1.82, w: 7.65, h: 5.0,
    fontSize: 13, color: LIGHT_GRAY, bold: false, fontFace: "Calibri",
    align: "left", valign: "top", wrap: true
  });

  // Bottom bar
  slide.addShape(pptx.ShapeType.rect, {
    x: 0, y: 7.42, w: "100%", h: 0.08,
    fill: { color: ACCENT }
  });
}

// Title slide
const titleSlide = pptx.addSlide();
titleSlide.addShape(pptx.ShapeType.rect, {
  x: 0, y: 0, w: "100%", h: "100%",
  fill: { color: BG_DARK }
});
// Top accent
titleSlide.addShape(pptx.ShapeType.rect, {
  x: 0, y: 0, w: "100%", h: 0.1,
  fill: { color: ACCENT }
});
// Big icon area
titleSlide.addShape(pptx.ShapeType.roundRect, {
  x: 5.4, y: 1.2, w: 2.5, h: 2.5,
  fill: { color: BG_CARD },
  line: { color: ACCENT, width: 2 },
  rectRadius: 0.3
});
titleSlide.addText("💊", {
  x: 5.4, y: 1.4, w: 2.5, h: 2.1,
  fontSize: 72, align: "center", valign: "middle"
});
titleSlide.addText("ANTIFUNGAL DRUGS", {
  x: 1, y: 3.9, w: 11.33, h: 0.85,
  fontSize: 40, color: WHITE, bold: true, fontFace: "Calibri", align: "center"
});
titleSlide.addText("Flashcard Study Set", {
  x: 1, y: 4.75, w: 11.33, h: 0.45,
  fontSize: 22, color: ACCENT2, bold: false, fontFace: "Calibri", align: "center"
});
titleSlide.addText(`${flashcards.length} Cards  |  Classification • Mechanisms • Clinical Uses • Adverse Effects`, {
  x: 1, y: 5.3, w: 11.33, h: 0.4,
  fontSize: 14, color: LIGHT_GRAY, bold: false, fontFace: "Calibri", align: "center"
});
titleSlide.addShape(pptx.ShapeType.rect, {
  x: 0, y: 7.42, w: "100%", h: 0.08,
  fill: { color: ACCENT }
});

// Add flashcard slides
flashcards.forEach((card, i) => {
  const slide = pptx.addSlide();
  addCard(slide, card, i);
});

// Save
pptx.writeFile({ fileName: "/home/daytona/workspace/antifungal-flashcards/Antifungal_Drugs_Flashcards.pptx" })
  .then(() => console.log("DONE: Antifungal_Drugs_Flashcards.pptx saved"))
  .catch(err => { console.error(err); process.exit(1); });
Running Command

cd /home/daytona/workspace/antifungal-flashcards && node flashcards.js

Running Command

find /home/daytona/skills -name "pptxgenjs" -type d 2>/dev/null | head -5; ls /home/daytona/skills/pptx/

Reading File
Running Command

node -e "require('pptxgenjs'); console.log('OK')" 2>&1

Editing File

~/antifungal-flashcards/flashcards.js

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

cd /home/daytona/workspace/antifungal-flashcards && node flashcards.js

Your flashcard deck is ready! Here's a summary of all 15 flashcards built from your PDF:

Antifungal Drugs - Flashcard Topics

#TopicKey Content
1Drug Classification4 classes: Polyenes, Azoles, Allylamines, Others
2Polyenes - MechanismBind ergosterol → form pores → cell death
3Amphotericin B - PKIV formulations, t½ = 15 days, liposomal forms
4Amphotericin B - Clinical UsesSystemic Candida, Cryptococcus, Aspergillus, Mucor, Histoplasma, Blastomyces
5Amphotericin B - Adverse EffectsInfusion reactions + renal damage (most significant), anemia
6Resistance to Amphotericin BDecreased/modified ergosterol target
7Flucytosine (5-FC)Converted to 5-FU → blocks DNA/RNA synthesis; used with Amph B
8Azoles - MechanismInhibit fungal CYP450 → block ergosterol synthesis
9KetoconazoleOral imidazole; inhibits human steroid synthesis; hepatotoxic; now rarely used
10Triazoles ComparisonItraconazole vs Fluconazole vs Voriconazole
11EchinocandinsCaspofungin; inhibit glucan synthesis (cell WALL target); IV only
12GriseofulvinBinds keratin; for Tinea/ringworm; largely replaced by newer drugs
13Terbinafine (Lamisil)Allylamine; inhibits squalene epoxidase; drug of choice for onychomycosis
14Topical AntifungalsNystatin, Miconazole, Clotrimazole, Naftifine, Undecylenic acid, Tolnaftate
15Drugs of Choice - Quick ReferenceInfection-to-drug matching table

Download your flashcard deck (16 slides with question/answer panels, color-coded by category):

Antifungal Drugs Flashcards

Presentation · PPTX

Each slide shows the question on the left and the full answer on the right, with color-coded topic tags (Mechanism = green, Adverse Effects = red, Drug of Choice = red, Clinical Uses = yellow, etc.).
This is a shared conversation. Sign in to Orris to start your own chat.