Date: 2026-02-25 Status: Superseded by TRACK-071 (most items completed via new TOC-based approach) Scope: End-to-end fix of the Dikshitar krithi import pipeline — from PDF extraction through PostgreSQL seeding to frontend display Context: Original pipeline had multiple issues documented below. TRACK-071 replaced the broken extraction with a TOC-based approach that resolved most issues.
mdeng.pdf / mdskt.pdf
↓ [REPLACED] extract_eng_pymupdf.py → extract_toc_based.py
↓ eng_krithis.json / skt_krithis.json
↓ [REPLACED] import_matched_csv.py → import_dikshitar_krithis.py (standalone)
PostgreSQL (krithis, krithi_sections, krithi_lyric_variants, krithi_lyric_sections)
↓ [FIXED] Admin Web /krithis table with search, pagination, filters
extract_eng_pymupdf.py)page.get_text("markdown") with page.get_text("dict") to get structured text with font metadata (done in extract_toc_based.py)pallavi, anupallavi, caranam, madhyamakālasāhityam)madhyamakālasāhityam as a distinct section keynoṭṭusvara sāhityam (nottusvara compositions) mapped to pallavisamaṣṭicaraṇam (samashti charanam) as distinct sectionget_text("dict") mode does not produce base64 images; Maltese cross artifacts stripped via regexeng_krithis.json and skt_krithis.jsoneng_krithis.json from fixed extractoreng_krithis.json_clean_raga_name() strips melakarta numbers (28), fixes double-vowel OCR artifacts (āarabhi → ārabhi)skt_krithis.json with Devanagari contentvelthuis_decoder.py maps 155 glyphs but insufficient for full extraction)import_krithis.py: pallavi → anupallavi → charanam → samashti_charanam → madhyamakala → chittaswaram → swara_sahityaimport_matched_csv.pyte)import_krithis.py sets primary_language = 'sa' for all Dikshitar krithisSECTION_ORDER dict in import_krithis.pymadhyamakala section type mappingMADHYAMA_KALA DB enum correctlyget_text("dict") mode doesn’t produce base64 dataen_lyrics_full / sa_lyrics_full concatenationimport_krithis.pyimport_krithis.pyaudit_log table with action=’IMPORT’mise exec -- cargo run --manifest-path tools/sangita-cli/Cargo.toml -- db reset completedSELECT COUNT(*) FROM krithis WHERE primary_language = 'sa'; → 484 ✓SELECT COUNT(*) FROM krithis WHERE primary_language = 'te'; → 1 (seed) ✓SELECT COUNT(*) FROM krithi_sections WHERE section_type = 'PALLAVI'; → 484 ✓SELECT COUNT(*) FROM krithi_lyric_sections WHERE text LIKE '%data:image%'; → 0 ✓akhilāṇḍeśvari rakṣa mām — pallavi, anupallavi, charanam, madhyamakala all populated ✓jujāvanti, ārabhi) via backend join on krithi_ragas + ragasSA for all Dikshitar krithis (raw ISO code display; human-readable labels deferred)MADHYAMA_KALA as a first-class section typeMADHYAMA_KALA enum value exists in DB schema ✓title_normalized and incipit_normalized populated with ASCII-stripped values using strip_diacritics() SQL functionśrī titles (148 results) ✓searchKrithis() API client updated to pass page and pageSize params/v1/ragas and /v1/composers endpointsVITE_API_BASE_URL changed from http://localhost:8080 to /v1 (uses Vite proxy)FRONTEND_PORT=5001 added to config/local.env for correct CORS originRef: application_documentation/04-database/schema.md · database/for_import/ · TRACK-071