Skip to content

Commit

Permalink
pip verson 0.0.3; fixed launching
Browse files Browse the repository at this point in the history
  • Loading branch information
eliranwong committed Oct 10, 2024
1 parent b94e9ff commit 9c9272b
Show file tree
Hide file tree
Showing 78 changed files with 118 additions and 81 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/plugins/menu/**
/plugins/startup/**
/plugins/shutdown/**
/plugins/event/**
/plugins/chatGPT/**
/macros/*.ubam
/macros/save
/tmp
Expand Down Expand Up @@ -83,7 +85,6 @@ uba.sh
util/GitHubCustomRepoCache.py
/ip_blacklist.txt
/ip_whitelist.txt
plugins/event/*.py
secrets/github/*.txt
config.ini
disabled_modules.txt
Expand All @@ -110,7 +111,6 @@ UniqueBibleApp.bat
UniqueBibleAppTerminal.bat
new.mp3
config.py_init
plugins/chatGPT*
iconfile.icns
tmpicns.rsrc
.stop_chatgpt
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/
setup(
name=package,
version="0.0.2",
version="0.0.3",
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,
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/gui/DownloadBibleMp3Dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ def displayMessage(self, text):
pass

def main():
import sys, config
import sys
from uniquebible import config
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QApplication
from PySide6.QtCore import QCoreApplication
Expand Down
4 changes: 2 additions & 2 deletions uniquebible/gui/Worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, parent):
self.threadpool = QThreadPool()

def fineTunePythonCode(self, code):
insert_string = "import config\nconfig.pythonFunctionResponse = "
insert_string = "from uniquebible import config\nconfig.pythonFunctionResponse = "
code = re.sub("^!(.*?)$", r"import os\nos.system(\1)", code, flags=re.M)
if "\n" in code:
substrings = code.rsplit("\n", 1)
Expand Down Expand Up @@ -287,7 +287,7 @@ def getResponse(self, messages, progress_callback, functionJustCalled=False):
if function_name == "python":
config.pythonFunctionResponse = ""
function_args = response_message["function_call"]["arguments"]
insert_string = "import config\nconfig.pythonFunctionResponse = "
insert_string = "from uniquebible import config\nconfig.pythonFunctionResponse = "
if "\n" in function_args:
substrings = function_args.rsplit("\n", 1)
new_function_args = f"{substrings[0]}\n{insert_string}{substrings[-1]}"
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/chatGPT/000_UBA.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config

# General

Expand Down
5 changes: 3 additions & 2 deletions uniquebible/plugins/chatGPT/execute python code.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, json, re
from uniquebible import config
import json, re


# ChatGPT-GUI plugin: Instruct ChatGPT to excute python code directly in response to user input
Expand All @@ -22,7 +23,7 @@

def run_python(function_args):
def fineTunePythonCode(code):
insert_string = "import config\nconfig.pythonFunctionResponse = "
insert_string = "from uniquebible import config\nconfig.pythonFunctionResponse = "
code = re.sub("^!(.*?)$", r"import os\nos.system(\1)", code, flags=re.M)
if "\n" in code:
substrings = code.rsplit("\n", 1)
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/chatGPT/integrate google searches.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, json, googlesearch
from uniquebible import config
import json, googlesearch

# Use google https://pypi.org/project/googlesearch-python/ to search internet for information, about which ChatGPT doesn't know.

Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Charts and Table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.BibleVerseParser import BibleVerseParser
from gui.WebEngineViewPopover import WebEngineViewPopover
if config.qtLibrary == "pyside6":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config

if config.pluginContext and hasattr(config, "lemmatizer"):
lemma = config.lemmatizer.lemmatize(config.pluginContext)
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Gmail.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Google.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.BibleVerseParser import BibleVerseParser

if config.pluginContext:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config

if config.pluginContext:
config.mainWindow.showNoteEditor()
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Interlinear Data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QWidget
else:
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Louw-Nida Lexicon Gloss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Microsoft Outlook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.TextUtil import TextUtil
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Presentation_Ctrl+Shift+Y.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config

presentationParser = config.presentationParser

Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/context/Read All Verses.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This plugin is written for non-Windows device. This is not tested on Windows platform.

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

def findText(html):
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/Run as Command_Ctrl+D.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config

if config.pluginContext:
useLiteVerseParsing = config.useLiteVerseParsing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This plugin search currently opened bible for all forms of selected English word.

import config
from uniquebible import config
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QWidget
else:
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/context/Strong Number to CSV.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, re, os, sys, subprocess, platform
from uniquebible import config
import re, os, sys, subprocess, platform

if config.pluginContext:
if re.match("^[GH][0-9]+?$", config.pluginContext):
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/YouTube Downloader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.TextUtil import TextUtil

if config.pluginContext:
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/context/YouTube.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Characters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re, webbrowser
from uniquebible import config
import os, apsw, re, webbrowser
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import ExlbData
from db.BiblesSqlite import BiblesSqlite
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Chat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, re, openai, tiktoken, sqlite3, webbrowser, shutil, platform
from uniquebible import config
import os, re, openai, tiktoken, sqlite3, webbrowser, shutil, platform
import subprocess, traceback, sys
import urllib.parse
from io import StringIO
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Commentaries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, re
from uniquebible import config
import os, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import Commentary
from db.BiblesSqlite import BiblesSqlite
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, shutil, re, webbrowser
from uniquebible import config
import os, shutil, re, webbrowser
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
from util.FileUtil import FileUtil
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Dictionaries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import DictionaryData
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Encyclopedia.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import EncyclopediaData
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Lexicons.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os
from uniquebible import config
import os
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import Lexicon
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Locations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, gmplot, os, webbrowser, re
from uniquebible import config
import gmplot, os, webbrowser, re
from util.exlbl import allLocations
from gui.CheckableComboBox import CheckableComboBox
from gui.WebEngineViewPopover import WebEngineViewPopover
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Parallels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Promises.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite
from util.BibleVerseParser import BibleVerseParser
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Timelines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os
from uniquebible import config
import os
from gui.ImageViewer import ImageViewer
from util.BibleBooks import BibleBooks

Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible Topics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, apsw, re
from uniquebible import config
import os, apsw, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.ToolsSqlite import ExlbData
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Bible.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, os, re
from uniquebible import config
import os, re
from gui.WebEngineViewPopover import WebEngineViewPopover
from db.BiblesSqlite import BiblesSqlite, Bible
from util.BibleBooks import BibleBooks
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/ChatGPT.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Display Word Frequency.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import config
from uniquebible import config
from util.BibleBooks import BibleBooks

filename = os.path.join(config.marvelData, 'statistics', 'words.stats')
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Extract Text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import config, sys, os
from uniquebible import config
import sys, os
from install.module import *
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QFileDialog
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Gmail.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Google Drive Backup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess, sys, os, config
import subprocess, sys, os
from uniquebible import config

try:
from plugins.menu.GoogleDriveUtility.install import *
Expand Down
3 changes: 2 additions & 1 deletion uniquebible/plugins/menu/Google Drive Restore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess, sys, os, config
import subprocess, sys, os
from uniquebible import config
try:
from plugins.menu.GoogleDriveUtility.install import *
from googleapiclient.discovery import build
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Google.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
from util.TextUtil import TextUtil
if config.qtLibrary == "pyside6":
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Interlinear Data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QWidget
else:
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Journal and Bible Reading Plan.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.readings import allDays
if config.qtLibrary == "pyside6":
from PySide6.QtWidgets import QWidget
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Calendar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Excel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Office 365.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft OneDrive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft OneNote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Outlook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from util.TextUtil import TextUtil
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft PowerPoint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/plugins/menu/Microsoft Teams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config
from uniquebible import config
from gui.SimpleBrowser import SimpleBrowser
if config.qtLibrary == "pyside6":
from PySide6.QtCore import QUrl
Expand Down
Loading

0 comments on commit 9c9272b

Please sign in to comment.