Builds a PDF booklet of Targum Onkelos (Taj / תאג edition) by scraping Hebrew Wikisource.
An example PDF (first parsha only, 6 perakim) is included in this folder:
- onkelos_test.pdf — sample output showing parsha/perek headers and next-perek indicators.
- Running headers: Each page shows the current parsha and perek (e.g.
בְּרֵאשִׁית · פֶּרֶק א). - Next perek indicator: At the end of each perek, the booklet prints the upcoming perek (e.g.
הַבָּא: פרק ב).
cd onkelos_booklet
pip install -r requirements.txtFonts: the PDF uses system Hebrew fonts (David, Times New Roman). Optionally add assets/fonts/HADASAH.TTF and uncomment the @font-face in assets/styles.css for a custom font.
Generate the full booklet (all 54 parshiyot; can take a few minutes):
python booklet_generator.pyTest with only the first parsha:
python booklet_generator.py --limit 1Custom output path:
python booklet_generator.py -o my_onkelos.pdf- PDF:
output/onkelos_booklet_YYYYMMDD_HHMMSS.pdf - Debug HTML:
output/onkelos_debug.html
Text is fetched from:
- תרגום אונקלוס – ויקיטקסט (מהדורת התאג׳).