Make a detailed ppt on types of court along with their powers,inquest, witness, summons

Reading File
Searching the Web

types of courts India powers jurisdiction inquest witness summons CrPC

Reading File
Reading Web Page

https://www.bhu.ac.in/Content/Syllabus/Syllabus_300620200422…

Running Command

mkdir -p /tmp/workspace/courts-ppt && ls /tmp/workspace/courts-ppt/

Writing File

~/courts-ppt/create_ppt.py

from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
import copy
from lxml import etree

prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)

blank = prs.slide_layouts[6]

# ── colour palette ──────────────────────────────────────────────────────────
C_NAVY   = RGBColor(0x1A, 0x37, 0x5E)   # dark navy – header bars
C_GOLD   = RGBColor(0xC9, 0xA0, 0x2C)   # gold accent
C_WHITE  = RGBColor(0xFF, 0xFF, 0xFF)
C_LTBLUE = RGBColor(0xE8, 0xF0, 0xFB)   # light blue background
C_DKGRAY = RGBColor(0x33, 0x33, 0x33)
C_MID    = RGBColor(0x2E, 0x5E, 0xAA)   # mid-blue for sub-headers

# ── helpers ──────────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_rgb=None, line_rgb=None, line_pt=0):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    if fill_rgb:
        shape.fill.solid()
        shape.fill.fore_color.rgb = fill_rgb
    else:
        shape.fill.background()
    if line_rgb:
        shape.line.color.rgb = line_rgb
        shape.line.width = Pt(line_pt)
    else:
        shape.line.fill.background()
    return shape

def add_tb(slide, x, y, w, h, text, size, bold=False, color=C_DKGRAY,
           align=PP_ALIGN.LEFT, wrap=True, italic=False, v_anchor=None):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    if v_anchor:
        tf.vertical_anchor = v_anchor
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return tf

def add_para(tf, text, size, bold=False, color=C_DKGRAY, align=PP_ALIGN.LEFT,
             italic=False, space_before=0):
    p = tf.add_paragraph()
    p.alignment = align
    if space_before:
        p.space_before = Pt(space_before)
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return p

def slide_bg(slide, color=C_LTBLUE):
    add_rect(slide, 0, 0, 13.333, 7.5, fill_rgb=color)

def header_bar(slide, title, subtitle=None):
    add_rect(slide, 0, 0, 13.333, 1.25, fill_rgb=C_NAVY)
    add_rect(slide, 0, 1.25, 13.333, 0.06, fill_rgb=C_GOLD)
    add_tb(slide, 0.3, 0.1, 12.5, 0.85, title, 30, bold=True, color=C_WHITE,
           align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
    if subtitle:
        add_tb(slide, 0.3, 0.85, 12.5, 0.45, subtitle, 14, color=C_GOLD,
               align=PP_ALIGN.LEFT)

def footer(slide, text="Types of Courts | Legal Procedures"):
    add_rect(slide, 0, 7.2, 13.333, 0.3, fill_rgb=C_NAVY)
    add_tb(slide, 0.3, 7.2, 13.0, 0.3, text, 9, color=C_GOLD,
           align=PP_ALIGN.LEFT)

def bullet_box(slide, x, y, w, h, title, bullets, title_size=14, bullet_size=11,
               title_color=C_NAVY, bullet_color=C_DKGRAY, bg=C_WHITE, border=True):
    add_rect(slide, x, y, w, h, fill_rgb=bg,
             line_rgb=C_MID if border else None, line_pt=1)
    tb = slide.shapes.add_textbox(Inches(x+0.1), Inches(y+0.08), Inches(w-0.2), Inches(h-0.15))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(2)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    p0 = tf.paragraphs[0]
    p0.alignment = PP_ALIGN.LEFT
    r0 = p0.add_run()
    r0.text = title
    r0.font.size = Pt(title_size)
    r0.font.bold = True
    r0.font.color.rgb = title_color
    r0.font.name = "Calibri"
    for b in bullets:
        add_para(tf, b, bullet_size, color=bullet_color)
    return tf

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 1 – TITLE
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, fill_rgb=C_NAVY)
# decorative gold bar
add_rect(slide, 0, 5.5, 13.333, 0.12, fill_rgb=C_GOLD)
add_rect(slide, 0, 5.62, 13.333, 0.06, fill_rgb=RGBColor(0xFF,0xFF,0xFF))
# title text
add_tb(slide, 1, 1.2, 11.3, 1.5, "TYPES OF COURTS", 54, bold=True,
       color=C_WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, 1, 2.7, 11.3, 0.7,
       "Powers  •  Inquest  •  Witness  •  Summons",
       22, bold=False, color=C_GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, 1, 3.5, 11.3, 0.5,
       "A Comprehensive Overview of the Indian Judicial System & Legal Procedures",
       14, italic=True, color=RGBColor(0xAA,0xCC,0xFF), align=PP_ALIGN.CENTER)
