TonieToolbox 0.6.0a5__py3-none-any.whl → 0.6.0rc1__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 CHANGED
@@ -3,4 +3,4 @@
3
3
  TonieToolbox - Convert audio files to Tonie box compatible format
4
4
  """
5
5
 
6
- __version__ = '0.6.0a5'
6
+ __version__ = '0.6.0rc1'
@@ -25,24 +25,26 @@ def handle_integration(args):
25
25
  else:
26
26
  logger.error("Integration uninstallation failed.")
27
27
  return False
28
+ #elif platform.system() == 'Darwin':
29
+ # from .integration_macos import MacOSContextMenuIntegration as ContextMenuIntegration
30
+ # if args.install_integration:
31
+ # success = ContextMenuIntegration.install()
32
+ # if success:
33
+ # logger.info("Integration installed successfully.")
34
+ # return True
35
+ # else:
36
+ # logger.error("Integration installation failed.")
37
+ # return False
38
+ # elif args.uninstall_integration:
39
+ # success = ContextMenuIntegration.uninstall()
40
+ # if success:
41
+ # logger.info("Integration uninstalled successfully.")
42
+ # return True
43
+ # else:
44
+ # logger.error("Integration uninstallation failed.")
45
+ # return False
28
46
  elif platform.system() == 'Darwin':
29
- from .integration_macos import MacOSContextMenuIntegration as ContextMenuIntegration
30
- if args.install_integration:
31
- success = ContextMenuIntegration.install()
32
- if success:
33
- logger.info("Integration installed successfully.")
34
- return True
35
- else:
36
- logger.error("Integration installation failed.")
37
- return False
38
- elif args.uninstall_integration:
39
- success = ContextMenuIntegration.uninstall()
40
- if success:
41
- logger.info("Integration uninstalled successfully.")
42
- return True
43
- else:
44
- logger.error("Integration uninstallation failed.")
45
- return False
47
+ raise NotImplementedError("Context menu integration is not supported on MacOS YET. But Soon™")
46
48
  elif platform.system() == 'Linux':
47
49
  raise NotImplementedError("Context menu integration is not supported on Linux YET. But Soon™")
48
50
  else:
@@ -123,7 +123,7 @@ class WindowsClassicContextMenuIntegration:
123
123
  self.upload_taf_cmd = self._build_cmd(log_level_arg, use_upload=True, log_to_file=self.log_to_file)
124
124
  self.upload_taf_artwork_cmd = self._build_cmd(log_level_arg, use_upload=True, use_artwork=True, log_to_file=self.log_to_file)
125
125
  self.upload_taf_artwork_json_cmd = self._build_cmd(log_level_arg, use_upload=True, use_artwork=True, use_json=True, log_to_file=self.log_to_file)
126
- self.compare_taf_cmd = self._build_cmd(log_level_arg, use_compare=True, keep_open=True, log_to_file=self.log_to_file)
126
+ #self.compare_taf_cmd = self._build_cmd(log_level_arg, use_compare=True, keep_open=True, log_to_file=self.log_to_file)
127
127
 
128
128
  # Folder commands
129
129
  self.convert_folder_cmd = self._build_cmd(f'{log_level_arg}', is_recursive=True, is_folder=True, log_to_file=self.log_to_file)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TonieToolbox
3
- Version: 0.6.0a5
3
+ Version: 0.6.0rc1
4
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
@@ -49,6 +49,14 @@ A Toolkit for converting various audio formats into the Tonie-compatible TAF for
49
49
  → [HOWTO Guide for Beginners](HOWTO.md)
50
50
  → [Contributing Guidelines](CONTRIBUTING.md)
51
51
 
52
+ ## 🎯 New Features (v0.6.0)
53
+
54
+ The latest release of TonieToolbox includes exciting new capabilities:
55
+
56
+ - **Enhanced Media Tag Support**: Better handling of complex audio libraries with advanced metadata extraction and usage of tags in your upload path (--path) or as output directory with the new argument --output-to-template eg. "C:\Music\\{albumartist}\\{album}"
57
+ - **Windows Context Menu Integration**: Right-click to convert audio files directly from File Explorer. Use --config-integration to configure the upload functions. If not needed just use --install-integration
58
+
59
+
52
60
  ## Table of Contents
53
61
 
54
62
  - [Overview](#overview)
@@ -263,12 +271,17 @@ Output:
263
271
  ```shell
264
272
  usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags URL]
265
273
  [--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
266
- [--show-progress] [--connection-timeout SECONDS]
267
- [--read-timeout SECONDS] [--max-retries RETRIES]
268
- [--retry-delay SECONDS] [--create-custom-json] [-t TIMESTAMP] [-f FFMPEG]
274
+ [--connection-timeout SECONDS] [--read-timeout SECONDS]
275
+ [--max-retries RETRIES] [--retry-delay SECONDS]
276
+ [--create-custom-json] [--version-2] [--username USERNAME]
277
+ [--password PASSWORD] [--client-cert CERT_FILE]
278
+ [--client-key KEY_FILE] [-t TIMESTAMP] [-f FFMPEG]
269
279
  [-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
270
- [-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
271
- [--show-tags] [-S] [-F] [-X] [-d] [-T] [-q] [-Q]
280
+ [-fc] [--no-mono-conversion] [-A] [-k] [-u] [-C FILE2] [-D]
281
+ [--config-integration] [--install-integration]
282
+ [--uninstall-integration] [-m] [--name-template TEMPLATE]
283
+ [--output-to-template PATH_TEMPLATE] [--show-tags]
284
+ [-S] [-F] [-X] [-d] [-T] [-q] [-Q] [--log-file]
272
285
  SOURCE [TARGET]
273
286
 
274
287
  Create Tonie compatible file from Ogg opus file(s).
@@ -284,8 +297,7 @@ TeddyCloud Options:
284
297
  --ignore-ssl-verify Ignore SSL certificate verification (for self-signed certificates)
285
298
  --special-folder FOLDER
286
299
  Special folder to upload to (currently only "library" is supported)
287
- --path PATH Path where to write the file on TeddyCloud server
288
- --show-progress Show progress bar during file upload (default: enabled)
300
+ --path PATH Path where to write the file on TeddyCloud server (supports templates like "/{albumartist}/{album}")
289
301
  --connection-timeout SECONDS
290
302
  Connection timeout in seconds (default: 10)
291
303
  --read-timeout SECONDS
@@ -295,12 +307,19 @@ TeddyCloud Options:
295
307
  --retry-delay SECONDS
296
308
  Delay between retry attempts in seconds (default: 5)
297
309
  --create-custom-json Fetch and update custom Tonies JSON data
310
+ --version-2 Use version 2 of the Tonies JSON format (default: version 1)
311
+ --username USERNAME Username for basic authentication
312
+ --password PASSWORD Password for basic authentication
313
+ --client-cert CERT_FILE
314
+ Path to client certificate file for certificate-based authentication
315
+ --client-key KEY_FILE
316
+ Path to client private key file for certificate-based authentication
298
317
 
299
318
  optional arguments:
300
319
  -h, --help show this help message and exit
301
320
  -v, --version show program version and exit
302
321
  -t, --timestamp TIMESTAMP
303
- set custom timestamp / bitstream serial / reference .taf file
322
+ set custom timestamp / bitstream serial
304
323
  -f, --ffmpeg FFMPEG specify location of ffmpeg
305
324
  -o, --opusenc OPUSENC specify location of opusenc
306
325
  -b, --bitrate BITRATE set encoding bitrate in kbps (default: 96)
@@ -313,17 +332,27 @@ optional arguments:
313
332
  -r, --recursive Process folders recursively
314
333
  -O, --output-to-source
315
334
  Save output files in the source directory instead of output directory
335
+ -fc, --force-creation
336
+ Force creation of Tonie file even if it already exists
337
+ --no-mono-conversion Do not convert mono audio to stereo (default: convert mono to stereo)
316
338
  -A, --auto-download Automatically download FFmpeg and opusenc if needed
317
339
  -k, --keep-temp Keep temporary opus files in a temp folder for testing
318
- -u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags (DEPRECATED)
340
+ -u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags
319
341
  -C, --compare FILE2 Compare input file with another .taf file for debugging
320
342
  -D, --detailed-compare
321
343
  Show detailed OGG page differences when comparing files
322
- --no-mono-conversion Do not convert mono audio to stereo (default: convert mono to stereo)
344
+ --config-integration Configure context menu integration
345
+ --install-integration
346
+ Integrate with the system (e.g., create context menu entries)
347
+ --uninstall-integration
348
+ Uninstall context menu integration
349
+
323
350
  Media Tag Options:
324
351
  -m, --use-media-tags Use media tags from audio files for naming
325
352
  --name-template TEMPLATE
326
353
  Template for naming files using media tags. Example: "{album} - {artist}"
354
+ --output-to-template PATH_TEMPLATE
355
+ Template for output path using media tags. Example: "C:\Music\{albumartist}\{album}"
327
356
  --show-tags Show available media tags from input files
328
357
 
329
358
  Version Check Options:
@@ -544,6 +573,87 @@ tonietoolbox --split my_tonie.taf --debug
544
573
  tonietoolbox --recursive "Music/Collection/" --quiet
545
574
  ```
546
575
 
576
+ #### Force creation of TAF files
577
+
578
+ If a valid TAF file already exists, TonieToolbox will skip recreating it by default. To force creation even if the file exists:
579
+
580
+ ```shell
581
+ # Force creation of a TAF file even if it already exists
582
+ tonietoolbox input.mp3 --force-creation
583
+ ```
584
+
585
+ This is useful when you want to update the content or encoding settings of an existing TAF file.
586
+
587
+ #### Windows Context Menu Integration
588
+
589
+ TonieToolbox can integrate with Windows Explorer, allowing you to right-click on audio files or folders to convert them:
590
+
591
+ ```shell
592
+ # Install context menu integration (one-time setup)
593
+ tonietoolbox --install-integration
594
+
595
+ # Configure context menu options
596
+ tonietoolbox --config-integration
597
+
598
+ # Remove context menu integration
599
+ tonietoolbox --uninstall-integration
600
+ ```
601
+
602
+ After installation, you can right-click on any audio file or folder in Windows Explorer and select "Convert to Tonie Format".
603
+
604
+ When changing the configuration via `--config-integration`. Apply them to the integration by simply execute `tonietoolbox --install-integration` again.
605
+
606
+ #### Log File Generation
607
+
608
+ Save detailed logs to a timestamped file for troubleshooting complex operations:
609
+
610
+ ```shell
611
+ # Enable log file generation
612
+ tonietoolbox input.mp3 --log-file
613
+
614
+ # Combine with debug logging for maximum detail
615
+ tonietoolbox --recursive input_directory/ --log-file --debug
616
+ ```
617
+
618
+ Log files are saved in the `.tonietoolbox\logs` folder in your user directory.
619
+
620
+ #### Enhanced Media Tag Templates
621
+
622
+ Create custom directory structures based on media tags:
623
+
624
+ ```shell
625
+ # Create output based on a path template
626
+ tonietoolbox input.mp3 --use-media-tags --output-to-template "C:\Music\{albumartist}\{album}"
627
+
628
+ # Use with recursive processing
629
+ tonietoolbox --recursive "Music/Collection/" --use-media-tags --output-to-template "Organized/{genre}/{year} - {album}"
630
+ ```
631
+
632
+ This creates a directory structure based on the audio files' metadata and places the converted TAF files accordingly.
633
+
634
+ #### TeddyCloud Authentication Options
635
+
636
+ > **Note:** Authentication is based on the Features available when using [TeddyCloudStarter](https://github.com/Quentendo64/TeddyCloudStarter).
637
+
638
+ TonieToolbox supports multiple authentication methods for secure TeddyCloud connections:
639
+
640
+ ```shell
641
+ # Basic authentication with username and password
642
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --username admin --password secret
643
+
644
+ # Certificate-based authentication
645
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --client-cert certificate.crt --client-key private.key
646
+ ```
647
+
648
+ #### Custom JSON Format Versioning
649
+
650
+ Choose between different versions of the Tonies JSON format:
651
+
652
+ ```shell
653
+ # Use version 2 of the Tonies JSON format (enhanced metadata)
654
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json --version-2
655
+ ```
656
+
547
657
  ### Media Tags
548
658
 
549
659
  TonieToolbox can read metadata tags from audio files (such as ID3 tags in MP3 files, Vorbis comments in FLAC/OGG files, etc.) and use them to create more meaningful filenames or display information about your audio collection.
@@ -700,81 +810,7 @@ tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{compos
700
810
  The first command shows what tags are available, allowing you to create precise naming templates for classical music collections.
701
811
 
702
812
  ## Technical Details
703
-
704
- ### TAF (Tonie Audio Format) File Structure
705
-
706
- The Tonie Audio Format (TAF) consists of several parts:
707
-
708
- #### 1. Tonie Header (0x1000 bytes)
709
-
710
- Located at the beginning of the file, structured as:
711
-
712
- - A 4-byte big-endian integer specifying the header length
713
- - A Protocol Buffer encoded header (defined in `tonie_header.proto`)
714
- - Padding to fill the entire 4096 bytes (0x1000)
715
-
716
- The Protocol Buffer structure contains:
717
-
718
- ```protobuf
719
- message TonieHeader {
720
- bytes dataHash = 1; // SHA1 hash of the audio data
721
- uint32 dataLength = 2; // Length of the audio data in bytes
722
- uint32 timestamp = 3; // Unix timestamp (also used as bitstream serial number)
723
- repeated uint32 chapterPages = 4 [packed=true]; // Page numbers for chapter starts
724
- bytes padding = 5; // Padding to fill up the header
725
- }
726
- ```
727
-
728
- #### 2. Audio Data
729
-
730
- The audio data consists of:
731
-
732
- - Opus encoded audio in Ogg container format
733
- - Every page after the header has a fixed size of 4096 bytes (0x1000)
734
- - First page contains the Opus identification header
735
- - Second page contains the Opus comments/tags
736
- - Remaining pages contain the actual audio data
737
- - All pages use the same bitstream serial number (timestamp from header)
738
-
739
- #### 3. Special Requirements
740
-
741
- For optimal compatibility with Tonie boxes:
742
-
743
- - Audio should be stereo (2 channels)
744
- - Sample rate must be 48 kHz
745
- - Pages must be aligned to 4096 byte boundaries
746
- - Bitrate of 96 kbps VBR is recommended
747
-
748
- **Mono audio handling:**
749
-
750
- - By default, TonieToolbox will automatically convert mono audio files to stereo for compatibility.
751
- - To disable this behavior (and require your input to already be stereo), use the `--no-mono-conversion` flag.
752
-
753
- ### File Analysis
754
-
755
- When using the `--info` flag, TonieToolbox checks and displays detailed information about a .TAF (Tonie Audio File):
756
-
757
- - SHA1 hash validation
758
- - Timestamp/bitstream serial consistency
759
- - Opus data length verification
760
- - Opus header validation (version, channels, sample rate)
761
- - Page alignment and size validation
762
- - Total runtime
763
- - Track listing with durations
764
-
765
- ### File Comparison
766
-
767
- When using the `--compare` flag, TonieToolbox provides a detailed comparison of two .TAF files:
768
-
769
- - File size comparison
770
- - Header size verification
771
- - Timestamp comparison
772
- - Data length validation
773
- - SHA1 hash verification
774
- - Chapter page structure analysis
775
- - OGG page-by-page comparison (with `--detailed-compare` flag)
776
-
777
- This is particularly useful for debugging when creating TAF files with different tools or parameters.
813
+ [Moved to TECHNICAL.md](TECHNICAL.md)
778
814
 
779
815
  ## Related Projects
780
816
 
@@ -784,9 +820,6 @@ This project is inspired by and builds upon the work of other Tonie-related open
784
820
  - [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud) - Self-hosted alternative to the Tonie cloud / Boxine cloud for managing custom content
785
821
  - [TeddyCloudStarter](https://github.com/Quentendo64/TeddyCloudStarter) - A Wizard for Docker-based deployment of [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud)
786
822
 
787
- ## Contributing
788
-
789
- Contributions are welcome! Please feel free to submit a Pull Request.
790
823
 
791
824
  ## Legal Notice
792
825
 
@@ -1,14 +1,14 @@
1
- TonieToolbox/__init__.py,sha256=0gNvQWCJmnGv7_OCrSTA7qyNe3zUQ546m7TL9_SFtwY,117
1
+ TonieToolbox/__init__.py,sha256=HhwGRpXWdTEn172esWH5wvevmLmbNCNZhYw3mb7VH2Q,118
2
2
  TonieToolbox/__main__.py,sha256=KSDasW-QaTzStXSKtemMKxoFV8IWvCmq1Oig5yo8BQs,41573
3
3
  TonieToolbox/artwork.py,sha256=BhAjLWqzui8zUOU9z9P4H3zbCCTOB94aT0MPlqEvZoY,5605
4
4
  TonieToolbox/audio_conversion.py,sha256=xXXsRGPS_yQ_mqtFJiqupLbeXN8__Q2Hg05C94EPC_8,17199
5
5
  TonieToolbox/constants.py,sha256=nTKDBy55PTv6Tazda3rsZZcckcm3AZOyWXa1LDuTuEk,33989
6
6
  TonieToolbox/dependency_manager.py,sha256=sQv0vNE7Gp_RqdR9GOwF8jJgu8GTw0Krppg5MjG5qJU,49432
7
7
  TonieToolbox/filename_generator.py,sha256=NJrRxv0sm_9G5ZDp1QG39mktgJnz5yGC8HUs7NhLYFg,5293
8
- TonieToolbox/integration.py,sha256=qWRZfowNBIQJPPnGUJ52Xw0SqyfScuzoONPVtZI8yjA,3063
8
+ TonieToolbox/integration.py,sha256=jZuv17i5qRBpDiy_jKDpDO0YxFBYGmJJgLzGpqfpPfs,3226
9
9
  TonieToolbox/integration_macos.py,sha256=YxK7gIqiy1QTp7EM1M1OPC-mgb3gaIoI6Xfu3eUAyX0,27311
10
10
  TonieToolbox/integration_ubuntu.py,sha256=_Da2s7CmuP7kts0W-yyt4odZA8jr14d8iisVF_ipLDA,52
11
- TonieToolbox/integration_windows.py,sha256=WBclD1bW5X8cJ-x3j3-YPnSkpWOQmzxQXjj2-gemPN0,24011
11
+ TonieToolbox/integration_windows.py,sha256=Ptzow2cuva0PkvaIlTEvcpk8_NzAbL7I80BQlfx5SZk,24012
12
12
  TonieToolbox/logger.py,sha256=ppAnOJAKNwwbt5q3NdF2WHgHemZjP0QWRaUx8UrkQK8,3139
13
13
  TonieToolbox/media_tags.py,sha256=pOLcqnY4sUudI-gBre0A7le3nA7ZDkhUNkozUdRVHiE,20843
14
14
  TonieToolbox/ogg_page.py,sha256=CpL3mHoRsfHBBrT2r4x5p3LBPgHfYQxb_WQsCZq6SI0,22341
@@ -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=Icu5ClFbRK0gFuefJkHQNRjeOW79tQV-GZ3hoIATo3M,60768
24
24
  TonieToolbox/version_handler.py,sha256=Q-i5_0r5lX3dlwDLI2lMAx4X10UZGN2rvMcntmyuiT4,9862
25
- tonietoolbox-0.6.0a5.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
26
- tonietoolbox-0.6.0a5.dist-info/METADATA,sha256=Hzna0YOJdh0olBqOV921ZCfa62g8b_iL555_WeFsYdo,27009
27
- tonietoolbox-0.6.0a5.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
28
- tonietoolbox-0.6.0a5.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
29
- tonietoolbox-0.6.0a5.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
30
- tonietoolbox-0.6.0a5.dist-info/RECORD,,
25
+ tonietoolbox-0.6.0rc1.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
26
+ tonietoolbox-0.6.0rc1.dist-info/METADATA,sha256=XDVnTt3hL1wFoxSAopsTj9wJweDg6tqRIStAKBb7Fmw,29087
27
+ tonietoolbox-0.6.0rc1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
28
+ tonietoolbox-0.6.0rc1.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
29
+ tonietoolbox-0.6.0rc1.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
30
+ tonietoolbox-0.6.0rc1.dist-info/RECORD,,