Skip to content

Commit

Permalink
Add Hebrew Bible PDF and HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-sketch committed Dec 31, 2024
1 parent f64cbee commit cdc593b
Show file tree
Hide file tree
Showing 6 changed files with 26,169 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
/proxy-server/node_modules
/app
*.zip
*.zip
/.venv/*
25,917 changes: 25,917 additions & 0 deletions docs/assets/hebrew_bible.html

Large diffs are not rendered by default.

Binary file added docs/assets/hebrew_bible.pdf
Binary file not shown.
198 changes: 198 additions & 0 deletions docs/pdf/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="he" dir="rtl">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>תנ״ך להורדה ב-PDF | Hebrew Bible PDF Download</title>
<meta name="description"
content="הורדת התנ״ך בפורמט PDF. תנ״ך מלא להורדה חינם בפורמט PDF. תנ״ך עברי להורדה בפורמט PDF.">
<meta name="keywords" content="תנ״ך, התנ״ך, תנ״ך PDF, התנ״ך PDF, תנ״ך עברי, התנ״ך עברי, תנ״ך להורדה, התנ״ך להורדה">
<meta name="author" content="Dor Pascal">
<meta name="robots" content="index, follow">
<meta property="og:title" content="תנ״ך להורדה ב-PDF | Hebrew Bible PDF Download">
<meta property="og:description"
content="הורדת התנ״ך בפורמט PDF. תנ״ך מלא להורדה חינם בפורמט PDF. תנ״ך עברי להורדה בפורמט PDF.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://dorpascal.com/tanakh/pdf/">
<link rel="canonical" href="https://dorpascal.com/tanakh/pdf/">
<meta name="apple-itunes-app" content="app-id=6736739283">
<style>
@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400;700&display=swap');

:root {
--primary-color: #2c3e50;
--accent-color: #e67e22;
--background-color: #ecf0f1;
}

body {
font-family: 'Frank Ruhl Libre', serif;
background-color: var(--background-color);
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}

.container {
max-width: 800px;
width: 100%;
margin: 0 auto;
background: white;
padding: 2rem;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
color: var(--primary-color);
text-align: center;
margin-bottom: 1.5rem;
}

.download-section {
text-align: center;
margin: 2rem 0;
}

.download-button {
background-color: var(--accent-color);
color: white;
padding: 1rem 2rem;
border: none;
border-radius: 5px;
font-size: 1.2rem;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 10px;
transition: background-color 0.3s ease;
}

.download-button:hover {
background-color: #d35400;
}

.preview {
margin-top: 2rem;
padding: 1rem;
background: #f8f9fa;
border-radius: 5px;
border: 1px solid #dee2e6;
}

.preview h2 {
color: var(--primary-color);
margin-bottom: 1rem;
}

.verse {
margin: 0.5rem 0;
line-height: 1.6;
}

.verse-number {
font-weight: bold;
color: var(--accent-color);
margin-left: 0.5rem;
}

.back-link {
color: var(--primary-color);
text-decoration: none;
margin-top: 2rem;
display: inline-block;
}

.back-link:hover {
text-decoration: underline;
}

.pdf-icon {
width: 24px;
height: 24px;
vertical-align: middle;
}

.app-icon {
width: 170px;
height: 170px;
overflow: hidden;
display: flex;
vertical-align: middle;
margin: 0 auto;
--app-icon-mask: url('data:image/svg+xml,%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%20230.5%20230.5%22%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.4%22%20clip-rule%3D%22evenodd%22%20d%3D%22M158.2%20230H64.1a320%20320%200%200%201-7-.1c-5%200-10-.5-15-1.3a50.8%2050.8%200%200%201-14.4-4.8%2048.2%2048.2%200%200%201-21-21%2050.9%2050.9%200%200%201-4.8-14.4%20100.7%20100.7%200%200%201-1.3-15v-7l-.1-8.2V64.1a320%20320%200%200%201%20.1-7c0-5%20.5-10%201.3-15a50.7%2050.7%200%200%201%204.8-14.4%2048.2%2048.2%200%200%201%2021-21%2051%2051%200%200%201%2014.4-4.8c5-.8%2010-1.2%2015-1.3a320%20320%200%200%201%207%200l8.2-.1h94.1a320%20320%200%200%201%207%20.1c50%2010%20.5%2015%201.3a52%2052%200%200%201%2014.4%204.8%2048.2%2048.2%200%200%201%2021%2021%2050.9%2050.9%200%200%201%204.8%2014.4c.8%205%201.2%2010%201.3%2015a320%20320%200%200%201%20.1%207v102.3l-.1%207c0%205-.5%2010-1.3%2015a50.7%2050.7%200%200%201-4.8%2014.4%2048.2%2048.2%200%200%201-21%2021%2050.8%2050.8%200%200%201-14.4%204.8c-5%20.8-10%201.2-15%201.3a320%20320%200%200%201-7%200l-8.2.1z%22%2F%3E%0A%3C%2Fsvg%3E%0A');

}
</style>
</head>

<body>
<div class="container">
<div class="app-icon" style="position: relative;">

<a href="https://apps.apple.com/us/app/tanakh-pro/id6736739283?itscg=30200&itsct=apps_box_artwork&mttnsubad=6736739283"
style="position: relative; width: 170px; height: 170px; overflow: hidden; display: inline-block; vertical-align: middle;
--app-icon-mask: url('data:image/svg+xml,%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%20230.5%20230.5%22%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.4%22%20clip-rule%3D%22evenodd%22%20d%3D%22M158.2%20230H64.1a320%20320%200%200%201-7-.1c-5%200-10-.5-15-1.3a50.8%2050.8%200%200%201-14.4-4.8%2048.2%2048.2%200%200%201-21-21%2050.9%2050.9%200%200%201-4.8-14.4%20100.7%20100.7%200%200%201-1.3-15v-7l-.1-8.2V64.1a320%20320%200%200%201%20.1-7c0-5%20.5-10%201.3-15a50.7%2050.7%200%200%201%204.8-14.4%2048.2%2048.2%200%200%201%2021-21%2051%2051%200%200%201%2014.4-4.8c5-.8%2010-1.2%2015-1.3a320%20320%200%200%201%207%200l8.2-.1h94.1a320%20320%200%200%201%207%20.1c5%200%2010%20.5%2015%201.3a52%2052%200%200%201%2014.4%204.8%2048.2%2048.2%200%200%201%2021%2021%2050.9%2050.9%200%200%201%204.8%2014.4c.8%205%201.2%2010%201.3%2015a320%20320%200%200%201%20.1%207v102.3l-.1%207c0%205-.5%2010-1.3%2015a50.7%2050.7%200%200%201-4.8%2014.4%2048.2%2048.2%200%200%201-21%2021%2050.8%2050.8%200%200%201-14.4%204.8c-5%20.8-10%201.2-15%201.3a320%20320%200%200%201-7%200l-8.2.1z%22%2F%3E%0A%3C%2Fsvg%3E%0A');">

<img src="https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/d7/c9/05/d7c905b8-4d0a-742e-54b0-5592a4fb0039/AppIcon-0-0-1x_U007epad-0-1-85-220.png/540x540bb.jpg"
alt="Tanakh Pro" style="width: 100%; height: 100%; object-fit: contain;
mask-image: var(--app-icon-mask); -webkit-mask-image: var(--app-icon-mask);" />

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 230.5 230.5"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; box-sizing: border-box;">
<path fill="none" stroke="#000" stroke-linejoin="round" stroke-miterlimit="1.4" stroke-opacity=".1"
stroke-width="1"
d="M158.2 230H64.1a320 320 0 0 1-7-.1c-5 0-10-.5-15-1.3a50.8 50.8 0 0 1-14.4-4.8 48.2 48.2 0 0 1-21-21 50.9 50.9 0 0 1-4.8-14.4 100.7 100.7 0 0 1-1.3-15v-7l-.1-8.2V64.1a320 320 0 0 1 .1-7c0-5 .5-10 1.3-15a50.7 50.7 0 0 1 4.8-14.4 48.2 48.2 0 0 1 21-21 51 51 0 0 1 14.4-4.8c5-.8 10-1.2 15-1.3a320 320 0 0 1 7 0l8.2-.1h94.1a320 320 0 0 1 7 .1c5 0 10 .5 15 1.3a52 52 0 0 1 14.4 4.8 48.2 48.2 0 0 1 21 21 50.9 50.9 0 0 1 4.8 14.4c.8 5 1.2 10 1.3 15a320 320 0 0 1 .1 7v102.3l-.1 7c0 5-.5 10-1.3 15a50.7 50.7 0 0 1-4.8 14.4 48.2 48.2 0 0 1-21 21 50.8 50.8 0 0 1-14.4 4.8c-5 .8-10 1.2-15 1.3a320 320 0 0 1-7 0l-8.2.1z"
clip-rule="evenodd" vector-effect="non-scaling-stroke" />
</svg>
</a>
</div>

<h1>הורדת התנ״ך בפורמט PDF</h1>

<div class="download-section">
<a href="../assets/hebrew_bible.pdf" class="download-button" download>
<svg class="pdf-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="12" y1="18" x2="12" y2="12"></line>
<line x1="9" y1="15" x2="15" y2="15"></line>
</svg>
הורד את התנ״ך PDF
</a>
</div>

<div class="preview">
<h2>תצוגה מקדימה:</h2>
<p class="verse">
<span class="verse-number">א׳</span>
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
</p>
<p class="verse">
<span class="verse-number">ב׳</span>
וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֙הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְה֑וֹם וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת
עַל־פְּנֵ֥י הַמָּֽיִם׃
</p>
</div>

<a href="https://dorpascal.com/tanakh/" class="back-link">← חזרה לדף הבית</a>
</div>


<a href="https://apps.apple.com/us/app/tanakh-pro/id6736739283?itscg=30200&itsct=apps_box_badge&mttnsubad=6736739283"
style="display: inline-block;">
<img src="https://toolbox.marketingtools.apple.com/api/v2/badges/download-on-the-app-store/black/he-il?releaseDate=1728518400"
alt="Download on the App Store"
style="width: 239px; height: 82px; vertical-align: middle; object-fit: contain;" />
</a>


</body>

</html>
5 changes: 5 additions & 0 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<priority>1.0</priority>
</url>

<url>
<loc>https://dorpascal.com/tanakh/pdf/</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
<lastmod>2024-12-31</lastmod>
<url>
<loc>https://dorpascal.com/tanakh/en/</loc>
<changefreq>monthly</changefreq>
Expand Down
47 changes: 47 additions & 0 deletions generate_pdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import asyncio
from playwright.async_api import async_playwright
import os

async def html_to_pdf(input_html_path, output_pdf_path):
"""Convert HTML to PDF using Playwright"""
async with async_playwright() as p:
# Launch browser
browser = await p.chromium.launch()
page = await browser.new_page()

# Create file URL
file_url = f'file://{os.path.abspath(input_html_path)}'

# Go to the HTML file
await page.goto(file_url)

# Wait for content to load
await page.wait_for_load_state('networkidle')

# Generate PDF
await page.pdf(
path=output_pdf_path,
format='A4',
margin={'top': '20mm', 'right': '20mm', 'bottom': '20mm', 'left': '20mm'},
print_background=True
)

# Close browser
await browser.close()

print(f"Successfully created PDF at: {output_pdf_path}")

def convert_to_pdf(input_html_path, output_pdf_path):
"""Wrapper to run the async function"""
asyncio.run(html_to_pdf(input_html_path, output_pdf_path))

if __name__ == "__main__":
input_path = "/Users/dorpascal/projects.nosync/tanakh/docs/assets/hebrew_bible.html"
output_dir = os.path.dirname(input_path)
output_path = os.path.join(output_dir, "hebrew_bible.pdf")

try:
convert_to_pdf(input_path, output_path)
except Exception as e:
print(f"Error: {str(e)}")
print("\nTip: Make sure the HTML file exists at the specified path.")

0 comments on commit cdc593b

Please sign in to comment.