add_tb(slide, 1, 6.9, 11.3, 0.4,
       "Based on the Code of Criminal Procedure (CrPC) & Indian Constitution",
       11, italic=True, color=C_GOLD, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 2 – OVERVIEW / TABLE OF CONTENTS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Overview", "Topics Covered in This Presentation")
footer(slide)

topics = [
    ("1", "Structure of Indian Courts", "Hierarchy from Supreme Court to Magistrate Courts"),
    ("2", "Powers of Courts", "Sentencing, fines, and jurisdictional limits"),
    ("3", "Inquest", "Types: Police, Magistrate, Coroner, Medical Examiner"),
    ("4", "Witness", "Types of witnesses and their roles in court"),
    ("5", "Summons", "Issuance, service, and compliance rules"),
]

for i, (num, title, desc) in enumerate(topics):
    row = i
    x = 0.5
    y = 1.55 + row * 1.05
    add_rect(slide, x, y, 0.7, 0.75, fill_rgb=C_NAVY)
    add_tb(slide, x, y, 0.7, 0.75, num, 26, bold=True, color=C_GOLD,
           align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, x+0.72, y, 11.6, 0.75, fill_rgb=C_WHITE,
             line_rgb=C_MID, line_pt=0.8)
    add_tb(slide, x+0.85, y+0.02, 11.2, 0.35, title, 15, bold=True,
           color=C_NAVY)
    add_tb(slide, x+0.85, y+0.38, 11.2, 0.3, desc, 11, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 3 – HIERARCHY OF COURTS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Hierarchy of Courts in India",
           "Structure of the Indian Judicial System")
footer(slide)

levels = [
    ("Supreme Court of India", "Apex court | Article 124–147 | Ultimate authority in civil & criminal matters"),
    ("High Courts", "Each state/UT | Article 214–231 | Appellate + original jurisdiction"),
    ("Sessions / District Court", "District level | Presided by Sessions Judge | Highest criminal court at district level"),
    ("Chief Judicial Magistrate", "Below Sessions Court | Presided by CJM | Handles major criminal cases"),
    ("Judicial Magistrate 1st Class", "Handles criminal cases | Below CJM | Significant trial jurisdiction"),
    ("Judicial Magistrate 2nd Class", "Limited jurisdiction | Minor offences | Lowest rung of judicial magistracy"),
    ("Executive Magistrate", "Non-judicial; administrative | SDM, DM etc. | Handles preventive matters"),
]

arrow_colors = [C_NAVY, C_MID, RGBColor(0x2E,0x7D,0xCC),
                RGBColor(0x3A,0x96,0xDD), RGBColor(0x56,0xB0,0xE8),
                RGBColor(0x7B,0xC8,0xF0), RGBColor(0xA8,0xDB,0xF5)]

for i, (court, desc) in enumerate(levels):
    y = 1.42 + i * 0.72
    w_bar = 13.333 - 0.5 - (i * 0.18)
    x_bar = 0.25 + (i * 0.09)
    add_rect(slide, x_bar, y, w_bar, 0.55, fill_rgb=arrow_colors[i])
    add_tb(slide, x_bar+0.15, y+0.02, w_bar-0.3, 0.26,
           court, 12, bold=True, color=C_WHITE)
    add_tb(slide, x_bar+0.15, y+0.27, w_bar-0.3, 0.22,
           desc, 9, color=RGBColor(0xDD,0xEE,0xFF))

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 4 – POWERS OF COURTS (table)
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Powers of Courts",
           "Sentencing Powers: Imprisonment & Fines")
footer(slide)

