@shraga נראה טוב. יש את זה ברזולוצייה יותר גבוהה?
נראה שבספרי קודש בתמונה השניה הוא התבלבל עם ארון קודש..
הפצת אנקי
-
התרשמות קלה ממודל DALL E 2 של Open Ai -
התרשמות קלה ממודל DALL E 2 של Open Ai@shraga מדהים!
אם כי הוא נתן יותר דגש לחדר האפלולי מאשר לספריה.
תוכל לנסות ניסוח הפוך- A library at a height of 50 meters and inside it books with a dark cover, in a dim room?
אולי בעצם עדיף לוותר על החדר האפלולי ולהוסיף שזה ספרי קודש יהודיים?
A library at a height of 50 meters and inside it Jewish religious books with a dark cover -
התרשמות קלה ממודל DALL E 2 של Open Aiמישהו מהנרשמים פה יכול לבקש תמונה (לא ציור) של ספריה גדולה בגובה 50 מטר בחדר אפלולי עם ספרים בכריכה כהה?
(אני מחפש רקע לגירסא הבאה של אנקי.)
תודה מראש. -
תוכנת אנקי לזכרון הלימודבסייעתא דשמיא.
לפני הקישור- נבקש מכל מי ששם לב לבאג שלא יתעצל, ויודיע לנו כדי שנוכל לתקן.
מצורפת גירסת בדיקה שניה.
תוקנו: באג ההדפסה- כעת ההדפסה יותר נוחה מכיון שנחסכה מהמשתמשים תיבת דו שיח אחת.
באג בהחלפת פרופיל משתמש.
באג שבהתקנה על מחשב לראשונה סרגל ההתקדמות הופיע למעלה.
קישור: הורדהיישר כח לכל הצדיקים כאן שכל פעם מחדש נרתמים לסייע מכל הלב!
-
הדפסת קובץ PDF בפייתון (windows)למעשה, לבעיה שלי מצאתי פתרון הדפסה ישירות מהhtml עם תצוגה מקדימה שנראית ככה:
אם אי פעם יהיה למישהו צורך בקוד (או למקרה שיש צורך דחוף להדפיס את הדף הזה דרך Pyqt6 דווקא...):
import sys from PyQt6.QtCore import QCoreApplication, QUrl, pyqtSlot, QEventLoop from PyQt6.QtPrintSupport import QPrintPreviewDialog, QPrinter from PyQt6.QtWebEngineWidgets import QWebEngineView from PyQt6.QtWidgets import QApplication class PDFPage(QWebEngineView): def __init__(self, url, filename): super(PDFPage, self).__init__() self.url = QUrl.fromUserInput(url) self.filename = filename self.loadFinished.connect(self.load_finished) self.m_printer = QPrinter(QPrinter.PrinterMode.HighResolution) self.m_waitForResult = QEventLoop() self.printFinished.connect(self.print_finished) def start(self): self.load(self.url) def load_finished(self, ok): if ok: self.QPrintPreviewDialog = QPrintPreviewDialog(self.m_printer) self.QPrintPreviewDialog.paintRequested.connect(self.printDocument) self.QPrintPreviewDialog.exec() else: QCoreApplication.exit(-1) def printDocument(self, printer): self.print(printer) self.m_waitForResult.exec() def print_finished(self): self.m_waitForResult.quit() def pdf_from_url(url, filename): app = QApplication(sys.argv) page = PDFPage(url, filename) page.start() ret = app.exec() return ret == 0 sucess = pdf_from_url("https://tchumim.com/topic/13945/%D7%94%D7%93%D7%A4%D7%A1%D7%AA-%D7%A7%D7%95%D7%91%D7%A5-pdf-%D7%91%D7%A4%D7%99%D7%99%D7%AA%D7%95%D7%9F-windows/13?_=1662075589691", "test.pdf") if sucess: print("PDF has been generated")
לגופו של עניין, כנראה שהתשובה תהיה באמת להמיר את הpdf לתמונה באמצעות pdf2image ואחר כך להדפיס באמצעות win32print. דוגמא מובאת למעלה בקישור שבהודעה הראשונה שלי.
תודה לכל העוזרים ובפרט ל @yossiz המיוחד...
-
הדפסת קובץ PDF בפייתון (windows)ראשית, תודה לכל המשיבים
@yossiz אפרט הכל מהתחלה:
ברמת העיקרון, השאלות בתוכנת אנקי הן בעצם מסמכי html וכתובות בקוד html ותומכות גם בjs וכל הנלווה.
התוכנה מתפקדת כדפדפן שמציג את השאלות. הדפדפן הוא יישום מהספריה Qt הנקרא QtWebEngine שמבוסס על כרום.
כדי להדפיס את השאלות לפי קריטריונים מסוימים כתבתי קוד שאוסף את השאלות לפי הפרמטרים שהמשתמש מכניס. הפלט הוא דף html.
מהhtml הזה אני מתקדם הלאה לצורך המרה לוורד (למתעניינים: על ידי הAPI של וורד), שמירה כpdf (אופציה מובנה בpyqt6) והדפסה.
(מכאן ואילך העיקר)
עד הגירסאות האחרונות תוכנת אנקי היתה מבוססת על pyqt5 ושם השתמשתי בקוד מוכן כדי להדפיס. כעת הגירסא העדכנית עברה לPyqt6 ושם נעשו הרבה שינויים במחלקות שקשורות להדפסה (QPrintSupport ונספחיה) עם כמעט אפס תיעוד.
בתחילה ניסיתי להמיר את הקוד ללא הצלחה. השלב הבא היה לחפש דרכים אחרות. במהלך החיפושים גיליתי שההדפסה דרך Qt איטית בצורה משמעותית מאשר להדפיס בדרכים אחרות מלבד מה שאין אינדיקציה כמה דפים יצאו מהמדפסת בסופו של דבר. הדרך היותר מהירה הייתה לבצע המרת ביניים לpdf ומשם להדפיס.
התצוגה המקדימה של ההדפסה היא בסך הכל דף html ארוך ללא שום קשר לתוצאה הסופית. אני מעדיף לא ליצור עוד מידי הרבה תיבות דו שיח כדי לא להכביד.
כנראה שמה שהכי יעיל יהיה להמיר לתמונה ומשם להדפיס (?). -
הדפסת קובץ PDF בפייתון (windows)שאלה פשוטה עם תשובה מסובכת:
אני מחפש דרך לשליחת קובץ pdf להדפסה שתעבוד ללא תלות בתוכנות המותקנות במחשב.
יש את הדרך win32api:win32api.ShellExecute(0, "print", f, None, ".", 0)
החיסרון בזה- הוא עובד רק אם יש קורא PDF שיש לו api מתאים (כגון foxit). לא מתאים לי מכיון שזה מיועד לשימוש ציבורי והרבה אנשים משתמשים רק בedge כקורא pdf ואין לו את הapi המתאים.
קראתי את המאמר הזה ולמעשה יצאתי בידיים ריקות... -
הפעלת קובץ בJS -
הפעלת קובץ בJSהאם יש דרך להפעיל קובץ במחשב באמצעות JS מדף שמקורו במחשב המקומי?
קישור ישיר לקובץ גורם להורדת הקובץ בכל הדפדפנים המודרניים (בשונה מIE).
תודה. -
סקריפט פייתון מקומפל מזוהה כוירוס@NH-LOCAL זה גרם לבעיה גם במחשבים שלא מחוברים לאינטרנט.
הנה הקוד למי שמתעניין:# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\adb\untitled.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. import os from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt, QRect, QMetaObject, QCoreApplication from PyQt5.QtWidgets import QApplication, QPushButton, \ QLabel, QDialog, QHBoxLayout, QWidget, QMessageBox class Window2(QWidget): def __init__(self): super().__init__() self.resize(831, 605) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("סמל_לתוכנה__2_-removebg-preview.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.setWindowIcon(icon) layout = QHBoxLayout() self.centralwidget = QtWidgets.QWidget() self.centralwidget.setObjectName("centralwidget") self.textBrowser = QtWidgets.QTextBrowser() self.textBrowser.setGeometry(QtCore.QRect(0, 0, 831, 605)) _translate = QtCore.QCoreApplication.translate self.setWindowTitle(_translate("MainWindow", "הוראות לחיפוש")) self.textBrowser.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15.4px;\">בס"ד</p>\n" "<p style=\" font-family:\'Times New Roman\'; font-size:20pt; \" align=\"center\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:15.4px;\">הוראות לחיפוש<br></p>\n" "<li style=\" font-family:\'Times New Roman\'; font-size:8pt; color:#002060;\" align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span> החיפוש נעשה באמצעות תוכנת Adobe Reader [<img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image018.jpg\" /> - סמל זה], גרסה 10 ומעלה, (לא תואם לגרסה 8 ומטה, על גרסה 9 אין לנו מידע), באם לא מותקנת התוכנה במחשב, יש להתקין קודם לכן תוכנה זו הנמצאת בתיקיה תוכנות חשובות, אם מותקנת גרסה לא תואמת יש להסירה ולהתקין גירסה 10 הנמצאת בתיקיה תוכנות חשובות.</span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt;\"> [כמו כן התוכנה עובדת עם תוכנת Acrobat Reader DC </span><img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image019.jpg\" /><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt;\">– סמל כזה]</span></li>\n" "<li style=\" font-family:\'Times New Roman\'; font-size:8pt; color:#002060;\" align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\"> ·</span> כדי לייעל את החיפוש רצוי לחפש בקטגוריה המתאימה, לחץ על אחת מהקטגוריות, או בחר בקטגוריה "חיפוש בכל הספרים"</span></li>\n" "<li style=\" font-family:\'Times New Roman\'; font-size:8pt; color:#002060;\" align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span> כשהתוכנה עולה יש שני חלונות. חלון ראשי וחלון חיפוש. לעיתים החלון הראשי מכסה ומסתיר את חלון החיפוש, לשם כך יש להקטין את החלון הראשי ע"י הצללית הנמצאת בחלון זה בצד שמאל למעלה. (או לחילופין להקיש על "עריכה", ולמטה לבחור "חיפוש מתקדם", וגם עי"ז עולה חלונית החיפוש).</span></li>\n" "<p align=\"center\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"> חלון ראשי חלון חיפוש</span></p>\n" "<p align=\"center\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"></span><img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image023.jpg\" /></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\">כעת יש להקליד ב"חלון החיפוש" את המילים שברצונך לחפש, ולהמתין מעט, מומלץ לסמן את האפשרות: מילים שלימות בלבד המופיעה בחלונית החיפוש, וכמו בדוגמה המצורפת, עי"ז החיפוש מהיר יותר. [אולם יש לשים לב לכתוב מילה שלימה ולא חציה, למשל לכתוב \'כוס ראשון\' ולא \'כוס ראשו\']</span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image014.png\" /></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\">בתחתית חלונית החיפוש אפשר ללחוץ על "הצג עוד אפשרויות", אפשר לבחור באחת מהאפשרויות שנמצאות שם, במיוחד מועיל אם מעונינים לבחור בכמה קטגוריות ביחד לשם כך יש ללחוץ על האפשרות "בחר אינדקס", ולסמן את האינדקסים שבהם מעונינים לחפש.</span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image024.jpg\" /></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"> </span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:22px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\">הערה בקשר לחיפוש במאגר אוצר התורה – מיר, כיון שהמאגר כולל קבצי וורד שבהם התוכנה לא מבצעת חיפוש, הומרו כל הקבצים גם לקבצי </span><span style=\" font-family:\'Calibri,sans-serif\'; font-size:12pt; color:#000000;\">PDF</span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\">, חלקם נמצאים במיקום המקורי תחת אותו השם, וחלקם בתיקיה (מוסתרת) בפני עצמה הנקראת </span><span style=\" font-family:\'Calibri,sans-serif\'; font-size:12pt; color:#000000;\">PDF</span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"> ללא מיון, כך שאם אותר ע"י החיפוש בקובץ </span><span style=\" font-family:\'Calibri,sans-serif\'; font-size:12pt; color:#000000;\">PDF</span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\"> ומעוניינים בקובץ זה בפורמט וורד כדי להעתיק ממנו, אפשר לחפש את אותו שם קובץ, ולמוצאו גם בקובץ וורד.</span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:22px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; color:#000000;\">בדוגמה שלהלן נעשה חיפוש למילים "דבר שלא בא לעולם" בקטגוריה "משניות\', ונמצאו 22 תוצאות ב7 מסמכים, וע"י עמידה עם העכבר על התוצאה הרצויה הספר נפתח ומסומנת התוצאה הרצויה, שים לב ליד הכותרת משניות זכר חנוך נשים, מופיע ריבוע קטן, ע"י לחיצה על + שבתוכו, נפתחים כל התוצאות וכשעומדים עם העכבר על התוצאה הרצויה, נפתח הספר במקום הרצוי.</span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"><br /></span><img src=\"file:///D:/%D7%A1%D7%A4%D7%A8%D7%99%D7%94%20%D7%AA%D7%95%D7%A8%D7%A0%D7%99%D7%AA/%D7%92%D7%9E\'\'%D7%97/%D7%94%D7%95%D7%A8%D7%90%D7%95%D7%AA%20%D7%94%D7%97%D7%99%D7%A4%D7%95%D7%A9.files/image028.jpg\" /></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; font-weight:600; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; font-weight:600; color:#000000;\">בכדי שהחיפוש יעבוד כראוי, אין לשנות את מיקום התיקיות שבספריה התורנית, וכן אין למחוק תיקיות וקבצים נסתרים, כל אלו שייכים לאינדקסים לצורך אפשרות החיפוש, והשינוי משבש את הפעילות שלהם.</span></p>\n" "<p align=\"justify\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:16.8667px;\"><span style=\" font-family:\'Symbol\'; font-size:12pt; font-weight:600; color:#000000;\">·</span><span style=\" font-family:\'Times New Roman\'; font-size:7pt; color:#000000;\"> </span><span style=\" font-family:\'Times New Roman,serif\'; font-size:12pt; font-weight:600; color:#000000;\">ישנם ספרים שאין לנו אישור לאפשר לחפש בהם, ולכך העברנו אותם לתיקיה בפני עצמה בשם \'ספרים שונים ללא חיפוש\', השתדלנו לעשות קיצורי דרך לספרים אלו, באם קיצורי הדרך לא עובדים יש לחפש בתיקיה זו. [מכיון שהוצאת הספרים הנ"ל מהחיפוש הייתה אחר יצירת האינדקסים, יתכנו תוצאות בחיפוש שלא יהיה ניתן לראותם, ותתקבל ההודעה \'ארעה שגיאה במהלך אחזור מלל\', ספרים אלו נמצאים כאמור בתיקיה בפני עצמה, ובמקרה הצורך יש לפתוח את הספר ולחפש בו בפני עצמו בתיבת חיפוש של אקרובט\\פקוסיט].</span></p>\n" "<p align=\"center\" dir=\'rtl\' style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:24px;\"><span style=\" font-family:\'Times New Roman,serif\'; font-size:18pt; font-weight:600; color:#000000;\">בהצלחה!</span></p></body></html>")) layout.addWidget(self.textBrowser) self.setLayout(layout) class Ui_Dialog(object): def openFile(self, link) -> None: try: os.startfile(link) except: msg = QMessageBox() icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("סמל_לתוכנה__2_-removebg-preview.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) msg.setWindowIcon(icon) msg.setWindowTitle("!שגיאה") msg.setText("הקובץ לא נמצא!" + "<br>" + "הקובץ אמור להיות ממוקם ב: " + link) msg.setIcon(QMessageBox.Warning) msg.exec_() def window2(self): # <=== self.w = Window2() self.w.show() def setupUi(self, Dialog): Dialog.setObjectName("Dialog") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("סמל_לתוכנה__2_-removebg-preview.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.resize(832, 540) Dialog.setLayoutDirection(Qt.RightToLeft) Dialog.setAutoFillBackground(False) Dialog.setStyleSheet("background-color: #FFF2CC;") self.label = QLabel(Dialog) self.label.setGeometry(QRect(780, -10, 41, 31)) self.label.setObjectName("label") self.label_2 = QLabel(Dialog) self.label_2.setGeometry(QRect(10, 20, 811, 51)) self.label_2.setStyleSheet("font-size: 38.0pt; font-family: \"Times New Roman\",serif; color: white; text-align: center; background-color: #002060; ") self.label_2.setObjectName("label_2") self.label_3 = QLabel(Dialog) self.label_3.setGeometry(QRect(10, 70, 811, 31)) self.label_3.setStyleSheet("font-size: 20.0pt; font-family: \"David\",sans-serif;; color: white; background-color: #002060; ") self.label_3.setObjectName("label_3") self.pushButton_label_4 = QPushButton(Dialog) self.pushButton_label_4.setGeometry(QRect(10, 100, 811, 20)) self.pushButton_label_4.setStyleSheet("font-size: 14.0pt; font-family: \"Times New Roman\",serif; color: yellow; text-align: center; background-color: #002060;") self.pushButton_label_4.setObjectName("pushButton_label_4") self.pushButton = QPushButton(Dialog) self.pushButton.setGeometry(QRect(10, 120, 811, 23)) self.pushButton.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton.setObjectName("pushButton") self.pushButton_2 = QPushButton(Dialog) self.pushButton_2.setGeometry(QRect(580, 150, 241, 23)) self.pushButton_2.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_2.setObjectName("pushButton_2") self.pushButton_3 = QPushButton(Dialog) self.pushButton_3.setGeometry(QRect(700, 170, 121, 141)) self.pushButton_3.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_3.setObjectName("pushButton_3") self.pushButton_4 = QPushButton(Dialog) self.pushButton_4.setGeometry(QRect(580, 170, 121, 141)) self.pushButton_4.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_4.setObjectName("pushButton_4") self.pushButton_13 = QPushButton(Dialog) self.pushButton_13.setGeometry(QRect(290, 230, 71, 81)) self.pushButton_13.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_13.setObjectName("pushButton_13") self.pushButton_14 = QPushButton(Dialog) self.pushButton_14.setGeometry(QRect(730, 470, 91, 61)) self.pushButton_14.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_14.setObjectName("pushButton_14") self.pushButton_22 = QPushButton(Dialog) self.pushButton_22.setGeometry(QRect(10, 170, 81, 61)) self.pushButton_22.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_22.setObjectName("pushButton_22") self.pushButton_23 = QPushButton(Dialog) self.pushButton_23.setGeometry(QRect(90, 170, 331, 61)) self.pushButton_23.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_23.setObjectName("pushButton_23") self.pushButton_24 = QPushButton(Dialog) self.pushButton_24.setGeometry(QRect(420, 170, 151, 61)) self.pushButton_24.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_24.setObjectName("pushButton_24") self.pushButton_25 = QPushButton(Dialog) self.pushButton_25.setGeometry(QRect(10, 150, 561, 21)) self.pushButton_25.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_25.setObjectName("pushButton_25") self.pushButton_15 = QPushButton(Dialog) self.pushButton_15.setGeometry(QRect(360, 230, 61, 81)) self.pushButton_15.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_15.setObjectName("pushButton_15") self.pushButton_16 = QPushButton(Dialog) self.pushButton_16.setGeometry(QRect(420, 230, 71, 81)) self.pushButton_16.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_16.setObjectName("pushButton_16") self.pushButton_17 = QPushButton(Dialog) self.pushButton_17.setGeometry(QRect(490, 230, 81, 81)) self.pushButton_17.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_17.setObjectName("pushButton_17") self.pushButton_18 = QPushButton(Dialog) self.pushButton_18.setGeometry(QRect(220, 230, 71, 81)) self.pushButton_18.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_18.setObjectName("pushButton_18") self.pushButton_19 = QPushButton(Dialog) self.pushButton_19.setGeometry(QRect(150, 230, 71, 81)) self.pushButton_19.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_19.setObjectName("pushButton_19") self.pushButton_20 = QPushButton(Dialog) self.pushButton_20.setGeometry(QRect(90, 230, 61, 81)) self.pushButton_20.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_20.setObjectName("pushButton_20") self.pushButton_21 = QPushButton(Dialog) self.pushButton_21.setGeometry(QRect(10, 230, 81, 81)) self.pushButton_21.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_21.setObjectName("pushButton_21") self.pushButton_26 = QPushButton(Dialog) self.pushButton_26.setGeometry(QRect(10, 320, 811, 21)) self.pushButton_26.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_26.setObjectName("pushButton_26") self.pushButton_27 = QPushButton(Dialog) self.pushButton_27.setGeometry(QRect(680, 340, 141, 41)) self.pushButton_27.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_27.setObjectName("pushButton_27") self.pushButton_28 = QPushButton(Dialog) self.pushButton_28.setGeometry(QRect(540, 340, 141, 41)) self.pushButton_28.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_28.setObjectName("pushButton_28") self.pushButton_29 = QPushButton(Dialog) self.pushButton_29.setGeometry(QRect(480, 340, 61, 41)) self.pushButton_29.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_29.setObjectName("pushButton_29") self.pushButton_30 = QPushButton(Dialog) self.pushButton_30.setGeometry(QRect(480, 380, 61, 81)) self.pushButton_30.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_30.setObjectName("pushButton_30") self.pushButton_31 = QPushButton(Dialog) self.pushButton_31.setGeometry(QRect(540, 380, 71, 81)) self.pushButton_31.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_31.setObjectName("pushButton_31") self.pushButton_32 = QPushButton(Dialog) self.pushButton_32.setGeometry(QRect(610, 380, 71, 81)) self.pushButton_32.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_32.setObjectName("pushButton_32") self.pushButton_33 = QPushButton(Dialog) self.pushButton_33.setGeometry(QRect(680, 380, 71, 81)) self.pushButton_33.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_33.setObjectName("pushButton_33") self.pushButton_34 = QPushButton(Dialog) self.pushButton_34.setGeometry(QRect(750, 380, 71, 81)) self.pushButton_34.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_34.setObjectName("pushButton_34") self.pushButton_35 = QPushButton(Dialog) self.pushButton_35.setGeometry(QRect(400, 340, 81, 121)) self.pushButton_35.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_35.setObjectName("pushButton_35") self.pushButton_36 = QPushButton(Dialog) self.pushButton_36.setGeometry(QRect(320, 340, 81, 121)) self.pushButton_36.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_36.setObjectName("pushButton_36") self.pushButton_37 = QPushButton(Dialog) self.pushButton_37.setGeometry(QRect(220, 370, 101, 91)) self.pushButton_37.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_37.setObjectName("pushButton_37") self.pushButton_38 = QPushButton(Dialog) self.pushButton_38.setGeometry(QRect(80, 370, 141, 91)) self.pushButton_38.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_38.setObjectName("pushButton_38") self.pushButton_39 = QPushButton(Dialog) self.pushButton_39.setGeometry(QRect(10, 340, 71, 121)) self.pushButton_39.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_39.setObjectName("pushButton_39") self.pushButton_40 = QPushButton(Dialog) self.pushButton_40.setGeometry(QRect(220, 340, 101, 31)) self.pushButton_40.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_40.setObjectName("pushButton_40") self.pushButton_41 = QPushButton(Dialog) self.pushButton_41.setGeometry(QRect(80, 340, 141, 31)) self.pushButton_41.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_41.setObjectName("pushButton_41") self.pushButton_42 = QPushButton(Dialog) self.pushButton_42.setGeometry(QRect(610, 470, 121, 61)) self.pushButton_42.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_42.setObjectName("pushButton_42") self.pushButton_43 = QPushButton(Dialog) self.pushButton_43.setGeometry(QRect(550, 470, 61, 61)) self.pushButton_43.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_43.setObjectName("pushButton_43") self.pushButton_44 = QPushButton(Dialog) self.pushButton_44.setGeometry(QRect(390, 470, 91, 61)) self.pushButton_44.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_44.setObjectName("pushButton_44") self.pushButton_45 = QPushButton(Dialog) self.pushButton_45.setGeometry(QRect(270, 470, 121, 61)) self.pushButton_45.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_45.setObjectName("pushButton_45") self.pushButton_46 = QPushButton(Dialog) self.pushButton_46.setGeometry(QRect(190, 470, 81, 61)) self.pushButton_46.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_46.setObjectName("pushButton_46") self.pushButton_47 = QPushButton(Dialog) self.pushButton_47.setGeometry(QRect(100, 470, 91, 61)) self.pushButton_47.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_47.setObjectName("pushButton_47") self.pushButton_48 = QPushButton(Dialog) self.pushButton_48.setGeometry(QRect(10, 470, 91, 61)) self.pushButton_48.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_48.setObjectName("pushButton_48") self.pushButton_49 = QPushButton(Dialog) self.pushButton_49.setGeometry(QRect(480, 470, 71, 61)) self.pushButton_49.setStyleSheet("background-color: #D0CECE; color: #0563C1; font-family: \"Times New Roman\",serif; font-weight: bold;font-size: 16.0pt;") self.pushButton_49.setObjectName("pushButton_49") self.retranslateUi(Dialog) QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): _translate = QCoreApplication.translate Dialog.setWindowTitle(_translate("Dialog", "חיפוש בתוכן הספרים")) self.label.setText(_translate("Dialog", "בס\"ד")) self.label_2.setText(_translate("Dialog", "<html><head/><body><p align=\"center\">חיפוש בתוכן הספרים בספריה התורנית</p></body></html>")) self.label_3.setText(_translate("Dialog", "<html><head/><body><p align=\"center\">הקש על אחד הנושאים או נושאי המשנה לחיפוש בספרים השייכים לנושא המבוקש</p></body></html>")) self.pushButton_label_4.setText(_translate("Dialog", "לחץ כאן להוראות")) self.pushButton_label_4.clicked.connect(self.window2) self.pushButton.setText(_translate("Dialog", "חיפוש בכל הספרים")) self.pushButton.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\כל הספרים חדש.pdx")) self.pushButton_2.setText(_translate("Dialog", "תנ\"ך ומפרשיו")) self.pushButton_2.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\תנ''ך ומפרשיו.pdx")) self.pushButton_3.setText(_translate("Dialog", "מקראות\n" " גדולות")) self.pushButton_3.clicked.connect(lambda: self.openFile("ספריה תורנית\מקראות גדולות\מקראות גדולות.pdx")) self.pushButton_4.setText(_translate("Dialog", "מפרשי\n" " התנ\"ך")) self.pushButton_4.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי תנ''ך\מפרשי תנ''ך.pdx")) self.pushButton_13.setText(_translate("Dialog", "ראשונים\n" " על\n" " הש\"ס")) self.pushButton_13.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי הש''ס\ראשונים על הש''ס\ראשונים.pdx")) self.pushButton_14.setText(_translate("Dialog", "גאונים")) self.pushButton_14.clicked.connect(lambda: self.openFile("ספריה תורנית\גאונים\גאונים.pdx")) self.pushButton_22.setText(_translate("Dialog", "תלמוד\n" " ירושלמי")) self.pushButton_22.clicked.connect(lambda: self.openFile("ספריה תורנית\תלמוד ירושלמי\תלמוד ירושלמי.pdx")) self.pushButton_23.setText(_translate("Dialog", "ש\"ס ומפרשיו")) self.pushButton_23.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\ש_ס ומפרשיו חדש.pdx")) self.pushButton_24.setText(_translate("Dialog", "משנה ומפרשיה")) self.pushButton_24.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\משנה ומפרשיה.pdx")) self.pushButton_25.setText(_translate("Dialog", "חז\"ל")) self.pushButton_25.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\חז''ל.pdx")) self.pushButton_15.setText(_translate("Dialog", "תלמוד\n" " בבלי")) self.pushButton_15.clicked.connect(lambda: self.openFile("ספריה תורנית\תלמוד בבלי\תלמוד בבלי.pdx")) self.pushButton_16.setText(_translate("Dialog", "מפרשי\n" " המשנה")) self.pushButton_16.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי המשנה\מפרשי המשנה.pdx")) self.pushButton_17.setText(_translate("Dialog", "משניות")) self.pushButton_17.clicked.connect(lambda: self.openFile("ספריה תורנית\משניות\משניות.pdx")) self.pushButton_18.setText(_translate("Dialog", "אחרונים\n" " על\n" " הש\"ס")) self.pushButton_18.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי הש''ס\אחרונים על הש''ס\אחרונים על הש''ס.pdx")) self.pushButton_19.setText(_translate("Dialog", "מראי\n" " מקומות\n" " ש\'\'ס")) self.pushButton_19.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי מראי מקומות ש''ס\ספרי מראי מקומות ש''ס.pdx")) self.pushButton_20.setText(_translate("Dialog", "אוצר\n" " התורה\n" " מיר")) self.pushButton_20.clicked.connect(lambda: self.openFile("ספריה תורנית\אוצר התורה מיר - מאגר מ''מ\אוצר התורה מיר.pdx")) self.pushButton_21.setText(_translate("Dialog", "מדרשים\n" "וספרי\n" " חז\"ל")) self.pushButton_21.clicked.connect(lambda: self.openFile("ספריה תורנית\מדרשים וספרי חז''ל\מדרשים וספרי חז''ל.pdx")) self.pushButton_26.setText(_translate("Dialog", "הלכה")) self.pushButton_26.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\הלכה.pdx")) self.pushButton_27.setText(_translate("Dialog", "שו\"ע ומפרשיו")) self.pushButton_27.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\שולחן ערוך ומפרשיו.pdx")) self.pushButton_28.setText(_translate("Dialog", "רמב\"ם ומפרשיו")) self.pushButton_28.clicked.connect(lambda: self.openFile("ספריה תורנית\אינדקסים\רמב''ם ומפרשיו.pdx")) self.pushButton_29.setText(_translate("Dialog", "טור")) self.pushButton_29.clicked.connect(lambda: self.openFile("ספריה תורנית\טור\טור.pdx")) self.pushButton_30.setText(_translate("Dialog", "ספרי\n" " מצוות")) self.pushButton_30.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי מצוות\ספרי מצוות.pdx")) self.pushButton_31.setText(_translate("Dialog", "מפרשי\n" " הרמב\"ם")) self.pushButton_31.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי הרמב''ם\מפרשי הרמב''ם.pdx")) self.pushButton_32.setText(_translate("Dialog", "רמב\"ם")) self.pushButton_32.clicked.connect(lambda: self.openFile("ספריה תורנית\רמב''ם\רמב''ם.pdx")) self.pushButton_33.setText(_translate("Dialog", "מפרשי\n" "השולחן\n" " ערוך")) self.pushButton_33.clicked.connect(lambda: self.openFile("ספריה תורנית\מפרשי שולחן ערוך\מפרשי שולחן ערוך.pdx")) self.pushButton_34.setText(_translate("Dialog", "שולחן\n" " ערוך")) self.pushButton_34.clicked.connect(lambda: self.openFile("ספריה תורנית\שולחן ערוך\שולחן ערוך.pdx")) self.pushButton_35.setText(_translate("Dialog", "ספרי\n" " ראשונים")) self.pushButton_35.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי ראשונים\ספרי ראשונים.pdx")) self.pushButton_36.setText(_translate("Dialog", "ספרי\n" " אחרונים")) self.pushButton_36.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי אחרונים\ספרי אחרונים.pdx")) self.pushButton_37.setText(_translate("Dialog", "ספרי שו\"ת")) self.pushButton_37.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי שו''ת\ספרי שו''ת.pdx")) self.pushButton_38.setText(_translate("Dialog", "ספרי הגרח\'\'ק\n" " זצוק\"ל")) self.pushButton_38.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי הגרח''ק זצ''ל\ספרי הגרח''ק זצ''ל.pdx")) self.pushButton_39.setText(_translate("Dialog", "הגדה\n" " של\n" " פסח")) self.pushButton_39.clicked.connect(lambda: self.openFile("ספריה תורנית\הגדה של פסח\הגדה של פסח.pdx")) self.pushButton_40.setText(_translate("Dialog", "מנהגים")) self.pushButton_40.clicked.connect(lambda: self.openFile("ספריה תורנית\מנהגים\מנהגים.pdx")) self.pushButton_41.setText(_translate("Dialog", "ענייני שביעית")) self.pushButton_41.clicked.connect(lambda: self.openFile("ספריה תורנית\עניני שביעית\ענייני שביעית.pdx")) self.pushButton_42.setText(_translate("Dialog", "מחשבה ומוסר")) self.pushButton_42.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי מחשבה ומוסר\ספרי מחשבה ומוסר.pdx")) self.pushButton_43.setText(_translate("Dialog", "קבלה")) self.pushButton_43.clicked.connect(lambda: self.openFile("ספריה תורנית\קבלה\קבלה.pdx")) self.pushButton_44.setText(_translate("Dialog", "ספרי כללים")) self.pushButton_44.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי כללים\ספר כללים.pdx")) self.pushButton_45.setText(_translate("Dialog", "הג\'\'ר אברהם\n" " גנחובסקי")) self.pushButton_45.clicked.connect(lambda: self.openFile("ספריה תורנית\הג''ר אברהם גנחובסקי זצ''ל\הג''ר אברהם גנחובסקי זצ''ל.pdx")) self.pushButton_46.setText(_translate("Dialog", "אגרות")) self.pushButton_46.clicked.connect(lambda: self.openFile("ספריה תורנית\אגרות\אגרות.pdx")) self.pushButton_47.setText(_translate("Dialog", "דקדוק")) self.pushButton_47.clicked.connect(lambda: self.openFile("ספריה תורנית\דקדוק\דקדוק.pdx")) self.pushButton_48.setText(_translate("Dialog", "שונות")) self.pushButton_48.clicked.connect(lambda: self.openFile("ספריה תורנית\שונות\שונות.pdx")) self.pushButton_49.setText(_translate("Dialog", "חסידות")) self.pushButton_49.clicked.connect(lambda: self.openFile("ספריה תורנית\ספרי חסידות\חסידות.pdx")) if __name__ == "__main__": import sys app = QApplication(sys.argv) Dialog = QDialog() ui = Ui_Dialog() ui.setupUi(Dialog) Dialog.show() sys.exit(app.exec_())
מה שאמור לצאת מזה בסופו של דבר זה מסך עם כפתורים שכל אחד מהם יפתח קובץ אחר בלחיצה עליו. כזה:
-
סקריפט פייתון מקומפל מזוהה כוירוס@אף-אחד-3 כנ"ל
-
סקריפט פייתון מקומפל מזוהה כוירוס@אף-אחד-3 גם לי זה קרה עם תוכנה שכל מה שיש בה זה כפתורים שלחיצה עליהם פותחת קבצים מסוימים שנמצאים מחוץ לתוכנה.
-
תוכנת אנקי לזכרון הלימוד@פלורידה אי אפשר. הם לא תואמים לגירסא הישנה של התוכנה.
-
תוכנת אנקי לזכרון הלימודבס"ד.
משוחררת גירסת בדיקה לגירסה הבאה של אנקי.
לפני רשימת השיפורים אציין ש:
א: האופציה להדפסה ישירה מהתוכנה בוטלה בגלל הבעיה הזאת
ב: התוכנה מכאן ואילך מתאימה אך ורק למחשבים בעלי מערכת הפעלה windows 10 64 bit. זה לא תלוי בנו ואין לפנות אלינו בנושא.
ג: מכיון שמדובר בגרסת ניסוי ובדיקה- מומלץ לגבות לפני ההתקנה ובמהלך השימוש. (בלי קשר לזה- רק היום קיבלנו מייל עם בקשת עזרה ממשתמש שנמחק לו המחשב וחבל.)
ד: תוכנית ההתקנה והשימוש בתוכנה נבדקו לפני ההפצה אולם איני לוקח אחריות על כל נזק או צער שיגרם כתוצאה מהתקנה כושלת, תקלות או בעיות אחרות מכל סוג.רשימת השיפורים:
הגירסא של התוכנה עצמה חדשה יותר (2.1.54) ויש בה שיפורים רבים.
הבולטים שבהם:
שיפורים מרכזיים:- שיפור ניכר במהירות של התוכנה
- כעת אין איטיות במסך הראשי גם בחפיסות מרובות.
- מערכת יצירת הגיבויים השתפרה וכעת ישנו גיבוי כמה פעמים ביום, שבוע וחודש.
- אפשרות לקבוע את סדר תצוגת השאלות בהגדרות החפיסה לפי מגוון אפשרויות
- שיפורים נוספים:
- שיפורים שונים במתזמן V3 (ניתן להפעלה דרך העדפות). (המתזמן קובע את המרווחים ואת תהליך הבחינה.)
- עורך תגים חדש
- טיפול משופר בתמונות בעורך
- כפתור הסר עיצוב חדש עם בחירה מה להסיר (לסוג כתב וגודל כתב יש להשתמש בכפתור נקה עיצוב שמסיר את הכל)
- נוסף כפתור השלם את החסר נוסף כדי לאפשר יצירת הסתרה נוספת באותו כרטיס ולא כמו שהיה עד היום שכדי להציג שתי הסתרות היה צורך לשנות את המספר שבסוגריים ידנית.
- אפשרות שאנקי יעבור כעת למצב יום או לילה באופן אוטומטי בהתאם להגדרות המערכת שלך
טיפול גיבוי מעובד מחדש: - גיבויים נוצרים הרבה יותר מהר ממה שהם היו בעבר.
- אנקי יכול כעת ליצור גיבויים מעת לעת. ברירת המחדל היא כל 30 דקות; ניתן להתאים זאת במסך ההעדפות.
- ישנן אפשרויות חדשות בהעדפות לשלוט במספר הגיבויים היומיים, השבועיים והחודשיים שברצונך לשמור עליהם.
- בתפריט 'קובץ' יש כעת אפשרות ליצור גיבוי באופן מיידי.
מאחר שתבנית אחסון הגיבוי השתנתה, גיבויים שנוצרו עם 2.1.50 ואילך לא יהיו ניתנים לייבוא לגרסאות ישנות יותר של Anki. - ייבוא/ייצוא של .colpkg מעובד מחדש :
- בעת ייצוא, אתה יכול (אופציונלי) לבחור באפשרות ייצוא לקובץ Anki 2.1.50+. כאשר עושים זאת, הייבוא והיצוא מהירים יותר, וקבצי המדיה יידחסו, אך ה- .colpkg המתקבל לא יהיה קריא על ידי גירסאות אנקי ישנות יותר.
- איפשור זמני תשובה מרביים ארוכים יותר בהגדרות החפיסה.
- מגוון שיפורי באגים
בנוסף שיפרנו גם אנו מספר דברים:
א. תוקן הבאג שגרם לשגיאה בתפריט שינוי גופן שהתווסף בעדכון האחרון.
ב. התבנית של שאלות מרובות שודרגה וכעת התווספו לחצנים המאפשרים הצגה של כל שאלה או תשובה לחוד מבלי שהקודם יוסתר וכן הצגת או הסתרת הכל.
ג. יש אפשרות לביטול מצב העריכה האוטומטי תוך כדי מבחן.מכיון שהתוכנה עצמה השתנתה מאוד מאז הגירסא הקודמת ונדרשה עבודה מאומצת ביותר להתאמת התוספים והשיפורים לגירסא זו נבקש מכל משתמש לשלוח אלינו דיווח על תקלות במידה וישנן על מנת שנוכל לטפל בהן.
הרבה שטייגען!
-
המרת קוד מPyQt5 לPyQt6אולי מישהו יודע בכל זאת?
(אני מעוניין להפיץ גרסת בדיקה חדשה וזה מתעכב רק בגלל הבעיה הזאת) -
המרת קוד מPyQt5 לPyQt6אני מנסה להדפיס תוכן html המוצג בQWebEngineView על ידי מדפסת. להלן יובאו דוגמאות שמבצעות זאת על ידי מדפסת של Qt - QPrinter.
כאן יש דוגמא עובדת לpyqt5.
אני זקוק להמרה שלה לPyqt6.
ניסיתי לעשות זאת בעצמי ללא הצלחה.
יש כאן דוגמא מקבילה בqt5 ל C++
וכאן יש את אותה הדוגמא לqt6 לC++זה הקוד שמובא בקישור הראשון לpyqt5.
from PyQt5.QtCore import (QCoreApplication, QEventLoop, QObject, QPointF, Qt, QUrl, pyqtSlot) from PyQt5.QtGui import QKeySequence, QPainter from PyQt5.QtPrintSupport import QPrintDialog, QPrinter, QPrintPreviewDialog from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineView from PyQt5.QtWidgets import QApplication, QDialog, QLabel, QProgressBar, QProgressDialog, QShortcut class PrintHandler(QObject): def __init__(self, parent = None): super().__init__(parent) self.m_page = None self.m_inPrintPreview = False def setPage(self, page): assert not self.m_page self.m_page = page self.m_page.printRequested.connect(self.printPreview) @pyqtSlot() def print(self): printer = QPrinter(QPrinter.HighResolution) dialog = QPrintDialog(printer, self.m_page.view()) if dialog.exec_() != QDialog.Accepted: return self.printDocument(printer) @pyqtSlot() def printPreview(self): if not self.m_page: return if self.m_inPrintPreview: return self.m_inPrintPreview = True printer = QPrinter() preview = QPrintPreviewDialog(printer, self.m_page.view()) preview.paintRequested.connect(self.printDocument) preview.exec() self.m_inPrintPreview = False @pyqtSlot(QPrinter) def printDocument(self, printer): loop = QEventLoop() result = False def printPreview(success): nonlocal result result = success loop.quit() progressbar = QProgressDialog(self.m_page.view()) progressbar.findChild(QProgressBar).setTextVisible(False) progressbar.setLabelText("Wait please...") progressbar.setRange(0, 0) progressbar.show() progressbar.canceled.connect(loop.quit) self.m_page.print(printer, printPreview) loop.exec_() progressbar.close() if not result: painter = QPainter() if painter.begin(printer): font = painter.font() font.setPixelSize(20) painter.setFont(font) painter.drawText(QPointF(10, 25), "Could not generate print preview.") painter.end() def main(): import sys QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) app.setApplicationName("Previewer") view = QWebEngineView() view.setUrl(QUrl("https://stackoverflow.com/questions/59438021")) view.resize(1024, 750) view.show() handler = PrintHandler() handler.setPage(view.page()) printPreviewShortCut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_P), view) printShortCut = QShortcut(QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_P), view) printPreviewShortCut.activated.connect(handler.printPreview) printShortCut.activated.connect(handler.print) sys.exit(app.exec_()) if __name__ == "__main__": main()
וזה מה שהספקתי לעשות לפני שהתייאשתי:
from PyQt6.QtCore import (QCoreApplication, QEventLoop, QObject, QPointF, Qt, QUrl, pyqtSlot) from PyQt6.QtGui import QKeySequence, QPainter, QShortcut from PyQt6.QtPrintSupport import QPrintDialog, QPrinter, QPrintPreviewDialog, QAbstractPrintDialog from PyQt6.QtWebEngineWidgets import QWebEngineView from PyQt6.QtWidgets import QApplication, QDialog, QLabel, QProgressBar, QProgressDialog, QWidget class PrintHandler(QObject): def __init__(self, parent = None): super().__init__(parent) self.m_page = None self.m_inPrintPreview = False def setPage(self, page): assert not self.m_page self.m_page = page self.m_page.printRequested.connect(self.printPreview) @pyqtSlot() def print(self): printer = QPrinter(QPrinter.PrinterMode.HighResolution) dialog = QPrintDialog(printer, self.m_page.view()) if dialog.exec() != QDialog.accepted: return self.printDocument(printer) @pyqtSlot() def printPreview(self): if not self.m_page: return if self.m_inPrintPreview: return self.m_inPrintPreview = True printer = QPrinter() preview = QPrintPreviewDialog(printer) preview.paintRequested.connect(self.printDocument) preview.exec() self.m_inPrintPreview = False @pyqtSlot(QPrinter) def printDocument(self, printer): loop = QEventLoop() result = False def printPreview(success): nonlocal result result = success loop.quit() progressbar = QProgressDialog(self.m_page.view()) progressbar.findChild(QProgressBar).setTextVisible(False) progressbar.setLabelText("Wait please...") progressbar.setRange(0, 0) progressbar.show() progressbar.canceled.connect(loop.quit) self.m_page.print(printer, printPreview) loop.exec_() progressbar.close() if not result: painter = QPainter() if painter.begin(printer): font = painter.font() font.setPixelSize(20) painter.setFont(font) painter.drawText(QPointF(10, 25), "Could not generate print preview.") painter.end() def main(): import sys # QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) app.setApplicationName("Previewer") view = QWebEngineView() view.setUrl(QUrl("https://stackoverflow.com/questions/59438021")) view.resize(1024, 750) view.show() # printPreviewShortCut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_P), view) # printShortCut = QShortcut(QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_P), view) import threading def gfg(): print("1234") handler = PrintHandler() handler.setPage(view.page()) handler.print() # handler.printPreview() timer = threading.Timer(7.0, gfg) timer.start() sys.exit(app.exec()) if __name__ == "__main__": main()
תודה.
-
שעה ותאריך בlog של vsdoceהאם יש הגדרה כלשהיא להצגת השעה שבה נרשמת כל שורה בLog של הoutput?
אם זה משנה, השאלה היא גם על vscode גם תחת לינוקס וגם תחת windows.
תודה -
JS - תאריך עברי באותיותתודה לכולם על התשובות!
כנראה שנעבוד עם גימטריא.
מכיון שמדובר בתוכנת מחשב בשימוש תדיר ואני מעדיף להכביד כמה שפחות ולהקטין את גודל ההתקנה, נראה לי ששימוש בספריות חיצוניות יהיה פחות יעיל. -
קבוצת התכנות הסגורה@dovid ברצוני להוסיף נקודה קטנה: כרגע האתר כאן הוא היחיד שנותן מענה לתכנות בעברית בצורה נאותה ובשפה של הציבור שלנו.
לדעתי העניה, לצמצם את המידע שבו עוד יותר על ידי מניעת גישה לחומרים נוספים גורמת הפסד לכל מי שאין לו גישה.
בסופו של דבר, אם אתר כמו stack ודומיו היו סוגרים חלקים מהאתר, לציבור היה הרבה פחות מידע נגיש וכולנו היינו מפסידים.
וכן לגבי בקשת תוכן משם- מכיון שאי אפשר לדעת אילו נושאים נידונו שם (חוץ מכמה קישורים "מסתוריים" לשם), אין לאף אחד מושג מה לבקש.
אולי היה יותר יעיל לסנן משם מה שיכול להביא תועלת כללית.
וכאן אודה שוב על האתר והעזרה הרבה שאני מקבל כאן לכל נושא.
בעצם זו גם תודה מאלפי האברכים ובני התורה, משתמשי התוכנה לזכרון הלימוד.
יישר כחכם!