From c265c431bed24fd4afeca78daf30da439b9d131c Mon Sep 17 00:00:00 2001 From: Claudio Santini Date: Wed, 15 Jan 2025 00:06:05 +0100 Subject: [PATCH] fix --- .github/workflows/pip-install.yaml | 2 +- audiblez.py | 6 +++++- pyproject.toml | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pip-install.yaml b/.github/workflows/pip-install.yaml index 52b7570..0bc3b3e 100644 --- a/.github/workflows/pip-install.yaml +++ b/.github/workflows/pip-install.yaml @@ -1,4 +1,4 @@ -name: GitHub Action for installing and testing the package on Python 3.11 +name: Installing via pip and running run-name: pip install and run on: [ push, pull_request ] jobs: diff --git a/audiblez.py b/audiblez.py index 67e5124..1f5a016 100755 --- a/audiblez.py +++ b/audiblez.py @@ -125,7 +125,7 @@ def create_m4b(chaptfer_files, filename): print('Feel free to delete the intermediary .wav chapter files, the .m4b is all you need.') -if __name__ == '__main__': +def cli_main(): if not Path('kokoro-v0_19.onnx').exists() or not Path('voices.json').exists(): print('Error: kokoro-v0_19.onnx and voices.json must be in the current directory. Please download them with:') print('wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx') @@ -146,3 +146,7 @@ if __name__ == '__main__': sys.exit(1) args = parser.parse_args() main(kokoro, args.epub_file_path, args.lang, args.voice) + + +if __name__ == '__main__': + cli_main() diff --git a/pyproject.toml b/pyproject.toml index 438b566..a93f206 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [project] name = "audiblez" -version = "0.1.2" +version = "0.1.3" description = "" authors = [ { name = "Claudio Santini", email = "hireclaudio@gmail.com" } ] readme = "README.md" -requires-python = ">=3.10,<3.13" +requires-python = ">=3.9,<3.13" # librosa/llvmlite have no support for python > 3.12 dependencies = [ "bs4 (==0.0.2)", "attrs (==24.3.0)", @@ -89,4 +89,4 @@ Repository = "https://github.com/santinic/audiblez" Issues = "https://github.com/santinic/audiblez/issues" [project.scripts] -audiblez = "audiblez:main" \ No newline at end of file +audiblez = "audiblez:cli_main" \ No newline at end of file