rows = [
    ("Court", "Imprisonment", "Fine", "Capital Punishment"),
    ("Supreme Court", "Any period", "Any amount", "Yes"),
    ("High Court", "Any period", "Any amount", "Yes"),
    ("District & Sessions Judge", "Any period", "Any amount", "Yes (HC confirmation needed)"),
    ("Addl. District & Sessions Judge", "Same as above", "Any amount", "Yes (HC confirmation needed)"),
    ("Chief Judicial Magistrate (CJM)", "Up to 7 years", "Any amount", "No"),
    ("1st Class Judicial Magistrate", "Up to 3 years", "Up to ₹10,000", "No"),
    ("2nd Class Judicial Magistrate", "Up to 1 year", "Up to ₹5,000", "No"),
    ("Executive Magistrate", "Up to 1 month / preventive", "Up to ₹5,000", "No"),
]

col_widths = [3.8, 2.7, 2.4, 3.8]
col_starts = [0.25]
for w in col_widths[:-1]:
    col_starts.append(col_starts[-1] + w + 0.02)

row_h = 0.56
y_start = 1.38

for r_idx, row in enumerate(rows):
    y = y_start + r_idx * row_h
    for c_idx, (cell, cw, cx) in enumerate(zip(row, col_widths, col_starts)):
        is_header = r_idx == 0
        bg = C_NAVY if is_header else (C_LTBLUE if r_idx % 2 == 0 else C_WHITE)
        txt_color = C_GOLD if is_header else C_DKGRAY
        add_rect(slide, cx, y, cw, row_h, fill_rgb=bg,
                 line_rgb=C_MID, line_pt=0.5)
        add_tb(slide, cx+0.05, y+0.05, cw-0.1, row_h-0.1, cell,
               11 if is_header else 10, bold=is_header,
               color=txt_color, align=PP_ALIGN.CENTER,
               v_anchor=MSO_ANCHOR.MIDDLE)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 5 – INQUEST (overview)
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Inquest",
           "Formal inquiry into the cause of sudden, unnatural, or suspicious death")
footer(slide)

add_tb(slide, 0.4, 1.38, 12.5, 0.4,
       "An inquest is a legal/quasi-judicial inquiry to determine the cause & manner of death. "
       "It is mandatory in unnatural, sudden, or suspicious deaths.",
       11, color=C_DKGRAY)

# 5 boxes
boxes = [
    ("When is Inquest Held?",
     ["• Sudden death of unknown cause",
      "• Suicide",
      "• Murder or manslaughter",
      "• Accidents / injuries",
      "• Death in custody / jail",
      "• Killing by animal or machinery",
      "• Any suspicious circumstances"]),
    ("Conducting Authority",
     ["• Police Officer (u/s 174 CrPC)",
      "• Executive Magistrate",
      "• Judicial Magistrate",
      "• Coroner (select cities)",
      "• Medical Examiner (USA system)"]),
]

for i, (title, buls) in enumerate(boxes):
    x = 0.4 + i * 6.5
    add_rect(slide, x, 1.85, 6.2, 5.3, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=1)
    add_rect(slide, x, 1.85, 6.2, 0.45, fill_rgb=C_NAVY)
    add_tb(slide, x+0.1, 1.87, 6.0, 0.4, title, 13, bold=True, color=C_GOLD)
    tb = slide.shapes.add_textbox(Inches(x+0.15), Inches(2.35), Inches(5.9), Inches(4.6))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4)
    tf.margin_top = Pt(2)
    p0 = tf.paragraphs[0]
    for j, b in enumerate(buls):
        if j == 0:
            p0.add_run().text = b
            p0.runs[0].font.size = Pt(11)
            p0.runs[0].font.color.rgb = C_DKGRAY
            p0.runs[0].font.name = "Calibri"
        else:
            add_para(tf, b, 11, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 6 – TYPES OF INQUEST
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Types of Inquest",
           "Five recognised systems of death investigation")
footer(slide)

