mazipan/baca-quran.id

[Task] Extract Iqra halaman data from PDF using Claude Code CLI (local Mac)

Offen

#521 geöffnet am 02.08.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (127 Forks)auto 404
enhancementfeaturegood first issue

Repository-Metriken

Stars
 (433 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Context

This is a Claude Code CLI task — run this locally on Mac where the full repo (including the PDF) is available.

The Iqra feature lives at /iqra/ and teaches Quran reading in 6 levels (jilid). The data layer for Jilid 1 was manually written from screenshots but needs to be verified and completed. Jilid 2–6 data does not exist yet.

The source PDF is in the repo:

markdowns/Humam - 2000 - Buku Iqro' Cara Cepat Belajar Membaca Al-Qur'an_1-6.pdf

This is a scanned image PDF (not a text PDF). Claude Code CLI can read it visually using the Read tool with the pages parameter.


Existing Data Structure

All Iqra data lives in src/data/iqra/index.ts. The relevant interfaces are:

export interface IqraNewLetter {
  withFathah: string;  // e.g. 'بَ'
  name: string;        // e.g. 'Ba'
  bunyi: string;       // e.g. 'ba'
}

export interface IqraHalaman {
  id: number;
  newLetters: IqraNewLetter[];
  // Each row is an array of groups; each group is an array of letters.
  // Groups reflect the visual columns in the printed Iqra book.
  rows: string[][][];
}

IQRA_1_HALAMAN (14 entries) is already in the file but has approximate groupings — each row currently uses placeholder 2-letter groups (e.g. [['بَ', 'اَ'], ['بَ', 'بَ'], ['اَ', 'بَ']]). Verify and correct the actual groupings from the PDF as part of this task.

The LESSON_COUNT map in src/lib/utils/iqraProgress.ts also needs updating once you know the real halaman counts per jilid.


PDF Page Ranges (approximate)

The PDF is 200 pages covering all 6 jilid. Each jilid is roughly 30–35 pages:

Jilid PDF pages (approx) Book pages Content
1 3–37 1–35 Fathah only; 14 intro halaman + review + PENTING + EBTA
2 38–72 Kasra & Dhammah + connected letter reading
3 73–107 Mad (long vowels: Alif-mad, Ya-mad, Waw-mad)
4 108–142 Tanwin, Syaddah, Sukun
5 143–172 Tajwid Dasar: Waqaf, Nun Sukun, Mim Sukun
6 173–200 Tajwid Lanjutan: Qalqalah, Mad types, huruf muqatta'at

These are estimates — confirm by reading the PDF and noting where each jilid starts/ends.


Task Instructions

Step 1: Determine actual jilid boundaries

Read a few pages around the estimated boundaries to find where each jilid starts. Look for a title page or the first numbered halaman page.

Read({ file_path: "markdowns/Humam - 2000 - Buku Iqro'...", pages: "1-5" })

Step 2: Read Jilid 1 and verify/correct existing data

Read pages 3–37 in chunks of up to 20 pages. For each halaman page:

  • Note the two new letters introduced at the top
  • Transcribe each row exactly as it appears (right-to-left reading order)
  • In the rows array, each row is an array of groups; each group is the set of letters shown together in one visual cell (column)
  • The current Jilid 1 data uses placeholder 2-letter groups — correct these to match the actual book
Read({ file_path: "...", pages: "3-20" })
Read({ file_path: "...", pages: "21-37" })

Compare against the existing IQRA_1_HALAMAN in src/data/iqra/index.ts and correct any inaccurate rows or groupings.

Step 3: Transcribe Jilid 2–6

For each jilid, read it in ≤20-page chunks and produce a new exported array:

  • IQRA_2_HALAMAN — Kasra & Dhammah
  • IQRA_3_HALAMAN — Mad (long vowels)
  • IQRA_4_HALAMAN — Tanwin, Syaddah, Sukun
  • IQRA_5_HALAMAN — Tajwid Dasar
  • IQRA_6_HALAMAN — Tajwid Lanjutan

Step 4: Update data file and counts

Add the new arrays to src/data/iqra/index.ts and update LESSON_COUNT in src/lib/utils/iqraProgress.ts:

// src/lib/utils/iqraProgress.ts
export const LESSON_COUNT: Record<number, number> = {
  1: 14,   // update to actual halaman count
  2: ??,   // fill in after reading PDF
  3: ??,
  4: ??,
  5: ??,
  6: ??
};

Also update IQRA_LEVELS in src/data/iqra/index.ts — set available: true for jilid that have data.

Step 5: Verify

pnpm check
pnpm lint

Expected Output Format

Each jilid array follows this pattern. Do not invent content — transcribe exactly from the PDF:

export const IQRA_2_HALAMAN: IqraHalaman[] = [
  {
    id: 1,
    newLetters: [
      { withFathah: 'بِ', name: 'Ba kasra', bunyi: 'bi' },
      { withFathah: 'بُ', name: 'Ba dhammah', bunyi: 'bu' }
    ],
    rows: [
      // Each row is an array of groups; each group is the set of letters shown together in one visual cell.
      // Transcribe exactly as shown on the page; group letters as they appear together in each column.
      [['بَ', 'بُ'], ['بِ', 'بَ'], ['بُ', 'بِ']],
      [['تَ', 'بُ'], ['تِ', 'بِ'], ['تُ', 'بَ']],
      // ...6 rows total
    ]
  },
  // ...continue for all halaman in Jilid 2
];

For the newLetters field in Jilid 2–6, the withFathah field name is a misnomer for non-fathah jilid — use it to store the primary form shown in the header (e.g. 'بِ' for kasra form).


Notes on Scanned Image PDFs

  • Claude reads scanned PDFs visually — treat each page as an image
  • Arabic letters with harakat (vowel marks) should be transcribed with their Unicode combining characters: fathah ◌َ (U+064E), kasra ◌ِ (U+0650), dhammah ◌ُ (U+064F)
  • If a row is unclear due to scan quality, note it with a // TODO: verify comment
  • The last row of each halaman is typically a connected/compound form — keep it as a multi-character string in a single-item group (e.g. [['اَبَ'], ['اَبَ'], ['اَبَ']])
  • Read at most 20 pages per Read call to stay within limits

Related Issues

  • #506 Epic: Iqra Learning Method
  • #509 Jilid 1 (partially done — core 14 halaman implemented, needs grouping verification)
  • #510 Jilid 2
  • #511 Jilid 3
  • #512 Jilid 4
  • #514 Jilid 5
  • #515 Jilid 6

Contributor Guide