Skip to content

Commit

Permalink
v0.0.4; fixed import statements for pip package
Browse files Browse the repository at this point in the history
  • Loading branch information
eliranwong committed Oct 10, 2024
1 parent 9c9272b commit 7e38005
Showing 51 changed files with 102 additions and 105 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
# https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/
setup(
name=package,
version="0.0.3",
version="0.0.4",
python_requires=">=3.8, <3.13",
description=f"UniqueBible App is a cross-platform & offline bible application, integrated with high-quality resources and unique features. Developers: Eliran Wong and Oliver Tseng",
long_description=long_description,
3 changes: 0 additions & 3 deletions uniquebible/main.py
Original file line number Diff line number Diff line change
@@ -112,9 +112,6 @@
if os.path.isfile(nltk_data2) and not os.path.isdir(nltk_data2_destination_folder):
shutil.unpack_archive(nltk_data2, corpora_folder)

# Save changes in config
ConfigUtil.save()

# exit application if it is run for setup only
if config.runMode == "setup-only":
print("UniqueBibleApp installed!")
8 changes: 4 additions & 4 deletions uniquebible/plugins/context/Charts and Table.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from uniquebible import config
from util.BibleVerseParser import BibleVerseParser
from gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
if config.qtLibrary == "pyside6":
#from PySide6.QtWebEngineWidgets import QWebEngineView
from PySide6.QtWidgets import QStackedWidget, QWidget, QVBoxLayout, QHBoxLayout, QRadioButton, QPushButton
from gui.PieChart import PieChart
from gui.BarChart import BarChart
from uniquebible.gui.PieChart import PieChart
from uniquebible.gui.BarChart import BarChart
else:
#from qtpy.QtWebEngineWidgets import QWebEngineView
from qtpy.QtWidgets import QStackedWidget, QWidget, QVBoxLayout, QHBoxLayout, QRadioButton, QPushButton
4 changes: 2 additions & 2 deletions uniquebible/plugins/context/Gmail.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
4 changes: 2 additions & 2 deletions uniquebible/plugins/context/Google.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uniquebible import config
from util.BibleVerseParser import BibleVerseParser
from uniquebible.util.BibleVerseParser import BibleVerseParser

if config.pluginContext:
config.mainWindow.showNoteEditor()
6 changes: 3 additions & 3 deletions uniquebible/plugins/context/Interlinear Data.py
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ def setupUI(self, initialVerse=""):
self.setLayout(mainLayout)

def resetItems(self):
from util.BibleVerseParser import BibleVerseParser
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtGui import QStandardItem
else:
@@ -135,7 +135,7 @@ def addToWorkspace(self):

def exportSpreadsheet(self):
import sys
from install.module import installmodule
from uniquebible.install.module import installmodule

module = "openpyxl"

@@ -201,7 +201,7 @@ def runExportSpreadsheet(self):
# Use 'xlsxwriter' to export excel file if 'openpyxl' is not installed.
def exportSpreadsheet2(self):
import sys
from install.module import installmodule
from uniquebible.install.module import installmodule

module = "xlsxwriter"

4 changes: 2 additions & 2 deletions uniquebible/plugins/context/Louw-Nida Lexicon Gloss.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
4 changes: 2 additions & 2 deletions uniquebible/plugins/context/Microsoft Outlook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from util.TextUtil import TextUtil
from gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Read All Verses.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

from uniquebible import config
import re, os, platform
from util.WebtopUtil import WebtopUtil
from uniquebible.util.WebtopUtil import WebtopUtil

def findText(html):
searchPattern = """[Rr][Ee][Aa][Dd][Vv][Ee][Rr][Ss][Ee]:::([A-Za-z0-9]+?)\.([0-9]+?)\.([0-9]+?)\.([0-9]+?)["']"""
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ def setupSearchItemsLayoutWidgets(self):
from PySide6.QtWidgets import QPushButton, QHBoxLayout, QLabel
else:
from qtpy.QtWidgets import QPushButton, QHBoxLayout, QLabel
from gui.CheckableComboBox import CheckableComboBox
from uniquebible.gui.CheckableComboBox import CheckableComboBox

layout = QHBoxLayout()
wordAudioButton = QPushButton("Audio")
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/YouTube Downloader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uniquebible import config
from util.TextUtil import TextUtil
from uniquebible.util.TextUtil import TextUtil

if config.pluginContext:
content = TextUtil.plainTextToUrl(config.pluginContext)
4 changes: 2 additions & 2 deletions uniquebible/plugins/context/YouTube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
8 changes: 4 additions & 4 deletions uniquebible/plugins/menu/Bible Characters.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from uniquebible import config
import os, apsw, re, webbrowser
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import ExlbData
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import ExlbData
from uniquebible.db.BiblesSqlite import BiblesSqlite
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtGui import QStandardItemModel, QStandardItem
from PySide6.QtWidgets import QWidget, QTextEdit, QRadioButton, QPushButton, QLabel, QListView, QAbstractItemView, QHBoxLayout, QVBoxLayout, QLineEdit
6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Bible Chat.py
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
if "Pocketsphinx" in config.enabled:
from pocketsphinx import LiveSpeech, get_model_path
from datetime import datetime
from util.Languages import Languages
from util.FileUtil import FileUtil
from uniquebible.util.Languages import Languages
from uniquebible.util.FileUtil import FileUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt, QThread, Signal, QRegularExpression
from PySide6.QtPrintSupport import QPrinter, QPrintDialog
@@ -20,7 +20,7 @@
from qtpy.QtPrintSupport import QPrinter, QPrintDialog
from qtpy.QtGui import QStandardItemModel, QStandardItem, QGuiApplication, QFontMetrics, QTextDocument
from qtpy.QtWidgets import QCompleter, QAction, QMainWindow, QWidget, QDialog, QFileDialog, QDialogButtonBox, QFormLayout, QLabel, QMessageBox, QCheckBox, QPlainTextEdit, QProgressBar, QPushButton, QListView, QHBoxLayout, QVBoxLayout, QLineEdit, QSplitter, QComboBox
from gui.Worker import ChatGPTResponse, OpenAIImage
from uniquebible.gui.Worker import ChatGPTResponse, OpenAIImage


class SpeechRecognitionThread(QThread):
8 changes: 4 additions & 4 deletions uniquebible/plugins/menu/Bible Commentaries.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from uniquebible import config
import os, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import Commentary
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import Commentary
from uniquebible.db.BiblesSqlite import BiblesSqlite
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Bible Data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from uniquebible import config
import os, shutil, re, webbrowser
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from util.FileUtil import FileUtil
from uniquebible.db.BiblesSqlite import BiblesSqlite
from uniquebible.util.BibleVerseParser import BibleVerseParser
from uniquebible.util.FileUtil import FileUtil
if config.qtLibrary == "pyside6":
from PySide6.QtGui import QStandardItemModel, QStandardItem
from PySide6.QtCore import Qt
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Bible Dictionaries.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import DictionaryData
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import DictionaryData
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Bible Encyclopedia.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import EncyclopediaData
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import EncyclopediaData
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Bible Lexicons.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from uniquebible import config
import os
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import Lexicon
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import Lexicon
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
10 changes: 5 additions & 5 deletions uniquebible/plugins/menu/Bible Locations.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from uniquebible import config
import gmplot, os, webbrowser, re
from util.exlbl import allLocations
from gui.CheckableComboBox import CheckableComboBox
from gui.WebEngineViewPopover import WebEngineViewPopover
from util.BibleVerseParser import BibleVerseParser
from db.ToolsSqlite import IndexesSqlite
from uniquebible.util.exlbl import allLocations
from uniquebible.gui.CheckableComboBox import CheckableComboBox
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.util.BibleVerseParser import BibleVerseParser
from uniquebible.db.ToolsSqlite import IndexesSqlite
from haversine import haversine

if config.qtLibrary == "pyside6":
6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Bible Parallels.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.BiblesSqlite import BiblesSqlite
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Bible Promises.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.BiblesSqlite import BiblesSqlite
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Bible Timelines.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from uniquebible import config
import os
from gui.ImageViewer import ImageViewer
from util.BibleBooks import BibleBooks
from uniquebible.gui.ImageViewer import ImageViewer
from uniquebible.util.BibleBooks import BibleBooks

imageListViewItems = [
("2210-2090 BCE", "books/Timelines/0.png"), #0
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Bible Topics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import ExlbData
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.ToolsSqlite import ExlbData
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
8 changes: 4 additions & 4 deletions uniquebible/plugins/menu/Bible.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from uniquebible import config
import os, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite, Bible
from util.BibleBooks import BibleBooks
from util.BibleVerseParser import BibleVerseParser
from uniquebible.gui.WebEngineViewPopover import WebEngineViewPopover
from uniquebible.db.BiblesSqlite import BiblesSqlite, Bible
from uniquebible.util.BibleBooks import BibleBooks
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import Qt
from PySide6.QtWebEngineCore import QWebEnginePage
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/ChatGPT.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from uniquebible.gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Display Word Frequency.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from uniquebible import config
from util.BibleBooks import BibleBooks
from uniquebible.util.BibleBooks import BibleBooks

filename = os.path.join(config.marvelData, 'statistics', 'words.stats')
if not os.path.exists(filename):
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Extract Text.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
import sys, os
from install.module import *
from uniquebible.install.module import *
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QFileDialog
else:
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Gmail.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
4 changes: 2 additions & 2 deletions uniquebible/plugins/menu/Google.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
from uniquebible.gui.SimpleBrowser import SimpleBrowser
from uniquebible.util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
else:
6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Interlinear Data.py
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ def setupUI(self, initialVerse=""):
self.setLayout(mainLayout)

def resetItems(self):
from util.BibleVerseParser import BibleVerseParser
from uniquebible.util.BibleVerseParser import BibleVerseParser
if config.qtLibrary == "pyside6":
from PySide6.QtGui import QStandardItem
else:
@@ -135,7 +135,7 @@ def addToWorkspace(self):

def exportSpreadsheet(self):
import sys
from install.module import installmodule
from uniquebible.install.module import installmodule

module = "openpyxl"

@@ -201,7 +201,7 @@ def runExportSpreadsheet(self):
# Use 'xlsxwriter' to export excel file if 'openpyxl' is not installed.
def exportSpreadsheet2(self):
import sys
from install.module import installmodule
from uniquebible.install.module import installmodule

module = "xlsxwriter"

6 changes: 3 additions & 3 deletions uniquebible/plugins/menu/Journal and Bible Reading Plan.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uniquebible import config
from util.readings import allDays
from uniquebible.util.readings import allDays
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QWidget
else:
@@ -50,7 +50,7 @@ def __init__(self, parent):
def setupVariables(self):
import copy, os
from datetime import date
from db.JournalSqlite import JournalSqlite
from uniquebible.db.JournalSqlite import JournalSqlite
self.today = date.today()
self.todayNo = int(format(self.today, '%j'))
if self.todayNo > 365:
@@ -344,7 +344,7 @@ def resetAllItems(self):

def translateIntoChinese(self):
import copy, pprint
from util.BibleBooks import BibleBooks
from uniquebible.util.BibleBooks import BibleBooks
plan = copy.deepcopy(self.template)
filePath = "{0}_zh".format(self.progressFile)
with open(filePath, "w", encoding="utf-8") as fileObj:
Loading

0 comments on commit 7e38005

Please sign in to comment.