inquest_data = [
    ("1. Police Inquest\n(u/s 174 CrPC)",
     ["• Conducted by Police Officer",
      "• Preliminary inquiry for all unnatural deaths",
      "• IO (Investigating Officer) prepares report",
      "• Body not moved without magistrate's order",
      "• Informing nearest Magistrate is mandatory",
      "• No power to commit accused for trial"]),
    ("2. Executive Magistrate\nInquest",
     ["• SDM / DM conducts inquiry",
      "• Power to order post-mortem",
      "• Can question witnesses",
      "• Issues inquest report",
      "• Relevant in custodial deaths",
      "• u/s 176 CrPC"]),
    ("3. Judicial Magistrate\nInquest",
     ["• Used in custodial deaths (police/judicial)",
      "• u/s 176(1A) CrPC",
      "• Mandatory for deaths in police custody",
      "• Judicial oversight of the inquiry",
      "• Witness examination under oath",
      "• Can direct further investigation"]),
    ("4. Coroner's Inquest",
     ["• Empowered for all suspicious deaths",
      "• Power to commit accused to trial",
      "• Orders autopsy by qualified RMP",
      "• Can exhume bodies for ML examination",
      "• Summons expert witness",
      "• No power to impose fine/sentence"]),
    ("5. Medical Examiner\nSystem",
     ["• Prevalent in USA",
      "• Legally AND medically qualified",
      "• Conducts inquest + post-mortem",
      "• Superior to other inquest systems",
      "• Combines legal & scientific inquiry",
      "• Objective & scientific approach"]),
]

col_w = 2.45
for i, (title, buls) in enumerate(inquest_data):
    x = 0.25 + i * (col_w + 0.1)
    add_rect(slide, x, 1.42, col_w, 5.5, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=0.8)
    add_rect(slide, x, 1.42, col_w, 0.7, fill_rgb=C_NAVY)
    add_tb(slide, x+0.1, 1.44, col_w-0.15, 0.65, title, 10, bold=True, color=C_GOLD)
    tb = slide.shapes.add_textbox(Inches(x+0.1), Inches(2.17), Inches(col_w-0.15), Inches(4.5))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(3)
    tf.margin_top = Pt(2)
    p0 = tf.paragraphs[0]
    for j, b in enumerate(buls):
        if j == 0:
            p0.add_run().text = b
            p0.runs[0].font.size = Pt(10)
            p0.runs[0].font.color.rgb = C_DKGRAY
            p0.runs[0].font.name = "Calibri"
        else:
            add_para(tf, b, 10, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 7 – WITNESS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Witness",
           "A person giving testimony under oath or solemn affirmation in court")
footer(slide)

add_tb(slide, 0.4, 1.38, 12.5, 0.38,
       "A witness is a person who gives a statement or testimony under oath or solemn affirmation in the court of law.",
       11, color=C_DKGRAY)

witness_boxes = [
    ("Common Witness",
     C_NAVY,
     ["• Any person with relevant knowledge",
      "• No special qualification needed",
      "• Provides factual testimony",
      "• Must swear an oath/affirmation",
      "• Subject to cross-examination",
      "• Can be summoned by court"]),
    ("Expert Witness",
     RGBColor(0x1A,0x6B,0x3C),
     ["• Chemical Examiner",
      "• Fingerprint Expert",
      "• Ballistic Expert",
      "• Forensic Science Expert",
      "• Doctor / Medical Professional",
      "• Serologist / Toxicologist"]),
    ("Hostile / Adverse Witness",
     RGBColor(0x8B,0x1A,0x1A),
     ["• Turns against the calling party",
      "• Court may declare hostile",
      "• Cross-examined by own party",
      "• Credibility can be challenged",
      "• u/s 154 Indian Evidence Act",
      "• Prior statements used against"]),
    ("Witness Privileges",
     RGBColor(0x5A,0x36,0x8E),
     ["• Right to conduct money (civil)",
      "• Court pays expenses (criminal)",
      "• Protection from self-incrimination",
      "• Right to legal assistance",
      "• Can refuse privileged comms",
      "• Court can compel attendance"]),
]

box_w = 3.0
for i, (title, hdr_col, buls) in enumerate(witness_boxes):
    x = 0.3 + i * (box_w + 0.2)
    add_rect(slide, x, 1.85, box_w, 5.3, fill_rgb=C_WHITE, line_rgb=hdr_col, line_pt=1.5)
    add_rect(slide, x, 1.85, box_w, 0.5, fill_rgb=hdr_col)
    add_tb(slide, x+0.1, 1.87, box_w-0.15, 0.45, title, 12, bold=True, color=C_WHITE)
    tb = slide.shapes.add_textbox(Inches(x+0.15), Inches(2.42), Inches(box_w-0.25), Inches(4.5))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(3)
    tf.margin_top = Pt(2)
    p0 = tf.paragraphs[0]
    for j, b in enumerate(buls):
        if j == 0:
            p0.add_run().text = b
            p0.runs[0].font.size = Pt(10.5)
            p0.runs[0].font.color.rgb = C_DKGRAY
            p0.runs[0].font.name = "Calibri"
        else:
            add_para(tf, b, 10.5, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 8 – EXAMINATION OF WITNESS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Examination of a Witness",
           "Stages and procedures during witness examination in court")
