~/mbbs-timetable/generate_timetable.py
from openpyxl import Workbook
from openpyxl.styles import (
Font, PatternFill, Alignment, Border, Side
)
from openpyxl.utils import get_column_letter
from datetime import date, timedelta
wb = Workbook()
# ── colour palette ──────────────────────────────────────────────────────────
DARK_BG = "1F3864" # dark navy – title banner
PHASE1_HDR = "2E75B6" # blue – Phase 1 header
PHASE2_HDR = "2E86AB" # teal-blue – Phase 2 header
PHASE3_HDR = "1D7A59" # green – Phase 3 header
SPRINT_HDR = "7B2D8B" # purple – Final Sprint header
ANAT_CLR = "D6E4F7" # light blue – anatomy cells
PHYS_CLR = "D5F0E8" # light green– physiology cells
BIOC_CLR = "FFF2CC" # yellow – biochemistry cells
TIP_CLR = "F4CCCC" # light red – daily tip cells
TIME_CLR = "E8EAF6" # lavender – time-slot cells
HDR_WHITE = "FFFFFF"
ROW_ALT = "F7F9FC" # very light stripe
# ── helpers ─────────────────────────────────────────────────────────────────
def thin_border():
s = Side(style="thin", color="BFBFBF")
return Border(left=s, right=s, top=s, bottom=s)
def medium_border():
s = Side(style="medium", color="595959")
return Border(left=s, right=s, top=s, bottom=s)
def fill(hex_color):
return PatternFill("solid", start_color=hex_color, fgColor=hex_color)
def hdr_font(sz=11, bold=True, color=HDR_WHITE):
return Font(name="Arial", size=sz, bold=bold, color=color)
def body_font(sz=10, bold=False, color="000000"):
return Font(name="Arial", size=sz, bold=bold, color=color)
def center(wrap=True):
return Alignment(horizontal="center", vertical="center", wrap_text=wrap)
def left(wrap=True):
return Alignment(horizontal="left", vertical="center", wrap_text=wrap)
def apply_range(ws, row_start, row_end, col_start, col_end,
fnt=None, aln=None, fil=None, brd=None):
for r in range(row_start, row_end + 1):
for c in range(col_start, col_end + 1):
cell = ws.cell(row=r, column=c)
if fnt: cell.font = fnt
if aln: cell.alignment = aln
if fil: cell.fill = fil
if brd: cell.border = brd
# ════════════════════════════════════════════════════════════════════════════
# SHEET 1 – 30-Day Day-by-Day Timetable
# ════════════════════════════════════════════════════════════════════════════
ws = wb.active
ws.title = "30-Day Timetable"
ws.sheet_view.showGridLines = False
# column widths
col_widths = [6, 12, 10, 30, 28, 24, 32]
for i, w in enumerate(col_widths, 1):
ws.column_dimensions[get_column_letter(i)].width = w
# ── Title banner ─────────────────────────────────────────────────────────────
ws.merge_cells("A1:G1")
ws["A1"] = "KNRUHS FIRST YEAR MBBS · 30-DAY STUDY TIMETABLE"
ws["A1"].font = Font(name="Arial", size=16, bold=True, color=HDR_WHITE)
ws["A1"].fill = fill(DARK_BG)
ws["A1"].alignment = center()
ws.row_dimensions[1].height = 32
ws.merge_cells("A2:G2")
ws["A2"] = "Anatomy | Physiology | Biochemistry (7-8 hrs/day)"
ws["A2"].font = Font(name="Arial", size=11, italic=True, color="BDD7EE")
ws["A2"].fill = fill(DARK_BG)
ws["A2"].alignment = center()
ws.row_dimensions[2].height = 22
# ── Column headers ────────────────────────────────────────────────────────────
headers = ["Day", "Date", "Phase", "ANATOMY (3.5 hrs)",
"PHYSIOLOGY (2.5 hrs)", "BIOCHEMISTRY (1.5 hrs)", "Daily Tip / Focus"]
col_fills = ["2E4057", "2E4057", "2E4057",
"1F618D", "1A7A5E", "B7950B", "6C3483"]
for col, (h, cf) in enumerate(zip(headers, col_fills), 1):
cell = ws.cell(row=3, column=col, value=h)
cell.font = hdr_font(11)
cell.fill = fill(cf)
cell.alignment = center()
cell.border = thin_border()
ws.row_dimensions[3].height = 22
# ── Day data ──────────────────────────────────────────────────────────────────
start_date = date(2026, 7, 13) # Day 1 = tomorrow
data = [
# Day, Phase, Anatomy, Physiology, Biochemistry, Tip
(1, "Phase 1\n(Days 1-10)",
"Upper Limb – Brachial plexus (roots, trunks, divisions, cords, branches)",
"Blood – Composition, plasma proteins, haematopoiesis",
"Amino acids – classification, properties, essential vs non-essential",
"Draw the brachial plexus from scratch. Don't just read it."),
(2, "Phase 1",
"Upper Limb – Arm muscles (flexors/extensors), musculocutaneous nerve",
"Blood – RBC structure, haemoglobin types, haemolysis",
"Protein structure – primary, secondary, tertiary, quaternary",
"Make a one-page muscle table: origin → insertion → action → nerve."),
(3, "Phase 1",
"Upper Limb – Rotator cuff (4 muscles), shoulder joint, axilla",
"Blood – WBC types, differential count, functions",
"Protein structure – denaturation, peptide bonds, amino acid reactions",
"Revise yesterday's blood topics for 20 min before starting new ones."),
(4, "Phase 1",
"Upper Limb – Forearm flexors & extensors, median nerve course",
"CVS – Cardiac cycle phases, pressure-volume loop",
"Enzymes – Classification (EC numbers), active site, cofactors",
"Link median nerve to carpal tunnel syndrome – examiners love this."),
(5, "Phase 1",
"Upper Limb – Hand muscles (thenar, hypothenar, lumbricals, interossei)",
"CVS – Heart sounds (S1-S4), murmurs basics",
"Enzymes – Michaelis-Menten kinetics, Km, Vmax, Lineweaver-Burk",
"Practice drawing the Lineweaver-Burk plot – often asked in Biochem viva."),
(6, "Phase 1",
"Upper Limb – Carpal tunnel, ulnar nerve, radial nerve; clinical palsy patterns",
"CVS – ECG: P wave, QRS complex, T wave; axis",
"Enzymes – Competitive vs non-competitive inhibition; allosteric regulation",
"Link each nerve palsy to a clinical sign (wrist drop, claw hand, etc.)."),
(7, "Phase 1",
"Lower Limb – Femoral triangle (boundaries, contents, femoral sheath)",
"Respiration – Mechanics of breathing, muscles, compliance",
"Carbohydrate metabolism – Glycolysis (10 steps, key enzymes)",
"Femoral triangle is a guaranteed viva topic – know contents in order."),
(8, "Phase 1",
"Lower Limb – Adductor canal, popliteal fossa (boundaries & contents)",
"Respiration – Lung volumes & capacities (spirometry values)",
"Carbohydrate metabolism – Pyruvate dehydrogenase complex, acetyl-CoA",
"Memorise lung volume numbers: TV=500mL, IRV=3000mL, ERV=1100mL…"),
(9, "Phase 1",
"Lower Limb – Gluteal region, hip joint, sciatic nerve course",
"Respiration – O₂ & CO₂ transport; oxyhaemoglobin dissociation curve",
"TCA cycle – 8 steps, enzymes, energy yield per turn",
"Draw the oxyhaemoglobin curve and mark Bohr / Haldane effects."),
(10, "Phase 1",
"Lower Limb – Leg compartments, foot arches; lumbar & sacral plexus overview",
"Respiration – Regulation of respiration; central & peripheral chemoreceptors",
"Glycogen metabolism – synthesis (glycogenesis) & breakdown (glycogenolysis)",
"Quick 1-hr revision: brachial plexus + femoral triangle diagrams."),
(11, "Phase 2\n(Days 11-20)",
"Thorax – Heart: external features, chambers, valves",
"GIT – Mastication, swallowing, oesophageal motility",
"Lipid metabolism – Fatty acid structure, saturated vs unsaturated",
"Know the 4 heart valves – auscultation areas are common MCQ traps."),
(12, "Phase 2",
"Thorax – Coronary arteries (LAD, LCx, RCA), venous drainage, conducting system",
"GIT – Gastric secretion (HCl, pepsin, intrinsic factor), phases",
"Lipid metabolism – β-oxidation of fatty acids (even-chain), energy yield",
"Coronary artery territories + MI complications = high-yield clinical link."),
(13, "Phase 2",
"Thorax – Lungs (lobes, fissures, hila contents), pleura, bronchopulmonary segments",
"GIT – Pancreatic & bile secretion; enterohepatic circulation",
"Lipid metabolism – Ketone body formation, utilisation; ketoacidosis",
"Learn the 10 bronchopulmonary segments for each lung – viva favourite."),
(14, "Phase 2",
"Thorax – Mediastinum (divisions, contents); diaphragm (openings T8/T10/T12)",
"Renal – Nephron structure, renal blood flow, GFR, autoregulation",
"Lipoproteins – Types (chylomicrons, VLDL, LDL, HDL), apo-proteins",
"Diaphragm openings: remember 'I ate (8) ten (10) eggs (12) at twelve (12)'"),
(15, "Phase 2",
"Abdomen – Peritoneum, mesenteries, omenta, peritoneal reflections",
"Renal – Tubular reabsorption (PCT, loop, DCT, collecting duct)",
"Protein metabolism – Transamination, deamination; role of PLP",
"Peritoneum folds & fossae: draw and label on blank abdominal outline."),
(16, "Phase 2",
"Abdomen – Stomach (parts, relations, blood supply); duodenum (4 parts)",
"Renal – Concentration of urine (counter-current mechanism), ADH role",
"Protein metabolism – Urea cycle (6 steps, 5 enzymes, locations)",
"Urea cycle enzymes and their deficiency diseases – easy exam marks."),
(17, "Phase 2",
"Abdomen – Liver (surfaces, lobes, porta hepatis); portal circulation",
"Renal – Acid-base regulation by kidney; bicarbonate handling",
"Protein metabolism – Amino acid catabolism: phenylalanine, tyrosine",
"Portal-systemic anastomosis sites = common 5-mark question in theory."),
(18, "Phase 2",
"Abdomen – Kidneys (relations, blood supply); suprarenal glands",
"Nervous system – Resting membrane potential; action potential",
"Vitamins – Fat-soluble (A, D, E, K): sources, functions, deficiency",
"Make a vitamin deficiency table – easy 5 marks and quick to memorise."),
(19, "Phase 2",
"Pelvis – Pelvic floor muscles; male reproductive organs (testes, epididymis)",
"Nervous system – Nerve conduction velocity; saltatory conduction",
"Vitamins – Water-soluble (B-complex, C): sources, coenzyme roles, deficiency",
"Pelvic floor = common practical/viva topic; learn muscle attachments."),
(20, "Phase 2",
"Pelvis – Female reproductive organs (uterus, ovary, fallopian tube, supports)",
"Nervous system – Neuromuscular junction; synaptic transmission; reflexes",
"Minerals – Ca, P, Fe, Zn, Cu, I – absorption, regulation, deficiency",
"NMJ + myasthenia gravis clinical link – frequent short-answer question."),
(21, "Phase 3\n(Days 21-28)",
"Head & Neck – Cranial nerves V & VII (origin, course, branches, lesions)",
"Endocrinology – Pituitary: anterior (6 hormones) & posterior (ADH, oxytocin)",
"Molecular biology – DNA structure (B-DNA), Chargaff's rules, supercoiling",
"Facial nerve palsy (UMN vs LMN) – guaranteed viva topic."),
(22, "Phase 3",
"Head & Neck – Cranial nerves IX & X; XI & XII; cavernous sinus",
"Endocrinology – Thyroid: synthesis, T3/T4, calcitonin; hypo/hyperthyroid",
"Molecular biology – DNA replication (semi-conservative, enzymes, Okazaki)",
"Cavernous sinus contents: 'O TOM CAT' mnemonic → draw & label."),
(23, "Phase 3",
"Head & Neck – Thyroid gland (relations, blood supply); parathyroid",
"Endocrinology – Adrenal cortex (zones, hormones, cortisol, aldosterone)",
"Molecular biology – Transcription (promoter, RNA pol, processing, splicing)",
"Thyroid blood supply in relation to RLN = surgical anatomy gem."),
(24, "Phase 3",
"Neuroanatomy – Spinal cord (grey matter, tracts: spinothalamic, DCML, CST)",
"Endocrinology – Insulin & glucagon; diabetes mellitus types & complications",
"Molecular biology – Translation (ribosomes, tRNA, codons, post-translational)",
"Spinal cord tracts: draw cross-section and colour-code each tract."),
(25, "Phase 3",
"Neuroanatomy – Brainstem (medulla, pons, midbrain); cranial nerve nuclei",
"Endocrinology – Reproductive hormones: GnRH, FSH, LH, oestrogen, progesterone",
"Clinical biochemistry – Blood glucose regulation; HbA1c; diabetes markers",
"Brainstem lesions produce crossed signs – learn 3 named syndromes."),
(26, "Phase 3",
"Neuroanatomy – Cerebellum (lobes, connections, functions); basal ganglia",
"Reproductive physiology – Menstrual cycle (follicular & luteal phases)",
"Clinical biochemistry – Liver function tests (bilirubin, ALT, AST, ALP, GGT)",
"Basal ganglia circuits: direct vs indirect pathway → Parkinson's link."),
(27, "Phase 3",
"Histology – Epithelium (types + functions); connective tissue types",
"Reproductive physiology – Spermatogenesis & oogenesis; fertilisation",
"Clinical biochemistry – Renal function tests; electrolyte imbalances (Na, K)",
"Histology: go through actual slides or diagrams – visual memory helps."),
(28, "Phase 3",
"Embryology – Germ layers (ectoderm/mesoderm/endoderm derivatives); placenta",
"Reproductive physiology – Pregnancy: hCG, placental hormones, parturition",
"Clinical biochemistry – Lipid profile; cardiac enzymes (troponin, CK-MB)",
"Embryology congenital anomalies: make a one-page table of defect → cause."),
(29, "Final\nSprint",
"Revise: Brachial plexus, Inguinal canal, Coronary arteries, Base of skull diagrams",
"Revise: Cardiac cycle, Oxyhaemoglobin curve, JG apparatus, NMJ",
"Revise: Glycolysis, TCA, Urea cycle, Vitamins table",
"Write out 3 full 10-mark answers today. Speed + structure matter."),
(30, "Final\nSprint",
"KNRUHS past papers (Anatomy) – attempt 5 questions under timed conditions",
"KNRUHS past papers (Physiology) – attempt 5 questions under timed conditions",
"KNRUHS past papers (Biochemistry) – attempt 3 questions under timed conditions",
"Sleep 8 hrs tonight. No new topics. Trust your preparation."),
]
# phase colour map
phase_fills = {
"Phase 1": fill(PHASE1_HDR),
"Phase 2": fill(PHASE2_HDR),
"Phase 3": fill(PHASE3_HDR),
"Final": fill(SPRINT_HDR),
}
ROW_OFFSET = 4 # data starts at row 4
for idx, (day, phase, anat, phys, bioc, tip) in enumerate(data):
row = ROW_OFFSET + idx
ws.row_dimensions[row].height = 56
cur_date = start_date + timedelta(days=idx)
date_str = cur_date.strftime("%d %b\n%A")
# determine phase fill
p_key = phase.split("\n")[0].split("(")[0].strip()
p_fill = phase_fills.get(p_key, fill(PHASE1_HDR))
# alternating row background for non-coloured cols
row_bg = fill("FFFFFF") if idx % 2 == 0 else fill(ROW_ALT)
cells_data = [
(1, str(day), fill("2C3E50"), hdr_font(12), center()),
(2, date_str, fill("34495E"), hdr_font(9), center()),
(3, phase, p_fill, hdr_font(10), center()),
(4, anat, fill(ANAT_CLR), body_font(10), left()),
(5, phys, fill(PHYS_CLR), body_font(10), left()),
(6, bioc, fill(BIOC_CLR), body_font(10), left()),
(7, tip, fill(TIP_CLR), body_font(9, italic=True, color="6C0000"), left()),
]
for col, val, f, fnt, aln in cells_data:
c = ws.cell(row=row, column=col, value=val)
c.fill = f
c.font = fnt
c.alignment = aln
c.border = thin_border()
# freeze panes below header
ws.freeze_panes = "A4"
# ── Legend row ────────────────────────────────────────────────────────────────
leg_row = ROW_OFFSET + 30
ws.merge_cells(f"A{leg_row}:G{leg_row}")
ws.row_dimensions[leg_row].height = 18
legend = ws.cell(row=leg_row, column=1,
value=" Colour legend: Blue = Anatomy | Green = Physiology | Yellow = Biochemistry | Pink = Daily Tip")
legend.font = Font(name="Arial", size=9, italic=True, color="555555")
legend.fill = fill("EDEDED")
legend.alignment = left(wrap=False)
# ════════════════════════════════════════════════════════════════════════════
# SHEET 2 – Daily Timetable (time-slot schedule)
# ════════════════════════════════════════════════════════════════════════════
ws2 = wb.create_sheet("Daily Schedule")
ws2.sheet_view.showGridLines = False
col_widths2 = [20, 55, 20]
for i, w in enumerate(col_widths2, 1):
ws2.column_dimensions[get_column_letter(i)].width = w
# title
ws2.merge_cells("A1:C1")
ws2["A1"] = "DAILY STUDY SCHEDULE (7-8 hrs/day)"
ws2["A1"].font = Font(name="Arial", size=15, bold=True, color=HDR_WHITE)
ws2["A1"].fill = fill(DARK_BG)
ws2["A1"].alignment = center()
ws2.row_dimensions[1].height = 30
ws2.merge_cells("A2:C2")
ws2["A2"] = "Follow this every day. Adjust only if you finish a topic early — use extra time to revise, not move ahead."
ws2["A2"].font = Font(name="Arial", size=10, italic=True, color="BDD7EE")
ws2["A2"].fill = fill(DARK_BG)
ws2["A2"].alignment = center()
ws2.row_dimensions[2].height = 18
# headers
for col, h, cf in [(1,"Time Slot","2E4057"),(2,"Activity","2E4057"),(3,"Subject","2E4057")]:
c = ws2.cell(row=3, column=col, value=h)
c.font = hdr_font(); c.fill = fill(cf)
c.alignment = center(); c.border = thin_border()
ws2.row_dimensions[3].height = 20
slots = [
("6:00 – 7:00 AM", "Quick revision of yesterday's topics across all 3 subjects", "All 3", "D5D8DC"),
("7:00 – 9:00 AM", "Anatomy – Read new topic from BD Chaurasia; make short notes", "Anatomy", ANAT_CLR),
("9:00 – 9:15 AM", "SHORT BREAK – Walk, water, stretch", "Break", "E8E8E8"),
("9:15 – 11:00 AM", "Physiology – Read new topic from AK Jain; draw flowcharts", "Physiology", PHYS_CLR),
("11:00 – 11:15 AM","SHORT BREAK", "Break", "E8E8E8"),
("11:15 AM – 12:30 PM","Biochemistry – Read new topic from Satyanarayan; draw pathways","Biochemistry",BIOC_CLR),
("12:30 – 2:00 PM", "LUNCH + REST – Mandatory. Do not study during this time.", "Rest", "FCE4D6"),
("2:00 – 3:30 PM", "Anatomy – Draw diagrams, write 5-mark answers, practise viva Qs","Anatomy", ANAT_CLR),
("3:30 – 4:30 PM", "Physiology – Write answers, draw graphs (ECG, curves, cycles)", "Physiology",PHYS_CLR),
("4:30 – 4:45 PM", "SHORT BREAK", "Break", "E8E8E8"),
("4:45 – 5:30 PM", "Biochemistry – Pathway diagrams, clinical correlations, MCQs", "Biochemistry",BIOC_CLR),
("5:30 – 6:00 PM", "Evening walk / dinner / personal time", "Personal", "E8F8E8"),
("6:00 – 7:30 PM", "Mixed revision – flip through all 3 subjects' notes; past papers","All 3", "D5D8DC"),
("7:30 – 8:00 PM", "Plan tomorrow – check timetable, prepare books/notes", "Planning", "F0F0F0"),
]
for i, (time, activity, subj, bg) in enumerate(slots, 4):
ws2.row_dimensions[i].height = 30
for col, val in [(1,time),(2,activity),(3,subj)]:
c = ws2.cell(row=i, column=col, value=val)
c.fill = fill(bg)
c.font = body_font(10, bold=(subj=="Break" or subj=="Rest"))
c.alignment = center() if col in (1,3) else left()
c.border = thin_border()
# ════════════════════════════════════════════════════════════════════════════
# SHEET 3 – Key Diagrams Checklist
# ════════════════════════════════════════════════════════════════════════════
ws3 = wb.create_sheet("Diagrams Checklist")
ws3.sheet_view.showGridLines = False
ws3.column_dimensions["A"].width = 5
ws3.column_dimensions["B"].width = 40
ws3.column_dimensions["C"].width = 18
ws3.column_dimensions["D"].width = 18
ws3.column_dimensions["E"].width = 22
ws3.merge_cells("A1:E1")
ws3["A1"] = "HIGH-YIELD DIAGRAMS CHECKLIST – Tick off as you master each one"
ws3["A1"].font = Font(name="Arial", size=13, bold=True, color=HDR_WHITE)
ws3["A1"].fill = fill(DARK_BG)
ws3["A1"].alignment = center()
ws3.row_dimensions[1].height = 28
for col, h, w in [(1,"#","5"),(2,"Diagram","40"),(3,"Subject","18"),
(4,"Target Day","18"),(5,"Status (✓/✗/In Progress)","22")]:
c = ws3.cell(row=2, column=col, value=h)
c.font = hdr_font(); c.fill = fill("2E4057")
c.alignment = center(); c.border = thin_border()
ws3.row_dimensions[2].height = 20
diagrams = [
("Brachial Plexus (full – roots to branches)", "Anatomy", "Day 1", ""),
("Rotator Cuff – 4 muscles diagram", "Anatomy", "Day 2", ""),
("Carpal Tunnel cross-section", "Anatomy", "Day 6", ""),
("Femoral Triangle (boundaries & contents)", "Anatomy", "Day 7", ""),
("Popliteal Fossa (boundaries & contents)", "Anatomy", "Day 8", ""),
("Heart – external features & coronary arteries","Anatomy", "Day 11", ""),
("Conducting system of the heart", "Anatomy", "Day 12", ""),
("Bronchopulmonary segments (both lungs)", "Anatomy", "Day 13", ""),
("Diaphragm – openings and contents", "Anatomy", "Day 14", ""),
("Inguinal canal – cross-section & layers", "Anatomy", "Day 15", ""),
("Portal-systemic anastomosis sites", "Anatomy", "Day 17", ""),
("Spinal cord cross-section (tracts labelled)", "Anatomy", "Day 24", ""),
("Base of skull – foramina & structures", "Anatomy", "Day 22", ""),
("Cavernous sinus contents & relations", "Anatomy", "Day 22", ""),
("Oxyhaemoglobin dissociation curve", "Physiology", "Day 9", ""),
("Cardiac cycle (Wiggers diagram)", "Physiology", "Day 11", ""),
("ECG – normal tracing labelled", "Physiology", "Day 13", ""),
("Spirometry – lung volumes & capacities", "Physiology", "Day 8", ""),
("JG apparatus diagram", "Physiology", "Day 14", ""),
("Menstrual cycle – hormonal changes graph", "Physiology", "Day 26", ""),
("Glycolysis pathway (10 steps)", "Biochemistry", "Day 7", ""),
("TCA cycle (Krebs cycle)", "Biochemistry", "Day 9", ""),
("Urea cycle (6 steps)", "Biochemistry", "Day 16", ""),
("Beta-oxidation of fatty acids", "Biochemistry", "Day 12", ""),
("DNA double helix structure", "Biochemistry", "Day 21", ""),
("Lineweaver-Burk plot (enzyme inhibition)", "Biochemistry", "Day 5", ""),
]
for i, (diag, subj, day, status) in enumerate(diagrams, 3):
bg = ANAT_CLR if subj=="Anatomy" else (PHYS_CLR if subj=="Physiology" else BIOC_CLR)
ws3.row_dimensions[i].height = 22
for col, val in [(1,i-2),(2,diag),(3,subj),(4,day),(5,status)]:
c = ws3.cell(row=i, column=col, value=val)
c.fill = fill(bg)
c.font = body_font(10)
c.alignment = center() if col != 2 else left()
c.border = thin_border()
# ════════════════════════════════════════════════════════════════════════════
# SHEET 4 – High-Yield Topics Quick Reference
# ════════════════════════════════════════════════════════════════════════════
ws4 = wb.create_sheet("High-Yield Topics")
ws4.sheet_view.showGridLines = False
ws4.column_dimensions["A"].width = 22
ws4.column_dimensions["B"].width = 48
ws4.column_dimensions["C"].width = 20
ws4.merge_cells("A1:C1")
ws4["A1"] = "HIGH-YIELD TOPICS FOR KNRUHS FIRST YEAR EXAMS"
ws4["A1"].font = Font(name="Arial", size=13, bold=True, color=HDR_WHITE)
ws4["A1"].fill = fill(DARK_BG)
ws4["A1"].alignment = center()
ws4.row_dimensions[1].height = 28
for col, h in [(1,"Subject / Area"),(2,"High-Yield Topic"),(3,"Expected Marks")]:
c = ws4.cell(row=2, column=col, value=h)
c.font = hdr_font(); c.fill = fill("2E4057")
c.alignment = center(); c.border = thin_border()
ws4.row_dimensions[2].height = 20
hy_topics = [
("Anatomy – UL", "Brachial plexus (formation, branches, lesions)", "10 marks"),
("Anatomy – UL", "Carpal tunnel syndrome (anatomy + clinical)", "5 marks"),
("Anatomy – UL", "Rotator cuff – muscles, attachments, clinical", "5 marks"),
("Anatomy – LL", "Femoral triangle – boundaries, contents, femoral sheath","10 marks"),
("Anatomy – LL", "Popliteal fossa – boundaries and contents", "5 marks"),
("Anatomy – LL", "Sacral plexus – formation and branches", "5 marks"),
("Anatomy – Thorax","Coronary arteries – origin, course, area supplied", "10 marks"),
("Anatomy – Thorax","Conducting system of the heart", "5 marks"),
("Anatomy – Thorax","Bronchopulmonary segments", "5 marks"),
("Anatomy – Thorax","Diaphragm – openings, structures, nerve supply", "10 marks"),
("Anatomy – Abdomen","Inguinal canal – walls, contents, hernias", "10 marks"),
("Anatomy – Abdomen","Portal circulation + portal-systemic anastomosis", "10 marks"),
("Anatomy – H&N", "Facial nerve – course, branches, UMN vs LMN palsy", "10 marks"),
("Anatomy – H&N", "Cavernous sinus – contents and relations", "5 marks"),
("Anatomy – Neuro", "Spinal cord – tracts (spinothalamic, DCML, corticospinal)","10 marks"),
("Anatomy – Histo", "Types of epithelium with examples", "5 marks"),
("Anatomy – Embryo","Congenital heart defects (VSD, ASD, PDA, TGA)", "5 marks"),
("Physiology – CVS","Cardiac cycle – phases, pressure-volume changes", "10 marks"),
("Physiology – CVS","ECG – waves, intervals, clinical significance", "10 marks"),
("Physiology – Resp","Oxyhaemoglobin dissociation curve (shifts)", "10 marks"),
("Physiology – Resp","Lung volumes and capacities (spirometry)", "5 marks"),
("Physiology – Renal","Counter-current mechanism of urine concentration", "10 marks"),
("Physiology – Endo","Insulin – synthesis, secretion, actions, diabetes", "10 marks"),
("Physiology – Repro","Menstrual cycle – hormonal changes", "10 marks"),
("Physiology – NS", "Neuromuscular junction – steps + myasthenia gravis", "5 marks"),
("Biochemistry", "Glycolysis – 10 steps, enzymes, energy yield", "10 marks"),
("Biochemistry", "TCA cycle – steps, enzymes, significance", "10 marks"),
("Biochemistry", "Urea cycle – steps, enzymes, disorders", "10 marks"),
("Biochemistry", "Beta-oxidation of fatty acids", "5 marks"),
("Biochemistry", "Vitamin deficiency diseases (all vitamins)", "5 marks"),
("Biochemistry", "Enzyme inhibition – competitive vs non-competitive", "5 marks"),
("Biochemistry", "DNA replication – semi-conservative, enzymes", "5 marks"),
("Biochemistry", "HbA1c and diabetes monitoring", "5 marks"),
]
subj_fills = {
"Anatomy": ANAT_CLR,
"Physiology": PHYS_CLR,
"Biochemistry": BIOC_CLR,
}
for i, (subj, topic, marks) in enumerate(hy_topics, 3):
bg = ANAT_CLR
for key, col in subj_fills.items():
if key in subj:
bg = col; break
ws4.row_dimensions[i].height = 20
for coln, val in [(1,subj),(2,topic),(3,marks)]:
c = ws4.cell(row=i, column=coln, value=val)
c.fill = fill(bg); c.font = body_font(10)
c.alignment = center() if coln in (1,3) else left()
c.border = thin_border()
# ── Save ─────────────────────────────────────────────────────────────────────
out = "/home/daytona/workspace/mbbs-timetable/KNRUHS_30Day_Study_Timetable.xlsx"
wb.save(out)
print(f"Saved: {out}")