TonieToolbox 0.6.0a3__py3-none-any.whl → 0.6.0a4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- TonieToolbox/__init__.py +1 -1
- TonieToolbox/__main__.py +29 -11
- TonieToolbox/artwork.py +45 -1
- TonieToolbox/constants.py +4 -1
- TonieToolbox/dependency_manager.py +673 -184
- TonieToolbox/integration.py +5 -1
- TonieToolbox/integration_macos.py +9 -4
- TonieToolbox/integration_windows.py +6 -2
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/METADATA +6 -2
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/RECORD +14 -14
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/WHEEL +0 -0
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/entry_points.txt +0 -0
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/licenses/LICENSE.md +0 -0
- {tonietoolbox-0.6.0a3.dist-info → tonietoolbox-0.6.0a4.dist-info}/top_level.txt +0 -0
TonieToolbox/integration.py
CHANGED
@@ -52,15 +52,19 @@ def handle_config():
|
|
52
52
|
import platform
|
53
53
|
import subprocess
|
54
54
|
|
55
|
+
|
55
56
|
config_path = os.path.join(os.path.expanduser("~"), ".tonietoolbox", "config.json")
|
56
|
-
|
57
57
|
if not os.path.exists(config_path):
|
58
58
|
logger.info(f"Configuration file not found at {config_path}.")
|
59
59
|
logger.info("Creating a new configuration file. Using --install-integration will create a new config file.")
|
60
60
|
return
|
61
61
|
if platform.system() == "Windows":
|
62
|
+
from .integration_windows import WindowsClassicContextMenuIntegration as ContextMenuIntegration
|
63
|
+
ContextMenuIntegration._apply_config_template()
|
62
64
|
os.startfile(config_path)
|
63
65
|
elif platform.system() == "Darwin":
|
66
|
+
from .integration_macos import MacOSContextMenuIntegration as ContextMenuIntegration
|
67
|
+
ContextMenuIntegration._apply_config_template()
|
64
68
|
subprocess.call(["open", config_path])
|
65
69
|
elif platform.system() == "Linux":
|
66
70
|
subprocess.call(["xdg-open", config_path])
|
@@ -4,7 +4,8 @@ import json
|
|
4
4
|
import plistlib
|
5
5
|
import subprocess
|
6
6
|
from pathlib import Path
|
7
|
-
from .constants import SUPPORTED_EXTENSIONS, CONFIG_TEMPLATE,UTI_MAPPINGS
|
7
|
+
from .constants import SUPPORTED_EXTENSIONS, CONFIG_TEMPLATE,UTI_MAPPINGS,ICON_BASE64
|
8
|
+
from .artwork import base64_to_ico
|
8
9
|
from .logger import get_logger
|
9
10
|
|
10
11
|
logger = get_logger('integration_macos')
|
@@ -112,7 +113,7 @@ class MacOSContextMenuIntegration:
|
|
112
113
|
cmd += ' read -p "Press any key to close this window..." key\n'
|
113
114
|
cmd += ' exit 1\n'
|
114
115
|
cmd += 'fi\n\n'
|
115
|
-
|
116
|
+
else:
|
116
117
|
# For regular file operations, handle paths correctly
|
117
118
|
cmd += '# Handle file paths correctly - try multiple methods for macOS\n'
|
118
119
|
cmd += 'FILE_PATH=""\n'
|
@@ -178,7 +179,8 @@ class MacOSContextMenuIntegration:
|
|
178
179
|
# Build the actual command
|
179
180
|
cmd_line = f'"{exe}" {base_args}'
|
180
181
|
if log_to_file:
|
181
|
-
cmd_line += ' --log-file'
|
182
|
+
cmd_line += ' --log-file'
|
183
|
+
if is_recursive:
|
182
184
|
cmd_line += ' --recursive'
|
183
185
|
if output_to_source:
|
184
186
|
cmd_line += ' --output-to-source'
|
@@ -271,8 +273,11 @@ class MacOSContextMenuIntegration:
|
|
271
273
|
self.upload_folder_artwork_json_cmd = self._build_cmd(f'{log_level_arg}', is_recursive=True, is_folder=True, use_upload=True, use_artwork=True, use_json=True, log_to_file=self.log_to_file)
|
272
274
|
|
273
275
|
def _apply_config_template(self):
|
274
|
-
"""Apply the default configuration template if config.json is missing or invalid."""
|
276
|
+
"""Apply the default configuration template if config.json is missing or invalid. Extracts the icon from base64 if not present."""
|
275
277
|
config_path = os.path.join(self.output_dir, 'config.json')
|
278
|
+
icon_path = os.path.join(self.output_dir, 'icon.ico')
|
279
|
+
if not os.path.exists(icon_path):
|
280
|
+
base64_to_ico(ICON_BASE64, icon_path)
|
276
281
|
if not os.path.exists(config_path):
|
277
282
|
with open(config_path, 'w') as f:
|
278
283
|
json.dump(CONFIG_TEMPLATE, f, indent=4)
|
@@ -2,7 +2,8 @@
|
|
2
2
|
import os
|
3
3
|
import sys
|
4
4
|
import json
|
5
|
-
from .constants import SUPPORTED_EXTENSIONS, CONFIG_TEMPLATE
|
5
|
+
from .constants import SUPPORTED_EXTENSIONS, CONFIG_TEMPLATE, ICON_BASE64
|
6
|
+
from .artwork import base64_to_ico
|
6
7
|
from .logger import get_logger
|
7
8
|
|
8
9
|
logger = get_logger('integration_windows')
|
@@ -127,8 +128,11 @@ class WindowsClassicContextMenuIntegration:
|
|
127
128
|
self.upload_folder_artwork_json_cmd = self._build_cmd(f'{log_level_arg}', is_recursive=True, is_folder=True, use_upload=True, use_artwork=True, use_json=True, log_to_file=self.log_to_file)
|
128
129
|
|
129
130
|
def _apply_config_template(self):
|
130
|
-
"""Apply the default configuration template if config.json is missing or invalid."""
|
131
|
+
"""Apply the default configuration template if config.json is missing or invalid. Extracts the icon from base64 if not present."""
|
131
132
|
config_path = os.path.join(self.output_dir, 'config.json')
|
133
|
+
icon_path = os.path.join(self.output_dir, 'icon.ico')
|
134
|
+
if not os.path.exists(icon_path):
|
135
|
+
base64_to_ico(ICON_BASE64, icon_path)
|
132
136
|
if not os.path.exists(config_path):
|
133
137
|
with open(config_path, 'w') as f:
|
134
138
|
json.dump(CONFIG_TEMPLATE, f, indent=4)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: TonieToolbox
|
3
|
-
Version: 0.6.
|
4
|
-
Summary:
|
3
|
+
Version: 0.6.0a4
|
4
|
+
Summary: Convert audio files to Toniebox compatible format (.TAF) and interact with TeddyCloud.
|
5
5
|
Home-page: https://github.com/Quentendo64/TonieToolbox
|
6
6
|
Author: Quentendo64
|
7
7
|
Author-email: Quentendo64 <quentin@wohlfeil.at>
|
@@ -23,6 +23,7 @@ Requires-Dist: protobuf<=3.19.0
|
|
23
23
|
Requires-Dist: requests>=2.32.3
|
24
24
|
Requires-Dist: mutagen>=1.47.0
|
25
25
|
Requires-Dist: packaging>=25.0
|
26
|
+
Requires-Dist: tqdm>=4.67.1
|
26
27
|
Provides-Extra: test
|
27
28
|
Requires-Dist: pytest>=8.3.5; extra == "test"
|
28
29
|
Requires-Dist: pytest-cov>=6.1.1; extra == "test"
|
@@ -806,3 +807,6 @@ If you need help, have questions, or want to report a bug, please use the follow
|
|
806
807
|
- [GitHub Issues](https://github.com/Quentendo64/TonieToolbox/issues) for bug reports and feature requests
|
807
808
|
- [GitHub Discussions](https://github.com/Quentendo64/TonieToolbox/discussions) for general questions and community support
|
808
809
|
- [HOWTO Guide](HOWTO.md) for common usage instructions
|
810
|
+
|
811
|
+
## Attribution
|
812
|
+
[Parrot Icon created by Freepik - Flaticon](https://www.flaticon.com/free-animated-icons/parrot)
|
@@ -1,14 +1,14 @@
|
|
1
|
-
TonieToolbox/__init__.py,sha256=
|
2
|
-
TonieToolbox/__main__.py,sha256=
|
3
|
-
TonieToolbox/artwork.py,sha256=
|
1
|
+
TonieToolbox/__init__.py,sha256=P-i-pmjFHddy0r76UYtLh4dFA2jppC0wc_BqhDAzfqw,98
|
2
|
+
TonieToolbox/__main__.py,sha256=F_FHZC7rLejBdEQ4plOg6dcyV4lgFKZDvJtQHpCthKs,34934
|
3
|
+
TonieToolbox/artwork.py,sha256=VRDa9Ydeq7AsXhRKYyEqpfFNH64AA1Xek7yo60bn8OI,5606
|
4
4
|
TonieToolbox/audio_conversion.py,sha256=0GpC6mSRYikIjf_A1w26LAnYtCP2gpHLEKozOISapnM,17190
|
5
|
-
TonieToolbox/constants.py,sha256=
|
6
|
-
TonieToolbox/dependency_manager.py,sha256=
|
5
|
+
TonieToolbox/constants.py,sha256=DabAgzKeG8trpV9I6tie1FA6mt3BhTRf_gF5UwtMpE4,33970
|
6
|
+
TonieToolbox/dependency_manager.py,sha256=7HCyUhVLZ6l0W1HPdYr3AgLc935S43qdTLpf1PipPkQ,49425
|
7
7
|
TonieToolbox/filename_generator.py,sha256=ATCG4w8uN1vyAqvmdhOtpJLlb9QFKCnYIdBViYqpHjw,3464
|
8
|
-
TonieToolbox/integration.py,sha256=
|
9
|
-
TonieToolbox/integration_macos.py,sha256=
|
8
|
+
TonieToolbox/integration.py,sha256=TXCkXxmeMGtw8G8M-jUVuKa7i_hI0JvVoVlIvYFvEnc,3097
|
9
|
+
TonieToolbox/integration_macos.py,sha256=HWHBcMU5BRe50ak2nqB9kIFJS83sJ8t2_B_0FMhat2U,27159
|
10
10
|
TonieToolbox/integration_ubuntu.py,sha256=MU6W0xRCdoHBxrIiOIHePqYTF5Wvn4JxBnDQUPf6fgg,33
|
11
|
-
TonieToolbox/integration_windows.py,sha256=
|
11
|
+
TonieToolbox/integration_windows.py,sha256=7F_8Dh7fWHuvCfcigM5TB-bF5CupzM6iQ-YqOvvNVFQ,23939
|
12
12
|
TonieToolbox/logger.py,sha256=Q_cXbCWfzNmt5q6fvVzeM8IugkD24CSZAVjuf16n6b4,3120
|
13
13
|
TonieToolbox/media_tags.py,sha256=oDlLe0AyvmIdQlqPzH74AUCqwbZZ-49AQKAJdrW26XE,20830
|
14
14
|
TonieToolbox/ogg_page.py,sha256=IHdP0er0TYjyLfON8zes11FdQtRab3QNxeK6sxnAX08,22340
|
@@ -22,9 +22,9 @@ TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C
|
|
22
22
|
TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
|
23
23
|
TonieToolbox/tonies_json.py,sha256=YGS2wtaDudxxSy7QuRLWaE5n4bf_AyoSvVLH1Vdh8SE,60754
|
24
24
|
TonieToolbox/version_handler.py,sha256=MLpJ9mSEHkcSoyePnACpfINHTSB1q1_4iEgcT1tGqNU,10028
|
25
|
-
tonietoolbox-0.6.
|
26
|
-
tonietoolbox-0.6.
|
27
|
-
tonietoolbox-0.6.
|
28
|
-
tonietoolbox-0.6.
|
29
|
-
tonietoolbox-0.6.
|
30
|
-
tonietoolbox-0.6.
|
25
|
+
tonietoolbox-0.6.0a4.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
|
26
|
+
tonietoolbox-0.6.0a4.dist-info/METADATA,sha256=1ygRy4_HXQsn3C_TcLydyvkdpTppmYECp4OH7eQ2NTE,27009
|
27
|
+
tonietoolbox-0.6.0a4.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
28
|
+
tonietoolbox-0.6.0a4.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
|
29
|
+
tonietoolbox-0.6.0a4.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
|
30
|
+
tonietoolbox-0.6.0a4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|