footer(slide)

stages = [
    ("Examination-in-Chief",
     "Direct questioning by the party that called the witness. "
     "Establishes facts supporting the calling party's case. "
     "Leading questions NOT allowed (except on undisputed facts)."),
    ("Cross-Examination",
     "Questioning by the opposing party. Tests credibility and accuracy. "
     "Leading questions ARE allowed. Can challenge prior statements. "
     "Scope: any relevant matter, including character."),
    ("Re-Examination",
     "After cross-examination, the original calling party may re-examine. "
     "Limited to explaining matters raised in cross-examination. "
     "No new matters introduced without court permission."),
    ("Court Examination (u/s 165 IEA)",
     "The Judge may ask any question at any time in any form. "
     "Power to compel answers. Ensures complete truth emerges. "
     "Neither party can object to court's questions."),
]

for i, (stage, desc) in enumerate(stages):
    row = i // 2
    col = i % 2
    x = 0.4 + col * 6.4
    y = 1.5 + row * 2.7
    add_rect(slide, x, y, 6.1, 2.5, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=1)
    add_rect(slide, x, y, 6.1, 0.52, fill_rgb=C_NAVY)
    add_tb(slide, x+0.12, y+0.08, 5.85, 0.4, stage, 13, bold=True, color=C_GOLD)
    add_tb(slide, x+0.12, y+0.58, 5.85, 1.82, desc, 11, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 9 – SUMMONS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Summons",
           "A written judicial command to appear before the court")
footer(slide)

add_tb(slide, 0.4, 1.4, 12.5, 0.38,
       "A summons (subpoena) is a document commanding the attendance of a witness in a court of law "
       "under penalty on a particular day, time, and place.",
       11, color=C_DKGRAY)

left_bullets = [
    ("What is a Summons?",
     ["• Written document signed by Presiding Magistrate",
      "• Commands attendance on a specific date, time & place",
      "• Issued by court — criminal or civil",
      "• Served by police officer / court officer",
      "• Sent in duplicate (one copy retained by recipient)",
      "• Must be implicitly obeyed",
      "• Non-compliance = Contempt of Court"]),
    ("Types of Summons",
     ["By Nature of Court:",
      "  → Criminal Court Summons",
      "  → Civil Court Summons",
      "By Recipient:",
      "  → To Accused",
      "  → To Witness",
      "  → To Produce Documents"]),
]

right_bullets = [
    ("Conduct Money",
     ["Civil Cases:",
      "• Fee tendered to cover witness travel expenses",
      "• Paid by the party calling the witness",
      "• Paid at time of service of summons",
      "",
      "Criminal Cases:",
      "• No conduct money paid with summons",
      "• Court makes provision for reasonable expenses"]),
    ("Priority Rules (Conflict)",
     ["• Higher court gets preference over lower court",
      "• Criminal courts take precedence over civil courts",
      "• The court that served summons FIRST gets priority",
      "",
      "Consequences of Disobeying:",
      "• Contempt of court proceedings",
      "• Warrant of arrest may be issued",
      "• Fine or imprisonment"]),
]

for i, (title, buls) in enumerate(left_bullets):
    y = 1.88 + i * 2.65
    add_rect(slide, 0.3, y, 6.3, 2.48, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=0.8)
    add_rect(slide, 0.3, y, 6.3, 0.45, fill_rgb=C_NAVY)
    add_tb(slide, 0.42, y+0.05, 6.1, 0.38, title, 12, bold=True, color=C_GOLD)
    tb = slide.shapes.add_textbox(Inches(0.42), Inches(y+0.5), Inches(6.1), Inches(1.85))
    tf = tb.text_frame; tf.word_wrap = True
    tf.margin_left = Pt(3); tf.margin_top = Pt(2)
    p0 = tf.paragraphs[0]
    for j, b in enumerate(buls):
        if j == 0:
            p0.add_run().text = b
            p0.runs[0].font.size = Pt(10)
            p0.runs[0].font.color.rgb = C_DKGRAY
            p0.runs[0].font.name = "Calibri"
        else:
            add_para(tf, b, 10, color=C_DKGRAY)

