Generate RTL Word exports for all main Persian product docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 02:53:41 +03:30
co-authored by Cursor
parent 40d492cb5a
commit a88bd83c9b
5 changed files with 26 additions and 11 deletions
+26 -11
View File
@@ -34,8 +34,8 @@ PRESETS = {
"roadmap": { "roadmap": {
"md": "راهنما-و-نقشه-راه.md", "md": "راهنما-و-نقشه-راه.md",
"docx": "راهنما-و-نقشه-راه.docx", "docx": "راهنما-و-نقشه-راه.docx",
"header": "سند محصول و نقشه راه CRM", "header": "راهنما و نقشه راه منتو (Mento CRM)",
"footer": "راهنما و نقشه راه ساخت CRM | نسخه ۰.۵ | آماده‌ی شروع", "footer": "نقشه راه منتو | نسخه ۱.۰ | وضعیت زنده محصول",
}, },
"user-guide": { "user-guide": {
"md": "راهنمای-کاربری.md", "md": "راهنمای-کاربری.md",
@@ -43,6 +43,18 @@ PRESETS = {
"header": "راهنمای کاربری منتو (Mento CRM)", "header": "راهنمای کاربری منتو (Mento CRM)",
"footer": "راهنمای کاربری منتو | آموزش گام‌به‌گام برای همه همکاران", "footer": "راهنمای کاربری منتو | آموزش گام‌به‌گام برای همه همکاران",
}, },
"features": {
"md": "قابلیت‌های-منتو.md",
"docx": "قابلیت‌های-منتو.docx",
"header": "قابلیت‌های منتو (Mento CRM)",
"footer": "فهرست قابلیت‌های محصول | تیتر + توضیح مختصر",
},
"progress": {
"md": "وضعیت-پیشرفت.md",
"docx": "وضعیت-پیشرفت.docx",
"header": "وضعیت پیشرفت منتو (Mento CRM)",
"footer": "چک‌لیست زنده کارها | سند وضعیت پیشرفت",
},
} }
@@ -392,18 +404,21 @@ def main():
parser = argparse.ArgumentParser(description="Export Persian markdown docs to RTL DOCX") parser = argparse.ArgumentParser(description="Export Persian markdown docs to RTL DOCX")
parser.add_argument( parser.add_argument(
"--preset", "--preset",
choices=sorted(PRESETS.keys()), choices=[*sorted(PRESETS.keys()), "all"],
default="user-guide", default="user-guide",
help="Built-in document preset (default: user-guide)", help="Built-in document preset (default: user-guide). Use 'all' to export every preset.",
) )
args = parser.parse_args() args = parser.parse_args()
preset = PRESETS[args.preset] names = sorted(PRESETS.keys()) if args.preset == "all" else [args.preset]
convert( for name in names:
ROOT / preset["md"], preset = PRESETS[name]
ROOT / preset["docx"], convert(
preset["header"], ROOT / preset["md"],
preset["footer"], ROOT / preset["docx"],
) preset["header"],
preset["footer"],
)
print(f"OK preset={name}")
if __name__ == "__main__": if __name__ == "__main__":
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.