Skip to content
/ VONG-CS Public

VRI Tipitaka Omniscript: Transliterating to 20+ scripts with PDF/HTML/TXT Nobleformat output.

Notifications You must be signed in to change notification settings

kit119/VONG-CS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRI Omniscript Nobleformat Glyphs (VONG)

VONG is a specialized toolkit designed to process and transform the Vipassana Research Institute (VRI) Tipitaka XML data into various regional scripts and high-quality PDF formats.

This project builds upon the foundational data from Github VipassanaTech/tipitaka-xml, extending its reach through automated transliteration and web-based rendering.

🌟 Key Features

  • Omniscript Support: Converts Devanagari source text into 20+ scripts (10 INDIC 10 ASIA and Special) including Thai, Burmese, Sinhala, Devanagari, IPA, Braille, and more.
  • Nobleformat Support: Delivers high-fidelity outputs in HTM, TXT, and PDF formats, supporting both online previewing and offline study. Notably, the HTM experience provides a dynamic environment for experimentation with CSS selectors, font-family adjustments, and layout rendering.
  • Automated Workflow: Uses C# (.NET Core) for fast script conversion and Batch scripts for parallel PDF generation.
  • High-Quality Output: Utilizes headless Chrome for precision PDF rendering and cpdfsqueeze for file size optimization.
  • Web-Ready: Includes a built-in Python-based local server for previewing and rendering.

VONG คือชุดเครื่องมือพิเศษที่ออกแบบมาเพื่อประมวลผลและแปลงข้อมูลพระไตรปิฎก XML จากสถาบันวิจัยวิปัสสนา (VRI) ไปสู่ภาษาและอักษรท้องถิ่นต่างๆ พร้อมทั้งจัดทำเอกสาร PDF คุณภาพสูงโปรเจกต์นี้ต่อยอดมาจากข้อมูลต้นทางของ VipassanaTech/tipitaka-xml โดยเพิ่มความสามารถในการปริวรรตอักษร (Transliteration) อัตโนมัติและการแสดงผลผ่านระบบเว็บ

🌟 คุณสมบัติ

  • รองรับหลากหลายอักษร (Omniscript): สามารถแปลงข้อความต้นฉบับเทวนาครีไปเป็นอักษรต่าง ๆ ได้มากกว่า 20 รูปแบบ (แบ่งเป็น 10 อักษรกลุ่มอินเดีย, 10 อักษรกลุ่มเอเชีย และอักษรพิเศษ) ครอบคลุมทั้งอักษรไทย, พม่า, สิงหล, เทวนาครี, สัทอักษรสากล, อักษรเบรลล์ และอื่น ๆ อีกมากมาย
  • การรองรับหลากรูปแบบ: ให้ผลลัพธ์คุณภาพสูงในรูปแบบ HTM, TXT และ PDF เพื่อรองรับทั้งการอ่านและการทดลองปรับแต่ง ทั้งในรูปแบบการดูตัวอย่างออนไลน์และศึกษาแบบออฟไลน์ โดยเฉพาะไฟล์รูปแบบ HTM ที่เปิดโอกาสให้ผู้ใช้สามารถทดลองปรับแต่ง CSS Selectors, ตระกูลฟอนต์ (Font-family) และการจัดเลย์เอาต์ได้อย่างยืดหยุ่น
  • การทำงานอัตโนมัติ: ใช้ C# (.NET Core) ในการแปลงอักษรอย่างรวดเร็ว และใช้ Batch scripts ในการสั่งงานขนาน (Parallel) เพื่อสร้าง PDF
  • ผลลัพธ์คุณภาพสูง: ใช้ Headless Chrome ในการเรนเดอร์ PDF และ cpdfsqueeze เพื่อบีบอัดขนาดไฟล์ให้เหมาะสมพร้อมใช้งานบนเว็บ: มีระบบ Python local server ในตัวสำหรับแสดงผลและประมวลผล

🛠 Technical Architecture / โครงสร้างทางเทคนิค

