a quick script to convert Mushaf AlMadinah to a notebook for Hifz.
the script is not written to be generic with any mushaf, but to accomplish a one-off task. so there is no warranties for using that script.
- loop on the pdf file extracting the image representing every page
- paste a 15-line page template on each mushaf page
- detect locations of
ayat separator
(s) - paste a no-text version of
ayat separator
on the page - detect locations of
soura separator
(s) - paste a no-text version of
soura separator
on the page - output each page as an image to output directory
- use imagemagic to collect processed images in one pdf file
- the script outputs collected pdf file instead of writing images to desk
- python converter.py path/to/the/pdf/file
- cd data/output
- convert *.jpg hefz.pdf