diff --git a/.gitignore b/.gitignore index c39229a..621c5db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Folders +.env/ env/ dist/ build/ @@ -10,4 +11,5 @@ test/ # Files main.py -*.spec \ No newline at end of file +*.spec +*.txt \ No newline at end of file diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..95d4a4b Binary files /dev/null and b/assets/icon.ico differ diff --git a/assets/image_1.png b/assets/image_1.png index 9a0e823..3e94ccd 100644 Binary files a/assets/image_1.png and b/assets/image_1.png differ diff --git a/assets/image_5.png b/assets/image_5.png deleted file mode 100644 index 302233c..0000000 Binary files a/assets/image_5.png and /dev/null differ diff --git a/assets/image_6.png b/assets/image_6.png deleted file mode 100644 index c8c0565..0000000 Binary files a/assets/image_6.png and /dev/null differ diff --git a/assets/image_7.png b/assets/image_7.png deleted file mode 100644 index c8c0565..0000000 Binary files a/assets/image_7.png and /dev/null differ diff --git a/build-cli.sh b/build-cli.sh deleted file mode 100644 index 7d221ba..0000000 --- a/build-cli.sh +++ /dev/null @@ -1 +0,0 @@ -pyinstaller --name="tkforge" --onefile --paths=env/Lib/site-packages tkforge.py --icon=assets/icon.png \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..966ff1c --- /dev/null +++ b/build.bat @@ -0,0 +1,7 @@ +@echo off + +if "%1" == "cli" ( + pyinstaller --name="tkforge-cli" --onefile --paths=env/Lib/site-packages tkforge.py --icon=assets/icon.png +) else ( + pyinstaller --name="TkForge" --onefile --paths=env/Lib/site-packages --add-data="assets;assets" gui.py --noconsole --icon=assets/icon.png +) diff --git a/build.sh b/build.sh index 05a8266..15d6957 100644 --- a/build.sh +++ b/build.sh @@ -1 +1,7 @@ -pyinstaller --name="TkForge" --onefile --paths=env/Lib/site-packages --add-data="assets:assets" gui.py --noconsole --icon=assets/icon.png \ No newline at end of file +#!/bin/bash + +if [ "$1" == "cli" ]; then + pyinstaller --name="tkforge-cli" --onefile --paths=env/Lib/site-packages tkforge.py --icon=assets/icon.png +else + pyinstaller --name="TkForge" --onefile --paths=env/Lib/site-packages --add-data="assets:assets" gui.py --noconsole --icon=assets/icon.png +fi diff --git a/core.py b/core.py index baa0c1e..4d27ba3 100644 --- a/core.py +++ b/core.py @@ -159,10 +159,6 @@ def download(image_count): entry_placeholder = True elif type == 'textarea': text_placeholder = True - - if download_images: - image_count += 1 - download(image_count) elif type == 'button' and download_images: image_count += 1 download(image_count) diff --git a/gui.py b/gui.py index 3610584..c9eb016 100644 --- a/gui.py +++ b/gui.py @@ -81,10 +81,6 @@ def get_placeholder(self): return self.p # Figma token input -token_input_image = tk.PhotoImage(file=load_asset("image_6.png")) - -canvas.create_image(541, 123, image=token_input_image) - token_input = TkForge_Entry( bd=0, bg="#f5f5f5", @@ -97,10 +93,6 @@ def get_placeholder(self): return self.p # File URL input -file_input_image = tk.PhotoImage(file=load_asset("image_7.png")) - -canvas.create_image(541, 205, image=file_input_image) - file_input = TkForge_Entry( bd=0, bg="#f5f5f5", @@ -113,10 +105,6 @@ def get_placeholder(self): return self.p # Output path textbox -outpath_input_image = tk.PhotoImage(file=load_asset("image_5.png")) - -canvas.create_image(525, 286, image=outpath_input_image) - outpath_input = TkForge_Entry( bd=0, bg="#f5f5f5", diff --git a/requirements.txt b/requirements.txt index 7e001d4..0728f37 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,86 +1,6 @@ -aiohttp==3.8.4 -aiosignal==1.3.1 -altgraph==0.17.3 -async-timeout==4.0.2 -asyncio==3.4.3 -attrs==23.1.0 -blinker==1.6.2 -bottle==0.12.25 -cachetools==5.3.2 -certifi==2021.5.30 -cffi==1.15.1 -chardet==4.0.0 -charset-normalizer==3.2.0 -click==8.1.6 -clr-loader==0.2.5 +certifi==2024.2.2 +charset-normalizer==3.3.2 colorama==0.4.6 -colorharmonies==1.0.5 -colour==0.1.5 -contourpy==1.2.0 -CTkMessagebox==2.5 -customtkinter==5.2.2 -cx-Freeze==6.15.5 -cx-Logging==3.1.0 -cycler==0.12.1 -darkdetect==0.8.0 -discord-protos==0.0.2 -discord.py-self @ git+https://github.com/pc111c/discord.py-self.git@e16f555c9e78411b1511fee2273448083d07ab63 -distro==1.9.0 -Flask==2.3.2 -flaskwebgui==1.0.6 -fonttools==4.49.0 -frozenlist==1.3.3 -google-api-core==2.15.0 -google-api-python-client==2.112.0 -google-auth==2.26.1 -google-auth-httplib2==0.2.0 -googleapis-common-protos==1.62.0 -httplib2==0.22.0 -idna==2.10 -importlib-resources==6.1.1 -itsdangerous==2.1.2 -Jinja2==3.0.1 -kiwisolver==1.4.5 -lief==0.13.2 -loguru==0.7.2 -MarkupSafe==2.0.1 -matplotlib==3.8.3 -multidict==6.0.4 -numpy==1.26.4 -oauth2client==4.1.3 -packaging==23.2 -pathvalidate==3.2.0 -pefile==2023.2.7 -pillar-youtube-upload==0.3.0 -pillow==10.2.0 -protobuf==4.25.1 -proxy-tools==0.1.0 -psutil==5.9.5 -pyasn1==0.5.1 -pyasn1-modules==0.3.0 -pycparser==2.21 -pyinstaller==6.2.0 -pyinstaller-hooks-contrib==2023.6 -pyparsing==3.1.1 -pyperclip==1.8.2 -python-dateutil==2.8.2 -pythonnet==3.0.1 -pytube @ git+https://github.com/pishiko/pytube.git@42a7d8322dd7749a9e950baf6860d115bbeaedfc -pywebview==4.2.2 -pywin32-ctypes==0.2.2 -requests==2.25.1 -rsa==4.9 -scikit-build==0.17.6 -scrapetube==2.5.1 -six==1.16.0 -tomli==2.0.1 -tqdm==4.65.0 -typing_extensions==4.7.1 -tzdata==2024.1 -tzlocal==5.2 -uritemplate==4.1.1 -urllib3==1.26.6 -Werkzeug==2.3.6 -win32-setctime==1.1.0 -yarl==1.9.2 -zipp==3.15.0 +idna==3.7 +requests==2.31.0 +urllib3==2.2.1 diff --git a/tk.py b/tk.py index ba5e8f5..2cbca0f 100644 --- a/tk.py +++ b/tk.py @@ -35,16 +35,13 @@ def image(i, c): ''' def textbox(i, c, p=False): - p = f''',\n placeholder="{i['placeholder']}",''' if p else "," + s = f''',\n placeholder="{i['placeholder']}",''' if p else "," return f''' -textbox_image_{c} = tk.PhotoImage(file=load_asset("{i["image"]}")) - -canvas.create_image({int(i['x'] + i['width'] / 2)}, {int(i['y'] + i['height'] / 2)}, image=textbox_image_{c}) - textbox_{c} = {"TkForge_Entry" if p else "tk.Entry"}( bd=0, bg="{i["background"]}", - fg="{i['foreground']}"{p} + fg="{i['foreground']}"{s} + insertbackground="{i['foreground']}", highlightthickness=0 ) @@ -52,16 +49,13 @@ def textbox(i, c, p=False): ''' def textarea(i, c, p=False): - p = f''',\n placeholder="{i['placeholder']}",''' if p else "," + s = f''',\n placeholder="{i['placeholder']}",''' if p else "," return f''' -textarea_image_{c} = tk.PhotoImage(file=load_asset("{i["image"]}")) - -canvas.create_image({int(i['x'] + i['width'] / 2)}, {int(i['y'] + i['height'] / 2)}, image=textarea_image_{c}) - textarea_{c} = {"TkForge_Text" if p else "tk.Text"}( bd=0, bg="{i["background"]}", - fg="{i["foreground"]}"{p} + fg="{i["foreground"]}"{s} + insertbackground="{i['foreground']}", highlightthickness=0 )