The system operates in a simple-stage pipeline: ระบบทำงานผ่าน ขั้นตอนหลัก:

  • Compilation & Conversion (_compile_n_run.bat): Compiles the C# transliteration scripts (e.g., deva2thai.cs) and processes the VRI XML files. คอมไพล์สคริปต์ C# (เช่น deva2thai.cs) และประมวลผลไฟล์ XML ต้นทาง
  • Web Serving (_pyserv.bat): Hosts the transformed content locally on port 8000. จำลอง Server ภายในเครื่องที่พอร์ต 8000 เพื่อรอการเรนเดอร์
  • PDF Generation (_chrome_to_pdf.bat & _chromeprint.bat): Automates headless Chrome to "print" the web pages into optimized PDF files. สั่งการ Chrome ให้ "พิมพ์" หน้าเว็บออกมาเป็นไฟล์ PDF โดยอัตโนมัติ

🎨 CSS Selectors & Font ConfigurationTo ensure correct rendering across different scripts, specific CSS selectors are used. Below are the recommended configurations for Thai and Lann scripts:

เพื่อให้การแสดงผลอักษรแต่ละภาษาถูกต้อง จะมีการใช้ CSS Selectors เฉพาะเจาะจง ดังนี้:

Thai Script CSS /* สำหรับอักษรไทย / .script-thai { font-family: 'Sarabun', 'TH Sarabun New', sans-serif; line-height: 1.6; / Increased spacing for stacking characters */ font-size: 1.2em; }

Lann Script (Tai Tham) CSS /* สำหรับอักษรธรรมล้านนา / .script-lann { font-family: 'Lanna Alif', 'Lamphun', sans-serif; line-height: 2.0; / Increased spacing for stacking characters */ font-size: 1.4em; }


📦 Data Distribution (Internet Archive)

Data & Downloads: To keep the repository lightweight, only source code is hosted here. Complete pre-rendered sets (PDF, HTML, TXT) for each script can be downloaded from our Internet Archive collection. ดาวน์โหลดข้อมูล: เพื่อประหยัดพื้นที่บน Repository เราจะเก็บเฉพาะซอร์สโค้ดไว้ที่นี่ สำหรับไฟล์ที่เรนเดอร์สำเร็จรูปแล้ว (PDF, HTML, TXT) ทั้งหมด 23 ภาษา (รวมภาษาไทย) ท่านสามารถดาวน์โหลดได้จาก Internet Archive ตามลิงก์ด้านล่างนี้ครับ

The processed outputs are categorized by script and published to the Internet Archive (IA) under the following identifiers: ข้อมูลที่ประมวลผลแล้วจะถูกเผยแพร่บน Internet Archive (IA) โดยใช้รหัสอ้างอิงแยกตามอักษร ดังนี้:

จัดให้เลยครับ! ปัญหาที่มันยัง "ติดเป็นพืด" เกิดจาก Markdown ของ GitHub ไม่รู้จักการเคาะ Space bar เยอะๆ เพื่อทำคอลัมน์ครับ

เพื่อให้สวยงามและขึ้นบรรทัดใหม่แน่นอน ให้ก๊อปปี้ข้อความในช่อง Code ด้านล่างนี้ไปวางทั้งหมด (ทับของเก่า) ผมแก้เป็นระบบ "List" (รายการ) ซึ่งจะบังคับให้ขึ้นบรรทัดใหม่ 100% และคลิกง่ายกว่าเดิมครับ:

INDIC Scripts

ASIA Scripts

SPECIAL Scripts


🚀 How to Run / วิธีใช้งาน

  1. Prepare XML: Place your VRI XML files in the deva/ directory.
  2. Run Conversion: Execute _compile_n_run.bat followed by the script name (e.g., deva2thai.cs).
  3. Start Server: Run _pyserv.bat.
  4. Export PDF: Run _chrome_to_pdf.bat to generate all documents.

Releases

No releases published

Packages

No packages published

Languages