Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Export Quran Page, Ayah or Word as images #179

Open
naveed-ahmad opened this issue Dec 26, 2024 · 0 comments
Open

Feature Request: Export Quran Page, Ayah or Word as images #179

naveed-ahmad opened this issue Dec 26, 2024 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@naveed-ahmad
Copy link
Contributor

Export Tool

Develop a tool that allows users to export Mushaf pages, Ayahs, or Words as images (PNG/WEBP). This feature should support customization options based on the selected export type and render the output using QUL's export endpoints.

Export Customization Options:

For Mushaf Page:

  • Select Mushaf:
    • Fetch approved Mushaf layouts using:
      Mushaf.approved
      
  • Specify Page Number:
    • Render a dropdown with values from 1 to mushaf.pages_count.

For Ayah:

  • Choose Ayah:
  • Select Script Type:
    • Options:
      • code_v1, code_v2, code_v4
      • text_qpc_hafs, text_uthmani_tajweed
      • text_qpc_nastaleeq, text_indopak_nastaleeq
      • text_digital_khatt
  • Select Font Size:
    • Provide a range slider for font size selection.

For Word:

  • Select Specific Word:
    • Dropdowns for Surah, Ayah, and Word number.
  • Choose Script Type:
    • Same script options as Ayah export.
  • Set Font Size:
    • Use a range slider.

Rendering and Exporting:

  • Use QUL export endpoints to fetch and render content:

    • Word:
      https://qul.tarteel.ai/exports/word?word=2:1:2&script=text_indopak_nastaleeq
      
    • Mushaf Page:
      https://qul.tarteel.ai/exports/mushaf_page?page_number=4&mushaf_id=6
      
    • Ayah:
      https://qul.tarteel.ai/exports/ayah?ayah=1:1&script=text_indopak_nastaleeq&font_size=50
      
  • Convert the rendered HTML to an image (PNG/WEBP) using Headless Chrome or another open-source library.

Outcome:

This tool will make it easy to generate high-quality images for Mushaf pages, Ayahs, or Words in different scripts and styles. These images can be used for:

  • Training AI models.
  • Learning and teaching purposes.
  • Developing new apps.
  • Creating videos and visual resources.
@naveed-ahmad naveed-ahmad added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant