Added changelog, cli for errors, fixes and improvements in code

This commit is contained in:
Deniz Şafak
2025-04-27 01:21:16 +03:00
parent e9c901d0d5
commit b7c1862651
5 changed files with 25 additions and 8 deletions
+4
View File
@@ -0,0 +1,4 @@
- Switched from setuptools to hatchling for packaging.
- Added classifiers to the package metadata.
- Fixed "No module named 'docopt'" and "setuptools.build_meta" import errors while using .bat installer in Windows, mentioned by @nigelp in https://github.com/denizsafak/abogen/issues/2
- Improved code and documentation.
+3 -1
View File
@@ -146,7 +146,9 @@ abogen # Opens the GUI
Feel free to explore the code and make any changes you like. Feel free to explore the code and make any changes you like.
## `Credits` ## `Credits`
Abogen uses [Kokoro](https://github.com/hexgrad/kokoro) for its high-quality, natural-sounding text-to-speech synthesis. Huge thanks to the Kokoro project and its contributors for making this possible. - Abogen uses [Kokoro](https://github.com/hexgrad/kokoro) for its high-quality, natural-sounding text-to-speech synthesis. Huge thanks to the Kokoro team for making this possible.
- Thanks to [@wojiushixiaobai](https://github.com/wojiushixiaobai) for [Embedded Python](https://github.com/wojiushixiaobai/Python-Embed-Win64) packages. These modified packages include pip pre-installed, enabling Abogen to function as a standalone application without requiring users to separately install Python in Windows.
- Special thanks to the [PyQt](https://www.riverbankcomputing.com/software/pyqt/) team for providing the cross-platform GUI toolkit that powers Abogen's interface.
## `License` ## `License`
This project is available under the MIT License - see the [LICENSE](https://github.com/denizsafak/abogen/blob/main/LICENSE) file for details. This project is available under the MIT License - see the [LICENSE](https://github.com/denizsafak/abogen/blob/main/LICENSE) file for details.
+13 -6
View File
@@ -218,11 +218,20 @@ if errorlevel 1 (
exit /b exit /b
) )
:: Install sphinx and hatchling :: Install docopt's fixed version
echo Installing sphinx and hatchling... echo Installing fixed version of docopt...
%PYTHON_CONSOLE_PATH% -m pip install --upgrade sphinx hatchling --no-warn-script-location %PYTHON_CONSOLE_PATH% -m pip install --force-reinstall https://github.com/denizsafak/abogen/raw/refs/heads/main/abogen/resources/docopt-0.6.2-py2.py3-none-any.whl --no-warn-script-location
if errorlevel 1 ( if errorlevel 1 (
echo Failed to install hatchling. echo Failed to install fixed version of docopt.
pause
exit /b
)
:: Install setup requirements
echo Installing setup requirements...
%PYTHON_CONSOLE_PATH% -m pip install --upgrade setuptools wheel sphinx hatchling --no-warn-script-location
if errorlevel 1 (
echo Failed to install setup requirements.
pause pause
exit /b exit /b
) )
@@ -295,5 +304,3 @@ echo Starting %NAME%...
start "" %RUN% %* start "" %RUN% %*
exit /b exit /b
+2 -1
View File
@@ -5,6 +5,7 @@ from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import QIcon from PyQt5.QtGui import QIcon
from abogen.gui import abogen from abogen.gui import abogen
from abogen.utils import get_resource_path from abogen.utils import get_resource_path
from abogen import PROGRAM_NAME, VERSION
# Ensure sys.stdout and sys.stderr are valid in GUI mode # Ensure sys.stdout and sys.stderr are valid in GUI mode
if sys.stdout is None: if sys.stdout is None:
@@ -20,7 +21,7 @@ if platform.system() == "Darwin" and platform.processor() == "arm":
if platform.system() == "Windows": if platform.system() == "Windows":
import ctypes import ctypes
app_id = "abogen.v1.0.0" app_id = f"{PROGRAM_NAME}.{VERSION}"
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id) ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id)
# Handle Wayland on Linux GNOME # Handle Wayland on Linux GNOME
+3
View File
@@ -45,6 +45,9 @@ Issues = "https://github.com/denizsafak/abogen/issues"
[project.gui-scripts] [project.gui-scripts]
abogen = "abogen.main:main" abogen = "abogen.main:main"
[project.scripts]
abogen-cli = "abogen.main:main"
[tool.hatch.build.targets.sdist] [tool.hatch.build.targets.sdist]
exclude = [ exclude = [
"/.github", "/.github",