for i, (title, buls) in enumerate(right_bullets):
    y = 1.88 + i * 2.65
    add_rect(slide, 6.8, y, 6.3, 2.48, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=0.8)
    add_rect(slide, 6.8, y, 6.3, 0.45, fill_rgb=C_NAVY)
    add_tb(slide, 6.92, y+0.05, 6.1, 0.38, title, 12, bold=True, color=C_GOLD)
    tb = slide.shapes.add_textbox(Inches(6.92), Inches(y+0.5), Inches(6.1), Inches(1.85))
    tf = tb.text_frame; tf.word_wrap = True
    tf.margin_left = Pt(3); tf.margin_top = Pt(2)
    p0 = tf.paragraphs[0]
    for j, b in enumerate(buls):
        if j == 0:
            p0.add_run().text = b
            p0.runs[0].font.size = Pt(10)
            p0.runs[0].font.color.rgb = C_DKGRAY
            p0.runs[0].font.name = "Calibri"
        else:
            add_para(tf, b, 10, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 10 – PROCEEDINGS IN COURT
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Proceedings in Court",
           "Standard sequence of legal proceedings from summons to execution")
footer(slide)

steps = [
    ("1", "Subpoena /\nSummons", "Court issues summons to accused / witnesses"),
    ("2", "Oath /\nAffirmation", "Witnesses sworn in; oath/affirmation administered"),
    ("3", "Recording\nof Evidence", "Statements recorded; examination-in-chief & cross-exam"),
    ("4", "Decision of\nJudge / Court", "Judgment delivered based on evidence and law"),
    ("5", "Execution of\nCourt Orders", "Orders enforced — imprisonment, fine, acquittal etc."),
]

