From 0e30d10ab2bcef4db29eaaa34b4fdd4b3b71df92 Mon Sep 17 00:00:00 2001 From: Jim137 Date: Sat, 13 Apr 2024 17:21:54 +0800 Subject: [PATCH 1/4] Add exception handling for KeyError in log_paifu function --- paifulogger/log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paifulogger/log.py b/paifulogger/log.py index c94cc61..d89f18d 100644 --- a/paifulogger/log.py +++ b/paifulogger/log.py @@ -259,6 +259,12 @@ def log_paifu( except ValueError: print(local_lang.hint_tw, url) retCode = 1 + except KeyError: + print( + """Please remake the log file by `plog -f [format] -l [lang] -o [output] -r`, + or `python -m plog -f [format] -l [lang] -o [output] -r` manually.""" + ) + return 1 return retCode From 87a188a6bbe6efa31752f12efd8bdf3aac418f30 Mon Sep 17 00:00:00 2001 From: Jim137 Date: Sat, 13 Apr 2024 17:48:35 +0800 Subject: [PATCH 2/4] fix pip script --- paifulogger/version.py | 2 +- pub_tools/pub.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/paifulogger/version.py b/paifulogger/version.py index e44248d..61b7131 100644 --- a/paifulogger/version.py +++ b/paifulogger/version.py @@ -1,4 +1,4 @@ -version = "0.4.0" +version = "0.4.0dev" __version__ = version full_version = version short_version = version.split("dev")[0] diff --git a/pub_tools/pub.py b/pub_tools/pub.py index b057264..b774019 100644 --- a/pub_tools/pub.py +++ b/pub_tools/pub.py @@ -39,9 +39,12 @@ def build_pyproject(): Homepage = "https://github.com/Jim137/Tenhou-Paifu-Logger" [project.scripts] -log = "paifulogger.__main__:main" -plog = "paifulogger.__main__:main" -pdl = "paifulogger.paifu_dl:paifu_dl" +paifu = "paifulogger.__main__:main" +log = "paifulogger.log:main" +plog = "paifulogger.log:main" +plogger = "paifulogger.log:main" +paifulog = "paifulogger.log:main" +pdl = "paifulogger.paifu_dl:main" [tool.setuptools.packages.find] exclude = [ From e66d124598aebcf594b20ce24f005dff176036d5 Mon Sep 17 00:00:00 2001 From: Jim137 Date: Sat, 13 Apr 2024 17:49:34 +0800 Subject: [PATCH 3/4] Bump version to 0.4.0.1 --- paifulogger/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paifulogger/version.py b/paifulogger/version.py index 61b7131..43e442c 100644 --- a/paifulogger/version.py +++ b/paifulogger/version.py @@ -1,4 +1,4 @@ -version = "0.4.0dev" +version = "0.4.0.1" __version__ = version full_version = version short_version = version.split("dev")[0] From 0a83064745685e166e2f972d5c640b0db83393db Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 13 Apr 2024 09:50:02 +0000 Subject: [PATCH 4/4] Auto version bump --- pyproject.toml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cd403ab..488457d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "PaifuLogger" -version = "0.4.0" +version = "0.4.0.1" description = "Logging tenhou paifu into excel or html file with some key information." readme = "README.md" authors = [{ name = "Jim137", email = "jim@mail.jim137.eu.org" }] @@ -23,9 +23,12 @@ requires-python = ">=3.10" Homepage = "https://github.com/Jim137/Tenhou-Paifu-Logger" [project.scripts] -log = "paifulogger.__main__:main" -plog = "paifulogger.__main__:main" -pdl = "paifulogger.paifu_dl:paifu_dl" +paifu = "paifulogger.__main__:main" +log = "paifulogger.log:main" +plog = "paifulogger.log:main" +plogger = "paifulogger.log:main" +paifulog = "paifulogger.log:main" +pdl = "paifulogger.paifu_dl:main" [tool.setuptools.packages.find] exclude = [