From b791dd3d1a760f5479a346f27682f0be1efd99d9 Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 02:15:05 +0300 Subject: [PATCH 1/7] Update Watermarkd.py --- Watermarkd/Watermarkd.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Watermarkd/Watermarkd.py b/Watermarkd/Watermarkd.py index 9a610e0..c0176ef 100644 --- a/Watermarkd/Watermarkd.py +++ b/Watermarkd/Watermarkd.py @@ -65,10 +65,12 @@ def gui1(): break elif event=="Preview": - - img_path=values["-IN2-"] - img = Image.open(img_path).convert("RGBA") - img.show() + try: + img_path=values["-IN2-"] + img = Image.open(img_path).convert("RGBA") + img.show() + except Exception: + pass elif event == "Submit": img_path=values["-IN2-"] @@ -189,8 +191,10 @@ def single(img_path="", gui=False, wm_text="Watermarkd", font_name="arial.ttf", if gui==False: pass elif gui==True: - img_path, wm_text, wm_trans, font_size, save_to_path, output_filename = Spread.gui1() - + try: + img_path, wm_text, wm_trans, font_size, save_to_path, output_filename = Spread.gui1() + except Exception: + return None #Creating Image Layers img = Image.open(img_path).convert("RGBA") @@ -233,8 +237,11 @@ def batch(gui=False, folder_path="", wm_text="Watermarkd", font_name="arial.ttf" if gui==False: pass elif gui==True: - folder_path, wm_text, wm_trans, font_size, save_to_path, filename, save_to_suffix = Spread.gui2() - + try: + folder_path, wm_text, wm_trans, font_size, save_to_path, filename, save_to_suffix = Spread.gui2() + except: + return None + file=os.scandir(folder_path) try: From d4e10924db2353f7d5f25974ca70e19627e35516 Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 02:45:14 +0300 Subject: [PATCH 2/7] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 266c51a..dcdfd94 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Friendly Watermarking Software with GUI option. # Watermarkd User Manual +You can find a couple of simple examples below. You are also welcome to visit this tutorial on holypython.com: [How to Use Watermarkd: A Batch Watermarking Library with GUI](https://holypython.com/watermarkd) # Installation @@ -51,6 +52,8 @@ import Watermarkd as wmd wmd.Spread.single(gui=True) ``` +[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Single_GUI.webp)] + ### Working Without GUI ```python @@ -71,8 +74,9 @@ import Watermarkd as wmd wmd.Spread.batch(folder_path=r"c://Users/ABC/Desktop/New_Photos") ``` -* GUI for Batch Function is in the works. -** Files will be saved to Desktop/watermarkd_/ folder by default. +[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Batch_GUI.webp)] + +* Files will be saved to Desktop/watermarkd_/ folder by default. ## Functions From 79cc93f8e8735c84c3e7e87883c02499470fa73c Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 02:51:50 +0300 Subject: [PATCH 3/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 266c51a..ad2ffaa 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ It's expected to be dominantly used by: | 0.7.1.0 | September 29, 2020 - New Version w/ batch GUI: __init__.py fixed, bugs fixed | | 0.7.1.1 | September 29, 2020 - New Version: code typo fixed | | 0.7.1.2 | September 29, 2020 - New Version: logo fixed, source code correct description added | +| 0.7.2.0 | October 5, 2020 - New Version: GUI Exit behavior improved | ## Release Notes @@ -179,6 +180,8 @@ It's expected to be dominantly used by: 0.7.1.0 - Added Batch GUI, fixed Cancel button, fixed path conflicts +0.7.2.0 - When GUI is closed without picking any image or folder, instead of giving an error, function is terminated by returning None. This should allow repeat operations in a single session and make usage more convenient and smooth for users. + ### Upcoming Work ~Batch Graphic User Interface (done)~ From 083a4d7704c34a9acec9e1762cbb2628d5cb2fa7 Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 03:07:55 +0300 Subject: [PATCH 4/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb93dc8..7b6c0a8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Friendly Watermarking Software with GUI option. # Watermarkd User Manual -You can find a couple of simple examples below. You are also welcome to visit this tutorial on holypython.com: [How to Use Watermarkd: A Batch Watermarking Library with GUI](https://holypython.com/watermarkd) +You can find a couple of simple examples below. You are also welcome to visit this tutorial on holypython.com: [How to Use Watermarkd: A Batch Watermarking Library with GUI](https://holypython.com/watermarkd/) # Installation @@ -52,7 +52,7 @@ import Watermarkd as wmd wmd.Spread.single(gui=True) ``` -[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Single_GUI.webp)] +![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Single_GUI.webp) ### Working Without GUI @@ -74,7 +74,7 @@ import Watermarkd as wmd wmd.Spread.batch(folder_path=r"c://Users/ABC/Desktop/New_Photos") ``` -[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Batch_GUI.webp)] +![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Batch_GUI.webp) * Files will be saved to Desktop/watermarkd_/ folder by default. From b0ca8ef24c74811d64db9de1b6b98410fbd8a87e Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 03:13:02 +0300 Subject: [PATCH 5/7] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b6e59b9..4dfab33 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ author='holypython.com', author_email='watermarkd@holypython.com', url="https://holypython.com/", - download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.1.2.tar.gz', + download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.2.0.tar.gz', packages=['Watermarkd'], keywords = ['watermarking', 'image processing', 'watermark', 'photography', 'copyrights', 'holypython', 'batch watermark', 'holypython.com'], classifiers=[ From 4b7d01b248571c3a503f0af08d31fca66d6a30b2 Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 03:14:18 +0300 Subject: [PATCH 6/7] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4dfab33..c0eb18d 100644 --- a/setup.py +++ b/setup.py @@ -14,14 +14,14 @@ setup( name='Watermarkd', - version='0.7.2.0', + version='0.7.2.1', description='A friendly watermarking tool with optional GUI component.', license="Apache-2.0", long_description=long_description, author='holypython.com', author_email='watermarkd@holypython.com', url="https://holypython.com/", - download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.2.0.tar.gz', + download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.2.1.tar.gz', packages=['Watermarkd'], keywords = ['watermarking', 'image processing', 'watermark', 'photography', 'copyrights', 'holypython', 'batch watermark', 'holypython.com'], classifiers=[ From b2c63916f3267d1925fce676f00ce186d6cdc681 Mon Sep 17 00:00:00 2001 From: HolyPython <58428858+holypython@users.noreply.github.com> Date: Mon, 5 Oct 2020 03:15:41 +0300 Subject: [PATCH 7/7] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7b6c0a8..bf2e5c4 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ It's expected to be dominantly used by: | 0.7.1.1 | September 29, 2020 - New Version: code typo fixed | | 0.7.1.2 | September 29, 2020 - New Version: logo fixed, source code correct description added | | 0.7.2.0 | October 5, 2020 - New Version: GUI Exit behavior improved | +| 0.7.2.1 | October 5, 2020 - New Version: Correct Version Name | ## Release Notes @@ -186,6 +187,9 @@ It's expected to be dominantly used by: 0.7.2.0 - When GUI is closed without picking any image or folder, instead of giving an error, function is terminated by returning None. This should allow repeat operations in a single session and make usage more convenient and smooth for users. +0.7.2.1 - Version name fixed + + ### Upcoming Work ~Batch Graphic User Interface (done)~