Generate RTL Word exports for all main Persian product docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+26
-11
@@ -34,8 +34,8 @@ PRESETS = {
|
||||
"roadmap": {
|
||||
"md": "راهنما-و-نقشه-راه.md",
|
||||
"docx": "راهنما-و-نقشه-راه.docx",
|
||||
"header": "سند محصول و نقشه راه CRM",
|
||||
"footer": "راهنما و نقشه راه ساخت CRM | نسخه ۰.۵ | آمادهی شروع",
|
||||
"header": "راهنما و نقشه راه منتو (Mento CRM)",
|
||||
"footer": "نقشه راه منتو | نسخه ۱.۰ | وضعیت زنده محصول",
|
||||
},
|
||||
"user-guide": {
|
||||
"md": "راهنمای-کاربری.md",
|
||||
@@ -43,6 +43,18 @@ PRESETS = {
|
||||
"header": "راهنمای کاربری منتو (Mento CRM)",
|
||||
"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.add_argument(
|
||||
"--preset",
|
||||
choices=sorted(PRESETS.keys()),
|
||||
choices=[*sorted(PRESETS.keys()), "all"],
|
||||
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()
|
||||
preset = PRESETS[args.preset]
|
||||
convert(
|
||||
ROOT / preset["md"],
|
||||
ROOT / preset["docx"],
|
||||
preset["header"],
|
||||
preset["footer"],
|
||||
)
|
||||
names = sorted(PRESETS.keys()) if args.preset == "all" else [args.preset]
|
||||
for name in names:
|
||||
preset = PRESETS[name]
|
||||
convert(
|
||||
ROOT / preset["md"],
|
||||
ROOT / preset["docx"],
|
||||
preset["header"],
|
||||
preset["footer"],
|
||||
)
|
||||
print(f"OK preset={name}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user