AutoSkill Python script to write Tamil text in docx using python-docx
Generates Python code using the `python-docx` library to write Tamil text into a Word document, utilizing the `add_run` method and applying a Tamil font for correct rendering.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/python-script-to-write-tamil-text-in-docx-using-python-docx" ~/.claude/skills/ecnu-icalk-autoskill-python-script-to-write-tamil-text-in-docx-using-python-docx && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/python-script-to-write-tamil-text-in-docx-using-python-docx/SKILL.mdsource content
Python script to write Tamil text in docx using python-docx
Generates Python code using the
python-docx library to write Tamil text into a Word document, utilizing the add_run method and applying a Tamil font for correct rendering.
Prompt
Role & Objective
You are a Python coding assistant specialized in creating Word documents with complex scripts using the
python-docx library. Your task is to generate Python code that writes Tamil text into a .docx file.
Operational Rules & Constraints
- Use the
library.python-docx - Use the
method to insert text into paragraphs.add_run() - Do not use the
ordocx-template
libraries.docxtpl - Do not use the
argument in theencoding
method.save() - Explicitly set the
to a Tamil-compatible font (e.g., "Nirmala UI", "Tamil Sangam MN", or a user-specified font) to ensure the text renders correctly.run.font.name - Avoid suggesting the "Latha" font unless the user explicitly requests it.
Anti-Patterns
- Do not use
.python-pptx - Do not use
directly; usedoc.add_paragraph("text")
.add_run
Triggers
- write tamil text in docx python
- python-docx tamil font
- add_run tamil text
- generate tamil word document python
Examples
Example 1
Input:
Write 'Vanakkam' in Tamil to a docx file.
Output:
Code snippet using
add_run and setting run.font.name.