TonieToolbox 0.3.0__py3-none-any.whl → 0.4.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TonieToolbox
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Convert audio files to Tonie box compatible format
5
5
  Home-page: https://github.com/Quentendo64/TonieToolbox
6
6
  Author: Quentendo64
@@ -48,6 +48,7 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
48
48
  - [Common Usage Examples](#common-usage-examples)
49
49
  - [Media Tags](#media-tags)
50
50
  - [TeddyCloud Upload](#teddycloud-upload)
51
+ - [Real-World Use Cases](#real-world-use-cases)
51
52
  - [Technical Details](#technical-details)
52
53
  - [TAF File Structure](#taf-tonie-audio-format-file-structure)
53
54
  - [File Analysis](#file-analysis)
@@ -175,10 +176,10 @@ usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags
175
176
  [--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
176
177
  [--show-progress] [--connection-timeout SECONDS]
177
178
  [--read-timeout SECONDS] [--max-retries RETRIES]
178
- [--retry-delay SECONDS] [-t TIMESTAMP] [-f FFMPEG] [-o OPUSENC]
179
- [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
180
- [-A] [-k] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
181
- [--show-tags] [-d] [-T] [-q] [-Q]
179
+ [--retry-delay SECONDS] [--create-custom-json] [-t TIMESTAMP] [-f FFMPEG]
180
+ [-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
181
+ [-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
182
+ [--show-tags] [-S] [-F] [-X] [-d] [-T] [-q] [-Q]
182
183
  SOURCE [TARGET]
183
184
 
184
185
  Create Tonie compatible file from Ogg opus file(s).
@@ -204,6 +205,7 @@ TeddyCloud Options:
204
205
  Maximum number of retry attempts (default: 3)
205
206
  --retry-delay SECONDS
206
207
  Delay between retry attempts in seconds (default: 5)
208
+ --create-custom-json Fetch and update custom Tonies JSON data
207
209
 
208
210
  optional arguments:
209
211
  -h, --help show this help message and exit
@@ -224,10 +226,10 @@ optional arguments:
224
226
  Save output files in the source directory instead of output directory
225
227
  -A, --auto-download Automatically download FFmpeg and opusenc if needed
226
228
  -k, --keep-temp Keep temporary opus files in a temp folder for testing
229
+ -u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags (DEPRECATED)
227
230
  -C, --compare FILE2 Compare input file with another .taf file for debugging
228
231
  -D, --detailed-compare
229
232
  Show detailed OGG page differences when comparing files
230
-
231
233
  Media Tag Options:
232
234
  -m, --use-media-tags Use media tags from audio files for naming
233
235
  --name-template TEMPLATE
@@ -247,6 +249,7 @@ Logging Options:
247
249
  -T, --trace Enable trace logging (very verbose)
248
250
  -q, --quiet Show only warnings and errors
249
251
  -Q, --silent Show only errors
252
+ --log-file Save logs to a timestamped file in .tonietoolbox folder
250
253
  ```
251
254
 
252
255
  ### Common Usage Examples
@@ -291,6 +294,29 @@ tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extracti
291
294
  tonietoolbox input.mp3 --bitrate 128
292
295
  ```
293
296
 
297
+ #### Constant bitrate encoding:
298
+
299
+ For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
300
+
301
+ ```
302
+ # Encode with constant bitrate at 96 kbps (default)
303
+ tonietoolbox input.mp3 --cbr
304
+
305
+ # Encode with constant bitrate at 128 kbps
306
+ tonietoolbox input.mp3 --cbr --bitrate 128
307
+ ```
308
+
309
+ #### Append Tonie tag:
310
+
311
+ You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
312
+
313
+ ```
314
+ # Add an 8-character hex tag to filename
315
+ tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
316
+
317
+ # The output will be named "input-7F8A6B2E.taf"
318
+ ```
319
+
294
320
  #### Process a complex folder structure:
295
321
 
296
322
  Process an audiobook series with multiple folders:
@@ -305,6 +331,127 @@ Process a music collection with nested album folders and save TAF files alongsid
305
331
  tonietoolbox --recursive --output-to-source "\Hörspiele\"
306
332
  ```
307
333
 
334
+ #### Automatic dependency download:
335
+
336
+ If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
337
+
338
+ ```
339
+ # Automatically download dependencies when needed
340
+ tonietoolbox input.mp3 --auto-download
341
+
342
+ # Specify custom FFmpeg or opusenc locations
343
+ tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
344
+ ```
345
+
346
+ #### Keep temporary files:
347
+
348
+ When troubleshooting or debugging, you can keep the temporary opus files:
349
+
350
+ ```
351
+ # Keep temporary opus files in the temp folder
352
+ tonietoolbox input.mp3 --keep-temp
353
+
354
+ ```
355
+
356
+ #### Working with list files:
357
+
358
+ Create a text file (.lst) with paths to audio files for batch processing:
359
+
360
+ ```
361
+ # Contents of playlist.lst:
362
+ C:\Music\song1.mp3
363
+ "C:\Music\song2.flac"
364
+ C:\Music\song3.wav
365
+ "C:\Music Path With Spaces\song2.flac"
366
+
367
+ # Process the list file
368
+ tonietoolbox playlist.lst my_playlist.taf
369
+ ```
370
+
371
+ #### TeddyCloud advanced options:
372
+
373
+ Customize your TeddyCloud uploads with connection options:
374
+
375
+ ```
376
+ # Upload with custom timeouts and retry parameters
377
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
378
+
379
+ # Disable progress bar during upload
380
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progress=False
381
+
382
+ # Upload to a special folder in TeddyCloud
383
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
384
+ ```
385
+
386
+ #### Get available tags from TeddyCloud:
387
+
388
+ To see which tags you can use with your TeddyCloud server:
389
+
390
+ ```
391
+ tonietoolbox --get-tags https://teddycloud.example.com
392
+ ```
393
+
394
+ #### Version checking and updates:
395
+
396
+ TonieToolbox can check for newer versions and notify you when there are updates available:
397
+
398
+ ```
399
+ # Skip checking for updates if you're offline or want faster startup
400
+ tonietoolbox input.mp3 --skip-update-check
401
+
402
+ # Force refresh of version information from PyPI
403
+ tonietoolbox input.mp3 --force-refresh-cache
404
+
405
+ # Clear cached version information
406
+ tonietoolbox --clear-version-cache
407
+ ```
408
+
409
+ #### Legacy tag options:
410
+
411
+ Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
412
+
413
+ ```
414
+ tonietoolbox input.mp3 --use-legacy-tags
415
+ ```
416
+
417
+ #### Create custom JSON data:
418
+
419
+ When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
420
+
421
+ ```
422
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
423
+ ```
424
+
425
+ This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
426
+
427
+ #### Logging and Troubleshooting:
428
+
429
+ Control the verbosity of console output with different logging levels:
430
+
431
+ ```
432
+ # Enable detailed debug information (useful for troubleshooting)
433
+ tonietoolbox input.mp3 --debug
434
+
435
+ # Enable extremely verbose trace logging (developer level)
436
+ tonietoolbox input.mp3 --trace
437
+
438
+ # Reduce output to show only warnings and errors
439
+ tonietoolbox input.mp3 --quiet
440
+
441
+ # Show only critical errors (minimal output)
442
+ tonietoolbox input.mp3 --silent
443
+ ```
444
+
445
+ You can combine logging options with other commands:
446
+
447
+ ```
448
+ # Debug mode while splitting a TAF file
449
+ tonietoolbox --split my_tonie.taf --debug
450
+
451
+ # Quiet mode while batch processing
452
+ tonietoolbox --recursive "Music/Collection/" --quiet
453
+ ```
454
+
308
455
  ### Media Tags
309
456
 
310
457
  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.
@@ -410,6 +557,52 @@ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-v
410
557
 
411
558
  Use this option if the TeddyCloud server uses a self-signed certificate.
412
559
 
560
+ ## Real-World Use Cases
561
+
562
+ ### Converting an Audiobook Series
563
+
564
+ To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
565
+
566
+ ```
567
+ tonietoolbox --recursive --use-media-tags --name-template "{YEAR} - {ALBUMARTIST} - {ALBUM}" --bitrate 128 --upload https://teddycloud.example.com --include-artwork "C:\Hörspiele\Die Drei Fragezeichen"
568
+ ```
569
+
570
+ This command will:
571
+ 1. Recursively process the Die Drei Fragezeichen audioplays directory
572
+ 2. Use a naming template based on source metadata
573
+ 3. Encode at 128 kbps
574
+ 4. Upload both audio files and cover art to TeddyCloud
575
+
576
+ ### Creating Children's Story Collections
577
+
578
+ For a custom children's story collection with chapters:
579
+
580
+ ```
581
+ tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
582
+ ```
583
+
584
+ This command:
585
+ 1. Processes a list of story audio files
586
+ 2. Names the output based on metadata
587
+ 3. Uses constant bitrate encoding for consistent quality
588
+ 4. Automatically downloads dependencies if needed
589
+ 5. Shows detailed debug information during the process
590
+
591
+
592
+ ### Advanced Media Tag Usage
593
+
594
+ For complex media tag processing:
595
+
596
+ ```
597
+ # First check available tags
598
+ tonietoolbox --show-tags "C:\Music\Classical\Bach"
599
+
600
+ # Then use a sophisticated naming template
601
+ tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
602
+ ```
603
+
604
+ The first command shows what tags are available, allowing you to create precise naming templates for classical music collections as example.
605
+
413
606
  ## Technical Details
414
607
 
415
608
  ### TAF (Tonie Audio Format) File Structure
@@ -0,0 +1,24 @@
1
+ TonieToolbox/__init__.py,sha256=uS1mimlbtKGNhMjaW_Sp1QgltaEgqWBllV96x2O94Lc,96
2
+ TonieToolbox/__main__.py,sha256=71HjJZFNfdflCbwuL28xHpKkwLIKAXW6sVpGX9TQRII,37202
3
+ TonieToolbox/audio_conversion.py,sha256=nV87LTzuxeJQughu-esxTq2aZq-BvaTURj-pvBqygQs,13075
4
+ TonieToolbox/constants.py,sha256=BQ6eUNvT3eXgsz8KFYMrqpn5vRPXrp2d6folxP6H03E,4374
5
+ TonieToolbox/dependency_manager.py,sha256=EvVUO4T1CrhUXlrVk9HBgCRDER3b1BRNdgkZLSpCTho,27921
6
+ TonieToolbox/filename_generator.py,sha256=RqQHyGTKakuWR01yMSnFVMU_HfLw3rqFxKhXNIHdTlg,3441
7
+ TonieToolbox/logger.py,sha256=eZoQj4xICKEZ645GhIfZhAPAjgbgjnnfTXZ_soPjyDg,3017
8
+ TonieToolbox/media_tags.py,sha256=PnvdHh_1RV3Fi-Wkqz5DMDjSksLsmWPrApv-6BA82jE,23206
9
+ TonieToolbox/ogg_page.py,sha256=-ViaIRBgh5ayfwmyplL8QmmRr5P36X8W0DdHkSFUYUU,21948
10
+ TonieToolbox/opus_packet.py,sha256=OcHXEe3I_K4mWPUD55prpG42sZxJsEeAxqSbFxBmb0c,7895
11
+ TonieToolbox/recursive_processor.py,sha256=m70-oJ4MRXvI9OMy14sC9UsQIxwVEnEoA3hhLGdHhL4,13457
12
+ TonieToolbox/teddycloud.py,sha256=ATfCLKecjBZRwIzhPkNcOKELRSbnmIyeQh-1imuTe9A,27281
13
+ TonieToolbox/tonie_analysis.py,sha256=kp4Wx4cTDddtF2AlS6IX4xs1vQ-mpZ0gsAy4-UdRAAM,23287
14
+ TonieToolbox/tonie_file.py,sha256=_LyIsUp2NmpkUVViiLY7EhXitrY4S27xKG5lvZdECJE,21031
15
+ TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C0U,202
16
+ TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
17
+ TonieToolbox/tonies_json.py,sha256=AAYPTDTVZg4sm5AAnUKPPAifTM1iLh6Oa96ic84K2m0,20673
18
+ TonieToolbox/version_handler.py,sha256=7Zx-pgzAUhz6jMplvNal1wHyxidodVxaNcAV0EMph5k,9778
19
+ tonietoolbox-0.4.0.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
20
+ tonietoolbox-0.4.0.dist-info/METADATA,sha256=y7uwI3Px73oalRuO88NoTVllyj3IOfLix4-wix6IAEE,22378
21
+ tonietoolbox-0.4.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
22
+ tonietoolbox-0.4.0.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
23
+ tonietoolbox-0.4.0.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
24
+ tonietoolbox-0.4.0.dist-info/RECORD,,
@@ -1,23 +0,0 @@
1
- TonieToolbox/__init__.py,sha256=1DGgQLdpAkK84simgtWndHZBKXuXCb-jPnMK_wvNOWc,96
2
- TonieToolbox/__main__.py,sha256=Y6-gjbjNbKhpEvV6wi8BpZSUXXezxfgZT5g8HfMeO4E,34078
3
- TonieToolbox/audio_conversion.py,sha256=ra72qsE8j2GEP_4kqDT9m6aKlnnREZhZAlpf7y83pA0,11202
4
- TonieToolbox/constants.py,sha256=QQWQpnCI65GByLlXLOkt2n8nALLu4m6BWp0zuhI3M04,2021
5
- TonieToolbox/dependency_manager.py,sha256=EvVUO4T1CrhUXlrVk9HBgCRDER3b1BRNdgkZLSpCTho,27921
6
- TonieToolbox/filename_generator.py,sha256=RqQHyGTKakuWR01yMSnFVMU_HfLw3rqFxKhXNIHdTlg,3441
7
- TonieToolbox/logger.py,sha256=Up9fBVkOZwkY61_645bX4tienCpyVSkap-FeTV0v730,1441
8
- TonieToolbox/media_tags.py,sha256=XzCuBcaqBPiSCBip8rWrJ3hTHDwEEN1flyPywM7CMsg,22250
9
- TonieToolbox/ogg_page.py,sha256=-ViaIRBgh5ayfwmyplL8QmmRr5P36X8W0DdHkSFUYUU,21948
10
- TonieToolbox/opus_packet.py,sha256=OcHXEe3I_K4mWPUD55prpG42sZxJsEeAxqSbFxBmb0c,7895
11
- TonieToolbox/recursive_processor.py,sha256=m70-oJ4MRXvI9OMy14sC9UsQIxwVEnEoA3hhLGdHhL4,13457
12
- TonieToolbox/teddycloud.py,sha256=YRgOU3f1qVDSoV05mCCDHb4pd00aI_oD8HViIotvez4,23366
13
- TonieToolbox/tonie_analysis.py,sha256=kp4Wx4cTDddtF2AlS6IX4xs1vQ-mpZ0gsAy4-UdRAAM,23287
14
- TonieToolbox/tonie_file.py,sha256=vY0s8X4ln35ZXpdpGmBcIxgpTJAjduiVvBh34WObyrw,19647
15
- TonieToolbox/tonie_header.proto,sha256=WaWfwO4VrwGtscK2ujfDRKtpeBpaVPoZhI8iMmR-C0U,202
16
- TonieToolbox/tonie_header_pb2.py,sha256=s5bp4ULTEekgq6T61z9fDkRavyPM-3eREs20f_Pxxe8,3665
17
- TonieToolbox/version_handler.py,sha256=7Zx-pgzAUhz6jMplvNal1wHyxidodVxaNcAV0EMph5k,9778
18
- tonietoolbox-0.3.0.dist-info/licenses/LICENSE.md,sha256=rGoga9ZAgNco9fBapVFpWf6ri7HOBp1KRnt1uIruXMk,35190
19
- tonietoolbox-0.3.0.dist-info/METADATA,sha256=17k_CP3FXVhfO60HrS3CWP1bfN-pGNwNFwtfd9QzQj4,16695
20
- tonietoolbox-0.3.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
21
- tonietoolbox-0.3.0.dist-info/entry_points.txt,sha256=oqpeyBxel7aScg35Xr4gZKnf486S5KW9okqeBwyJxxc,60
22
- tonietoolbox-0.3.0.dist-info/top_level.txt,sha256=Wkkm-2p7I3ENfS7ZbYtYUB2g-xwHrXVlERHfonsOPuE,13
23
- tonietoolbox-0.3.0.dist-info/RECORD,,