Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/68fea442-48bc-800c-b7d2-865ba4c72a54
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: ممتاز يا فنان العالمي 🌍🎬 === ممتاز يا فنان العالمي 🌍🎬 سأجهز لك الآن سكربت Python جاهز لتحويل الملف النصي العالمي للقصة إلى ePub متعدد اللغات تلقائيًا. بعد تشغيله على جهازك، ستحصل على ePub جاهز للقراءة على أي قارئ رقمي مثل Kindle أو iBooks. <syntaxhighlight lang="python"># سكربت Python لتحويل نص القصة العالمي إلى ePub متعدد اللغات === تحتاج لتثبيت مكتبة ebooklib: pip install ebooklib === from ebooklib import epub === اسم ملف ePub الناتج === epub_file = 'بعد_الموت_ما_فيش_فرصة_هاني_حليم_عالمي.epub' === تعريف الترجمات داخل قاموس === translations = { "النص العربي": "هنا ضع النص العربي الكامل", "English Version": "هنا ضع النص الإنجليزي الكامل", "Version Française": "هنا ضع النص الفرنسي الكامل", "Versión Española": "هنا ضع النص الإسباني الكامل", "Deutsch Version": "هنا ضع النص الألماني الكامل", "Versione Italiana": "هنا ضع النص الإيطالي الكامل", "Русская версия": "هنا ضع النص الروسي الكامل", "中文版本": "هنا ضع النص الصيني الكامل", "日本語版": "هنا ضع النص الياباني الكامل", "한국어 버전": "هنا ضع النص الكوري الكامل", "हिन्दी संस्करण": "हिंदी में पूरा पाठ यहाँ डालें" } === إنشاء الكتاب === book = epub.EpubBook() book.set_identifier('id123456') book.set_title('بعد الموت ما فيش فرصة - Hani Halim') book.set_language('ar') book.add_author('هاني حليم') === إضافة فصول لكل لغة === for lang, text in translations.items(): chapter = epub.EpubHtml(title=lang, file_name=f'{lang}.xhtml', lang='ar') chapter.content = f'<h1>{lang}</h1><p>{text.replace(chr(10), "<br/>")}</p>' book.add_item(chapter) book.spine.append(chapter) book.toc = book.toc + (epub.Link(f'{lang}.xhtml', lang, lang),) === إضافة NCX وNav === book.add_item(epub.EpubNcx()) book.add_item(epub.EpubNav()) === حفظ الكتاب === epub.write_epub(epub_file, book) print(f"تم إنشاء ملف ePub بنجاح: {epub_file}") </syntaxhighlight> ✅ بعد وضع كل النصوص المترجمة في القاموس، وتشغيل السكربت على جهازك، ستحصل على ePub كامل لجميع اللغات العالمية. إذا أحببت، أستطيع تجهيز نسخة جاهزة للنشر مباشرة لك تحتوي على جميع الترجمات مدرجة لتصبح عملية التشغيل مباشرة بدون أي تعديل. هل تريد أن أفعل ذلك الآن؟
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)