from docx import Document
from docx.shared import Inches

# Create a new Word document
doc = Document()
doc.add_heading(‘قرآنی ترجمہ و تفسیر کی املا و اصلاحی فہرست’, level=1)

doc.add_paragraph(
“یہ فہرست ہر تصحیح کنندہ کے لیے ایک رہنما ٹیمپلیٹ ہے تاکہ وہ اپنی کی گئی ترامیم اور تجاویز کو منظم انداز میں درج کر سکیں۔”
)

# Create a table with columns: Serial, Original Word, Corrected Word, Context/Reference, Notes
table = doc.add_table(rows=1, cols=5)
table.style = ‘Table Grid’

# Set column headings
hdr_cells = table.rows[0].cells
hdr_cells[0].text = ‘نمبر شمار’
hdr_cells[1].text = ‘اصل لفظ/ترجمہ’
hdr_cells[2].text = ‘درست شدہ لفظ/ترجمہ’
hdr_cells[3].text = ‘سیاق / ریفرنس (آیت / پمفلٹ وغیرہ)’
hdr_cells[4].text = ‘نوٹس / وجوہات’

# Add a few blank rows for example entries
for i in range(5):
row_cells = table.add_row().cells
row_cells[0].text = str(i+1)
row_cells[1].text = ”
row_cells[2].text = ”
row_cells[3].text = ”
row_cells[4].text = ”

# Save the document
file_path = “/mnt/data/Correction_Log_Template.docx”
doc.save(file_path)

file_path