quran.com-images icon indicating copy to clipboard operation
quran.com-images copied to clipboard

How to derive the actual sura_number for sura or bismillah line types?

Open AlGantori opened this issue 3 years ago • 1 comments

I am able to generate the line types for page 604 with a query like so

image

I can cross-reference the sura_number by joining the glyph_ayah table like so:

image

However, the above only works for "ayah" line types because the glyph_ids for sura and bismillah types are not in glyph_ayah table.

Did I miss something? like a glyph_sura and glyph_bismillah table :)

or is this info you never needed in this image generating project.

Any pointers would be helpful. Thank you.

AlGantori avatar Feb 28 '21 08:02 AlGantori

At least for Sura, you can get the respective details by: select gpl.page_number, gpl.line_number, glyph_type_meta as sura from glyph_page_line as gpl left join glyph on gpl.glyph_id = glyph.glyph_id where gpl.page_number=604 and glyph_type_meta <> 0 and line_type='sura'; image

murtraja avatar May 09 '21 03:05 murtraja