להורדה | השלמת שו"ת פרי עץ חיים
-
-
מהיכן המקור?
תביא קישור מדוייק.
לא ככה אנחנו עובדים.לכל דבר יש דרך וצורה איך מורידים, ואיך מטפלים.
-
@אהרן אני מבין שאתה לא רוצה לעזור לנו כ"כ, חבל.
לא מבין כ"כ מה המטרה שלך בפוסט הזה, אם אתה לא רוצה לעזור לנו....לעצם העניין, @האדם-החושב עיין כאן: https://files.dicta.org.il/books_internal.json
ולכאורה יוצא שאין שם בכלל את האפשרות להוריד את הגירסא של ה OCR מה שהיינו מורידים תמיד, אלא רק את: https://files.dicta.org.il/prietshaim/prietshaim__text_files.zip למרות שזה יורד בלי שום תגיות.
או שיש לך פתרון אחר לחידה הזו. -
@אהרן אני מבין שאתה לא רוצה לעזור לנו כ"כ, חבל.
לא מבין כ"כ מה המטרה שלך בפוסט הזה, אם אתה לא רוצה לעזור לנו....לעצם העניין, @האדם-החושב עיין כאן: https://files.dicta.org.il/books_internal.json
ולכאורה יוצא שאין שם בכלל את האפשרות להוריד את הגירסא של ה OCR מה שהיינו מורידים תמיד, אלא רק את: https://files.dicta.org.il/prietshaim/prietshaim__text_files.zip למרות שזה יורד בלי שום תגיות.
או שיש לך פתרון אחר לחידה הזו.@יום-חדש-מתחיל
פרי עץ חיים.rarimport io import json import re import zipfile from pathlib import Path import requests from tqdm import tqdm BASE_URL = "https://files.dicta.org.il/prietshaim/" def get_toc() -> list[dict]: url = BASE_URL + "pages.json" response = requests.get(url) return response.json() def get_page_content(page: str) -> dict: response = requests.get(BASE_URL + page) if page.endswith(".zip"): with zipfile.ZipFile(io.BytesIO(response.content)) as z, z.open(z.namelist()[0]) as f: return json.loads(f.read().decode("utf-8")) return response.json() def process_page(output_file: io.TextIOWrapper, content: list[dict]) -> None: for entry in content: if 'display' not in entry: output_file.write(entry['str']) continue for i in entry['display']: val = i["c"] heading = i.get("heading", False) bold = i.get("bold", False) if heading is True: output_file.write(f"<big>{val}</big>") elif bold is True: output_file.write(f"<b>{val}</b>") else: output_file.write(val) def main() -> None: book_name = "פרי עץ חיים" author = "" target_file_path = Path(f"{book_name}.txt") toc = get_toc() with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(f"<h1>{book_name}</h1>\n{author}") for entry in tqdm(toc, total=len(toc)): if entry["type"] == "index": continue page = entry["fileName"] display_name = entry["displayName"] output_file.write(f"\n<h2>{display_name}</h2>\n") content = get_page_content(page) process_page(output_file, content["tokens"]) with target_file_path.open("r", encoding="utf-8") as output_file: content = output_file.read() content = re.sub(r'\n+', '\n', content) with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(content) if __name__ == "__main__": main()
אגב, בזכות זה חקרתי קצת יותר את האתר של דיקטה ויתכן שיש דרך להוריד את הספרים שעדיין לא ערכו עם ירידות שורה, הדגשות וכו'.
-
@יום-חדש-מתחיל
פרי עץ חיים.rarimport io import json import re import zipfile from pathlib import Path import requests from tqdm import tqdm BASE_URL = "https://files.dicta.org.il/prietshaim/" def get_toc() -> list[dict]: url = BASE_URL + "pages.json" response = requests.get(url) return response.json() def get_page_content(page: str) -> dict: response = requests.get(BASE_URL + page) if page.endswith(".zip"): with zipfile.ZipFile(io.BytesIO(response.content)) as z, z.open(z.namelist()[0]) as f: return json.loads(f.read().decode("utf-8")) return response.json() def process_page(output_file: io.TextIOWrapper, content: list[dict]) -> None: for entry in content: if 'display' not in entry: output_file.write(entry['str']) continue for i in entry['display']: val = i["c"] heading = i.get("heading", False) bold = i.get("bold", False) if heading is True: output_file.write(f"<big>{val}</big>") elif bold is True: output_file.write(f"<b>{val}</b>") else: output_file.write(val) def main() -> None: book_name = "פרי עץ חיים" author = "" target_file_path = Path(f"{book_name}.txt") toc = get_toc() with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(f"<h1>{book_name}</h1>\n{author}") for entry in tqdm(toc, total=len(toc)): if entry["type"] == "index": continue page = entry["fileName"] display_name = entry["displayName"] output_file.write(f"\n<h2>{display_name}</h2>\n") content = get_page_content(page) process_page(output_file, content["tokens"]) with target_file_path.open("r", encoding="utf-8") as output_file: content = output_file.read() content = re.sub(r'\n+', '\n', content) with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(content) if __name__ == "__main__": main()
אגב, בזכות זה חקרתי קצת יותר את האתר של דיקטה ויתכן שיש דרך להוריד את הספרים שעדיין לא ערכו עם ירידות שורה, הדגשות וכו'.
@האדם-החושב מדהים!!
-
@האדם-החושב אתה יכול להוריד גם את הספר הזה:
https://library.dicta.org.il/book/alfeimenashetorah/alfeimenashetorah-003
פשוט הגירסא שמורידים תמיד מכילה רק את העמוד הראשון. -
@האדם-החושב אתה יכול להוריד גם את הספר הזה:
https://library.dicta.org.il/book/alfeimenashetorah/alfeimenashetorah-003
פשוט הגירסא שמורידים תמיד מכילה רק את העמוד הראשון.import io import json import re import zipfile from pathlib import Path import requests from tqdm import tqdm BASE_URL = "https://files.dicta.org.il/library-1-0/" def get_toc(url: str) -> list[dict]: url = url + "pages.json" response = requests.get(url) return response.json() def get_page_content(url: str, page: str) -> dict: response = requests.get(url + page) if page.endswith(".zip"): with zipfile.ZipFile(io.BytesIO(response.content)) as z, z.open(z.namelist()[0]) as f: return json.loads(f.read().decode("utf-8")) return response.json() def process_page(output_file: io.TextIOWrapper, content: list[dict]) -> None: for entry in content: if 'display' not in entry: output_file.write(entry['str']) continue for i in entry['display']: val = i["c"] heading = i.get("heading", False) bold = i.get("bold", False) if heading is True: output_file.write(f"<big>{val}</big>") elif bold is True: output_file.write(f"<b>{val}</b>") else: output_file.write(val) def main() -> None: book_name = "alfeimenashetorah" book_url = f"{BASE_URL}{book_name}/" book_name = "אלפי מנשה על התורה" author = "" target_file_path = Path(f"{book_name}.txt") toc = get_toc(book_url) with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(f"<h1>{book_name}</h1>\n{author}") for entry in tqdm(toc, total=len(toc)): page = entry["fileName"] output_file.write("\n") content = get_page_content(book_url, page) process_page(output_file, content["tokens"]) with target_file_path.open("r", encoding="utf-8") as output_file: content = output_file.read() content = re.sub(r'\n+', '\n', content) with target_file_path.open("w", encoding="utf-8") as output_file: output_file.write(content) if __name__ == "__main__": main() -
@אהרן כתב בלהורדה | השלמת שו"ת פרי עץ חיים:
למה לא להוריד באתר?
[אם התכוונת לאתר של דיקטה, אז התשובה היא] כי מה שיורד מהאתר זה בלי עיצוב כלל.
-
@אהרן לך אולי יותר קל לערוך ככה,
אבל אנחנו רוצים כן עם כל ההדגשות והכל.
לכן לאוצריא זה לא ייכנס. נקודה.אם אתה לא מסתדר, וכן בכל בקשה ועזרה
נוכל בל"נ לתת לך עזרה ככל שידרש. -
@אהרן לך אולי יותר קל לערוך ככה,
אבל אנחנו רוצים כן עם כל ההדגשות והכל.
לכן לאוצריא זה לא ייכנס. נקודה.אם אתה לא מסתדר, וכן בכל בקשה ועזרה
נוכל בל"נ לתת לך עזרה ככל שידרש.@יום-חדש-מתחיל כתב בלהורדה | השלמת שו"ת פרי עץ חיים:
@אהרן לך אולי יותר קל לערוך ככה,
אבל אנחנו רוצים כן עם כל ההדגשות והכל.
לכן לאוצריא זה לא ייכנס. נקודה.אם אתה לא מסתדר, וכן בכל בקשה ועזרה
נוכל בל"נ לתת לך עזרה ככל שידרש.איך המודגש מסתדר עם דבריך כאן ?
-
@מישהו-1 אתה שואל שאלה מצויינת!
והתשובה ממש פשוטה.אני כרגע בתפקיד שהקב"ה שם אותי בו, ואני משתדל למלא את תפקידי בשלמות כמו שאני מבין את זה.
אני ממש משתדל הרבה מאוד, אתה אפילו לא יודע עד כמה. (וכמובן הכל בלי לקבל אגורה שחוקה).בכל מה שהוא לא קשור לתפקיד שלי, כגון לגבי הוספת ספרים,
זה לא ממש מתאים לאופי שלי, גם במצ'ינגים לא הסתדרתי אף פעם...
ולכן אני באמת לא מבין למה אני קשור לזה יותר ממך.
בסופו של דבר, אין לי תועלת מהתוכנה הזאת יותר מהתועלת שיש לך, אני לא מרוויח עלי' שום דבר, והרווח הוא של כולנו יחד, ושל כל לומדי התורה הקדושה.לכן כל מי שמוכן לעזור בכל תחום שהוא בהתנדבות גמורה - מצוין,
מה שייך לבוא בטענות על מישהו למה הוא לא עושה משהו?
משא"כ על מי שעושה משהו ש [לכה"פ] לדעתו הוא לא טוב, זה באמת לא בסדר.
שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.
נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.
בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗
הרשמה התחברות