arrow_x_gap = 2.5
for i, (num, title, desc) in enumerate(steps):
    x = 0.3 + i * (arrow_x_gap + 0.15)
    y = 2.0
    # box
    add_rect(slide, x, y, 2.4, 3.8, fill_rgb=C_NAVY, line_rgb=C_GOLD, line_pt=1.5)
    # circle number
    add_rect(slide, x+0.75, y+0.2, 0.9, 0.75, fill_rgb=C_GOLD)
    add_tb(slide, x+0.75, y+0.2, 0.9, 0.75, num, 22, bold=True,
           color=C_NAVY, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_tb(slide, x+0.1, y+1.05, 2.2, 0.8, title, 13, bold=True,
           color=C_GOLD, align=PP_ALIGN.CENTER)
    add_tb(slide, x+0.1, y+1.9, 2.2, 1.7, desc, 10, color=C_WHITE,
           align=PP_ALIGN.CENTER)
    # arrow
    if i < len(steps) - 1:
        add_rect(slide, x+2.42, y+1.55, 0.12, 0.7, fill_rgb=C_GOLD)
        # arrowhead (simple triangle via another rect)
        add_rect(slide, x+2.38, y+2.22, 0.22, 0.22, fill_rgb=C_GOLD)

add_tb(slide, 0.3, 6.0, 12.7, 0.6,
       "The court proceeds in an orderly fashion — evidence is recorded, arguments heard, "
       "judgment delivered, and orders executed as per the Code of Criminal Procedure (CrPC) and Indian Evidence Act.",
       10, italic=True, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 11 – KEY LEGAL PROVISIONS
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
slide_bg(slide)
header_bar(slide, "Key Legal Provisions",
           "Important sections of CrPC and Indian Evidence Act")
footer(slide)

provisions = [
    ("CrPC Section 174", "Police inquest in cases of unnatural death; IO must report to Magistrate"),
    ("CrPC Section 176", "Magistrate inquest; mandatory for deaths in police/judicial custody (Sec 176(1A))"),
    ("CrPC Section 311", "Power of court to summon material witness or examine person present at any stage"),
    ("CrPC Section 319", "Power to proceed against persons not originally accused if evidence surfaces during trial"),
    ("Indian Evidence Act Sec 137", "Examination-in-chief, cross-examination, and re-examination defined"),
    ("Indian Evidence Act Sec 154", "Court may declare witness hostile on application by the calling party"),
    ("Indian Evidence Act Sec 165", "Judge may ask any question in any form at any stage to discover truth"),
    ("Constitution Article 124-147", "Establishment and jurisdiction of the Supreme Court of India"),
    ("Constitution Article 214-231", "Establishment and jurisdiction of High Courts in the States"),
]

col1 = provisions[:5]
col2 = provisions[5:]

for i, (section, desc) in enumerate(col1):
    y = 1.45 + i * 1.0
    add_rect(slide, 0.3, y, 2.6, 0.82, fill_rgb=C_NAVY)
    add_tb(slide, 0.35, y+0.08, 2.5, 0.68, section, 10, bold=True,
           color=C_GOLD, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, 2.92, y, 3.6, 0.82, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=0.5)
    add_tb(slide, 3.0, y+0.05, 3.45, 0.72, desc, 10, color=C_DKGRAY)

for i, (section, desc) in enumerate(col2):
    y = 1.45 + i * 1.0
    add_rect(slide, 6.8, y, 2.6, 0.82, fill_rgb=C_NAVY)
    add_tb(slide, 6.85, y+0.08, 2.5, 0.68, section, 10, bold=True,
           color=C_GOLD, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, 9.42, y, 3.6, 0.82, fill_rgb=C_WHITE, line_rgb=C_MID, line_pt=0.5)
    add_tb(slide, 9.5, y+0.05, 3.45, 0.72, desc, 10, color=C_DKGRAY)

# ═══════════════════════════════════════════════════════════════════════════
# SLIDE 12 – SUMMARY / CLOSING
# ═══════════════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, fill_rgb=C_NAVY)
add_rect(slide, 0, 5.8, 13.333, 0.12, fill_rgb=C_GOLD)
add_rect(slide, 0, 5.92, 13.333, 0.05, fill_rgb=C_WHITE)

add_tb(slide, 1, 0.5, 11.3, 0.8, "Key Takeaways", 28, bold=True,
       color=C_GOLD, align=PP_ALIGN.CENTER)

takeaways = [
    "Indian courts are hierarchically organised from the Supreme Court down to 2nd Class Magistrates.",
    "Each court has defined powers of imprisonment, fine, and capital punishment under the CrPC.",
    "Inquest systems (Police, Magistrate, Coroner, Medical Examiner) investigate unnatural deaths.",
    "Witnesses (common & expert) give sworn testimony; examination follows chief → cross → re-examination.",
    "A summons legally compels attendance; non-compliance constitutes contempt of court.",
    "Conduct money is paid in civil cases; court provides reasonable expenses in criminal cases.",
]

for i, t in enumerate(takeaways):
    y = 1.45 + i * 0.68
    add_rect(slide, 0.5, y, 0.5, 0.48, fill_rgb=C_GOLD)
    add_tb(slide, 0.5, y, 0.5, 0.48, str(i+1), 16, bold=True,
           color=C_NAVY, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_tb(slide, 1.12, y+0.04, 11.8, 0.44, t, 12, color=C_WHITE)

add_tb(slide, 1, 6.1, 11.3, 0.4,
       "References: Code of Criminal Procedure (CrPC) | Indian Evidence Act | Constitution of India",
       10, italic=True, color=RGBColor(0xAA,0xCC,0xFF), align=PP_ALIGN.CENTER)

# ── Save ────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/courts-ppt/Types_of_Courts.pptx"
prs.save(out)
print(f"Saved: {out}")
print(f"Slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/courts-ppt && python create_ppt.py

Your presentation is ready! Download it here:

Types of Courts

Presentation · PPTX


What's inside - 12 slides with a professional navy/gold theme:
SlideContent
1Title slide
2Table of Contents / Overview
3Hierarchy of Indian Courts (pyramid-style gradient bars: Supreme Court → Executive Magistrate)
4Powers of Courts - Full table: imprisonment, fines, capital punishment for every court level
5Inquest - Definition, when held, conducting authorities
65 Types of Inquest - Police (u/s 174 CrPC), Executive Magistrate, Judicial Magistrate, Coroner's, Medical Examiner
7Witness - Common witness, Expert witness, Hostile witness, Witness privileges
8Examination of Witness - Chief / Cross / Re-examination / Court examination (u/s 165 IEA)
9Summons - Definition, types, conduct money rules, priority rules, consequences
10Court Proceedings - Step-by-step flow: Summons → Oath → Evidence → Judgment → Execution
11Key Legal Provisions - CrPC Sections 174, 176, 311, 319; IEA Sections 137, 154, 165; Constitutional Articles
12Summary / Key Takeaways
This is a shared conversation. Sign in to Orris to start your own chat.