TonieToolbox 0.3.0__tar.gz → 0.4.1__tar.gz

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.
Files changed (33) hide show
  1. {tonietoolbox-0.3.0/TonieToolbox.egg-info → tonietoolbox-0.4.1}/PKG-INFO +264 -7
  2. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/README.md +262 -6
  3. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/__init__.py +1 -1
  4. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/__main__.py +64 -2
  5. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/audio_conversion.py +36 -14
  6. tonietoolbox-0.4.1/TonieToolbox/constants.py +90 -0
  7. tonietoolbox-0.4.1/TonieToolbox/logger.py +103 -0
  8. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/media_tags.py +22 -6
  9. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/teddycloud.py +101 -2
  10. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/tonie_file.py +32 -12
  11. tonietoolbox-0.4.1/TonieToolbox/tonies_json.py +502 -0
  12. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1/TonieToolbox.egg-info}/PKG-INFO +264 -7
  13. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox.egg-info/SOURCES.txt +1 -0
  14. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox.egg-info/requires.txt +1 -0
  15. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/pyproject.toml +1 -0
  16. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/setup.py +2 -1
  17. tonietoolbox-0.3.0/TonieToolbox/constants.py +0 -15
  18. tonietoolbox-0.3.0/TonieToolbox/logger.py +0 -57
  19. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/LICENSE.md +0 -0
  20. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/MANIFEST.in +0 -0
  21. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/dependency_manager.py +0 -0
  22. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/filename_generator.py +0 -0
  23. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/ogg_page.py +0 -0
  24. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/opus_packet.py +0 -0
  25. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/recursive_processor.py +0 -0
  26. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/tonie_analysis.py +0 -0
  27. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/tonie_header.proto +0 -0
  28. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/tonie_header_pb2.py +0 -0
  29. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox/version_handler.py +0 -0
  30. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox.egg-info/dependency_links.txt +0 -0
  31. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox.egg-info/entry_points.txt +0 -0
  32. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/TonieToolbox.egg-info/top_level.txt +0 -0
  33. {tonietoolbox-0.3.0 → tonietoolbox-0.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TonieToolbox
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: Convert audio files to Tonie box compatible format
5
5
  Home-page: https://github.com/Quentendo64/TonieToolbox
6
6
  Author: Quentendo64
@@ -20,6 +20,7 @@ Requires-Python: >=3.6
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE.md
22
22
  Requires-Dist: protobuf<=3.19.0
23
+ Requires-Dist: mutagen>=1.47.0
23
24
  Dynamic: author
24
25
  Dynamic: home-page
25
26
  Dynamic: license-file
@@ -42,12 +43,15 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
42
43
  - [Installation](#installation)
43
44
  - [Install from PyPI (Recommended)](#install-from-pypi-recommended)
44
45
  - [Install from Source](#install-from-source)
46
+ - [Using Docker](#using-docker)
45
47
  - [Usage](#usage)
46
48
  - [Basic Usage](#basic-usage)
49
+ - [Docker Usage](#docker-usage)
47
50
  - [Advanced Options](#advanced-options)
48
51
  - [Common Usage Examples](#common-usage-examples)
49
52
  - [Media Tags](#media-tags)
50
53
  - [TeddyCloud Upload](#teddycloud-upload)
54
+ - [Real-World Use Cases](#real-world-use-cases)
51
55
  - [Technical Details](#technical-details)
52
56
  - [TAF File Structure](#taf-tonie-audio-format-file-structure)
53
57
  - [File Analysis](#file-analysis)
@@ -105,6 +109,32 @@ cd TonieToolbox
105
109
  pip install protobuf
106
110
  ```
107
111
 
112
+ ### Using Docker
113
+
114
+ TonieToolbox is available as a Docker image, which comes with all dependencies pre-installed.
115
+
116
+ #### Pull the Docker Image
117
+
118
+ ```
119
+ # From Docker Hub
120
+ docker pull quentendo64/tonietoolbox:latest
121
+
122
+ # From GitHub Packages
123
+ docker pull ghcr.io/quentendo64/tonietoolbox:latest
124
+ ```
125
+
126
+ #### Build the Docker Image Locally
127
+
128
+ ```
129
+ docker build -t tonietoolbox .
130
+ ```
131
+
132
+ Or using docker-compose:
133
+
134
+ ```
135
+ docker-compose build
136
+ ```
137
+
108
138
  ## Usage
109
139
 
110
140
  ### Basic Usage
@@ -161,6 +191,41 @@ By default, all generated TAF files are saved in the `.\output` directory. If yo
161
191
  tonietoolbox --recursive --output-to-source "Music/Albums"
162
192
  ```
163
193
 
194
+ ### Docker Usage
195
+
196
+ Using TonieToolbox with Docker simplifies the setup process as all dependencies (FFmpeg and opus-tools) are pre-installed.
197
+
198
+ **Convert a single audio file to Tonie format:**
199
+
200
+ ```bash
201
+ # Use docker run
202
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
203
+
204
+ # Or using docker-compose
205
+ docker-compose run --rm tonietoolbox input/my-audio-file.mp3
206
+ ```
207
+
208
+ **Process folders recursively:**
209
+
210
+ ```bash
211
+ # Use docker run
212
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive input/folder
213
+
214
+ ```
215
+
216
+ **Advanced options with Docker:**
217
+
218
+ ```bash
219
+ # Convert with custom settings
220
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive --use-media-tags --name-template "{album} - {artist}" --bitrate 128 input/folder
221
+ ```
222
+
223
+ **Upload to TeddyCloud with Docker:**
224
+
225
+ ```bash
226
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3 --upload https://teddycloud.example.com --include-artwork
227
+ ```
228
+
164
229
  ### Advanced Options
165
230
 
166
231
  Run the following command to see all available options:
@@ -175,10 +240,10 @@ usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags
175
240
  [--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
176
241
  [--show-progress] [--connection-timeout SECONDS]
177
242
  [--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]
243
+ [--retry-delay SECONDS] [--create-custom-json] [-t TIMESTAMP] [-f FFMPEG]
244
+ [-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
245
+ [-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
246
+ [--show-tags] [-S] [-F] [-X] [-d] [-T] [-q] [-Q]
182
247
  SOURCE [TARGET]
183
248
 
184
249
  Create Tonie compatible file from Ogg opus file(s).
@@ -204,6 +269,7 @@ TeddyCloud Options:
204
269
  Maximum number of retry attempts (default: 3)
205
270
  --retry-delay SECONDS
206
271
  Delay between retry attempts in seconds (default: 5)
272
+ --create-custom-json Fetch and update custom Tonies JSON data
207
273
 
208
274
  optional arguments:
209
275
  -h, --help show this help message and exit
@@ -224,10 +290,10 @@ optional arguments:
224
290
  Save output files in the source directory instead of output directory
225
291
  -A, --auto-download Automatically download FFmpeg and opusenc if needed
226
292
  -k, --keep-temp Keep temporary opus files in a temp folder for testing
293
+ -u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags (DEPRECATED)
227
294
  -C, --compare FILE2 Compare input file with another .taf file for debugging
228
295
  -D, --detailed-compare
229
296
  Show detailed OGG page differences when comparing files
230
-
231
297
  Media Tag Options:
232
298
  -m, --use-media-tags Use media tags from audio files for naming
233
299
  --name-template TEMPLATE
@@ -247,6 +313,7 @@ Logging Options:
247
313
  -T, --trace Enable trace logging (very verbose)
248
314
  -q, --quiet Show only warnings and errors
249
315
  -Q, --silent Show only errors
316
+ --log-file Save logs to a timestamped file in .tonietoolbox folder
250
317
  ```
251
318
 
252
319
  ### Common Usage Examples
@@ -291,6 +358,29 @@ tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extracti
291
358
  tonietoolbox input.mp3 --bitrate 128
292
359
  ```
293
360
 
361
+ #### Constant bitrate encoding:
362
+
363
+ For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
364
+
365
+ ```
366
+ # Encode with constant bitrate at 96 kbps (default)
367
+ tonietoolbox input.mp3 --cbr
368
+
369
+ # Encode with constant bitrate at 128 kbps
370
+ tonietoolbox input.mp3 --cbr --bitrate 128
371
+ ```
372
+
373
+ #### Append Tonie tag:
374
+
375
+ You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
376
+
377
+ ```
378
+ # Add an 8-character hex tag to filename
379
+ tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
380
+
381
+ # The output will be named "input-7F8A6B2E.taf"
382
+ ```
383
+
294
384
  #### Process a complex folder structure:
295
385
 
296
386
  Process an audiobook series with multiple folders:
@@ -302,7 +392,128 @@ tonietoolbox --recursive "\Hörspiele\Die drei Fragezeichen\Folgen"
302
392
  Process a music collection with nested album folders and save TAF files alongside the source directories:
303
393
 
304
394
  ```
305
- tonietoolbox --recursive --output-to-source "\Hörspiele\"
395
+ tonietoolbox --recursive --output-to-source "\Hörspiele\"
396
+ ```
397
+
398
+ #### Automatic dependency download:
399
+
400
+ If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
401
+
402
+ ```
403
+ # Automatically download dependencies when needed
404
+ tonietoolbox input.mp3 --auto-download
405
+
406
+ # Specify custom FFmpeg or opusenc locations
407
+ tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
408
+ ```
409
+
410
+ #### Keep temporary files:
411
+
412
+ When troubleshooting or debugging, you can keep the temporary opus files:
413
+
414
+ ```
415
+ # Keep temporary opus files in the temp folder
416
+ tonietoolbox input.mp3 --keep-temp
417
+
418
+ ```
419
+
420
+ #### Working with list files:
421
+
422
+ Create a text file (.lst) with paths to audio files for batch processing:
423
+
424
+ ```
425
+ # Contents of playlist.lst:
426
+ C:\Music\song1.mp3
427
+ "C:\Music\song2.flac"
428
+ C:\Music\song3.wav
429
+ "C:\Music Path With Spaces\song2.flac"
430
+
431
+ # Process the list file
432
+ tonietoolbox playlist.lst my_playlist.taf
433
+ ```
434
+
435
+ #### TeddyCloud advanced options:
436
+
437
+ Customize your TeddyCloud uploads with connection options:
438
+
439
+ ```
440
+ # Upload with custom timeouts and retry parameters
441
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
442
+
443
+ # Disable progress bar during upload
444
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progress=False
445
+
446
+ # Upload to a special folder in TeddyCloud
447
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
448
+ ```
449
+
450
+ #### Get available tags from TeddyCloud:
451
+
452
+ To see which tags you can use with your TeddyCloud server:
453
+
454
+ ```
455
+ tonietoolbox --get-tags https://teddycloud.example.com
456
+ ```
457
+
458
+ #### Version checking and updates:
459
+
460
+ TonieToolbox can check for newer versions and notify you when there are updates available:
461
+
462
+ ```
463
+ # Skip checking for updates if you're offline or want faster startup
464
+ tonietoolbox input.mp3 --skip-update-check
465
+
466
+ # Force refresh of version information from PyPI
467
+ tonietoolbox input.mp3 --force-refresh-cache
468
+
469
+ # Clear cached version information
470
+ tonietoolbox --clear-version-cache
471
+ ```
472
+
473
+ #### Legacy tag options:
474
+
475
+ Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
476
+
477
+ ```
478
+ tonietoolbox input.mp3 --use-legacy-tags
479
+ ```
480
+
481
+ #### Create custom JSON data:
482
+
483
+ When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
484
+
485
+ ```
486
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
487
+ ```
488
+
489
+ This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
490
+
491
+ #### Logging and Troubleshooting:
492
+
493
+ Control the verbosity of console output with different logging levels:
494
+
495
+ ```
496
+ # Enable detailed debug information (useful for troubleshooting)
497
+ tonietoolbox input.mp3 --debug
498
+
499
+ # Enable extremely verbose trace logging (developer level)
500
+ tonietoolbox input.mp3 --trace
501
+
502
+ # Reduce output to show only warnings and errors
503
+ tonietoolbox input.mp3 --quiet
504
+
505
+ # Show only critical errors (minimal output)
506
+ tonietoolbox input.mp3 --silent
507
+ ```
508
+
509
+ You can combine logging options with other commands:
510
+
511
+ ```
512
+ # Debug mode while splitting a TAF file
513
+ tonietoolbox --split my_tonie.taf --debug
514
+
515
+ # Quiet mode while batch processing
516
+ tonietoolbox --recursive "Music/Collection/" --quiet
306
517
  ```
307
518
 
308
519
  ### Media Tags
@@ -410,6 +621,52 @@ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-v
410
621
 
411
622
  Use this option if the TeddyCloud server uses a self-signed certificate.
412
623
 
624
+ ## Real-World Use Cases
625
+
626
+ ### Converting an Audiobook Series
627
+
628
+ To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
629
+
630
+ ```
631
+ 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"
632
+ ```
633
+
634
+ This command will:
635
+ 1. Recursively process the Die Drei Fragezeichen audioplays directory
636
+ 2. Use a naming template based on source metadata
637
+ 3. Encode at 128 kbps
638
+ 4. Upload both audio files and cover art to TeddyCloud
639
+
640
+ ### Creating Children's Story Collections
641
+
642
+ For a custom children's story collection with chapters:
643
+
644
+ ```
645
+ tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
646
+ ```
647
+
648
+ This command:
649
+ 1. Processes a list of story audio files
650
+ 2. Names the output based on metadata
651
+ 3. Uses constant bitrate encoding for consistent quality
652
+ 4. Automatically downloads dependencies if needed
653
+ 5. Shows detailed debug information during the process
654
+
655
+
656
+ ### Advanced Media Tag Usage
657
+
658
+ For complex media tag processing:
659
+
660
+ ```
661
+ # First check available tags
662
+ tonietoolbox --show-tags "C:\Music\Classical\Bach"
663
+
664
+ # Then use a sophisticated naming template
665
+ tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
666
+ ```
667
+
668
+ The first command shows what tags are available, allowing you to create precise naming templates for classical music collections as example.
669
+
413
670
  ## Technical Details
414
671
 
415
672
  ### TAF (Tonie Audio Format) File Structure
@@ -15,12 +15,15 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
15
15
  - [Installation](#installation)
16
16
  - [Install from PyPI (Recommended)](#install-from-pypi-recommended)
17
17
  - [Install from Source](#install-from-source)
18
+ - [Using Docker](#using-docker)
18
19
  - [Usage](#usage)
19
20
  - [Basic Usage](#basic-usage)
21
+ - [Docker Usage](#docker-usage)
20
22
  - [Advanced Options](#advanced-options)
21
23
  - [Common Usage Examples](#common-usage-examples)
22
24
  - [Media Tags](#media-tags)
23
25
  - [TeddyCloud Upload](#teddycloud-upload)
26
+ - [Real-World Use Cases](#real-world-use-cases)
24
27
  - [Technical Details](#technical-details)
25
28
  - [TAF File Structure](#taf-tonie-audio-format-file-structure)
26
29
  - [File Analysis](#file-analysis)
@@ -78,6 +81,32 @@ cd TonieToolbox
78
81
  pip install protobuf
79
82
  ```
80
83
 
84
+ ### Using Docker
85
+
86
+ TonieToolbox is available as a Docker image, which comes with all dependencies pre-installed.
87
+
88
+ #### Pull the Docker Image
89
+
90
+ ```
91
+ # From Docker Hub
92
+ docker pull quentendo64/tonietoolbox:latest
93
+
94
+ # From GitHub Packages
95
+ docker pull ghcr.io/quentendo64/tonietoolbox:latest
96
+ ```
97
+
98
+ #### Build the Docker Image Locally
99
+
100
+ ```
101
+ docker build -t tonietoolbox .
102
+ ```
103
+
104
+ Or using docker-compose:
105
+
106
+ ```
107
+ docker-compose build
108
+ ```
109
+
81
110
  ## Usage
82
111
 
83
112
  ### Basic Usage
@@ -134,6 +163,41 @@ By default, all generated TAF files are saved in the `.\output` directory. If yo
134
163
  tonietoolbox --recursive --output-to-source "Music/Albums"
135
164
  ```
136
165
 
166
+ ### Docker Usage
167
+
168
+ Using TonieToolbox with Docker simplifies the setup process as all dependencies (FFmpeg and opus-tools) are pre-installed.
169
+
170
+ **Convert a single audio file to Tonie format:**
171
+
172
+ ```bash
173
+ # Use docker run
174
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
175
+
176
+ # Or using docker-compose
177
+ docker-compose run --rm tonietoolbox input/my-audio-file.mp3
178
+ ```
179
+
180
+ **Process folders recursively:**
181
+
182
+ ```bash
183
+ # Use docker run
184
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive input/folder
185
+
186
+ ```
187
+
188
+ **Advanced options with Docker:**
189
+
190
+ ```bash
191
+ # Convert with custom settings
192
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive --use-media-tags --name-template "{album} - {artist}" --bitrate 128 input/folder
193
+ ```
194
+
195
+ **Upload to TeddyCloud with Docker:**
196
+
197
+ ```bash
198
+ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3 --upload https://teddycloud.example.com --include-artwork
199
+ ```
200
+
137
201
  ### Advanced Options
138
202
 
139
203
  Run the following command to see all available options:
@@ -148,10 +212,10 @@ usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags
148
212
  [--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
149
213
  [--show-progress] [--connection-timeout SECONDS]
150
214
  [--read-timeout SECONDS] [--max-retries RETRIES]
151
- [--retry-delay SECONDS] [-t TIMESTAMP] [-f FFMPEG] [-o OPUSENC]
152
- [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
153
- [-A] [-k] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
154
- [--show-tags] [-d] [-T] [-q] [-Q]
215
+ [--retry-delay SECONDS] [--create-custom-json] [-t TIMESTAMP] [-f FFMPEG]
216
+ [-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
217
+ [-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
218
+ [--show-tags] [-S] [-F] [-X] [-d] [-T] [-q] [-Q]
155
219
  SOURCE [TARGET]
156
220
 
157
221
  Create Tonie compatible file from Ogg opus file(s).
@@ -177,6 +241,7 @@ TeddyCloud Options:
177
241
  Maximum number of retry attempts (default: 3)
178
242
  --retry-delay SECONDS
179
243
  Delay between retry attempts in seconds (default: 5)
244
+ --create-custom-json Fetch and update custom Tonies JSON data
180
245
 
181
246
  optional arguments:
182
247
  -h, --help show this help message and exit
@@ -197,10 +262,10 @@ optional arguments:
197
262
  Save output files in the source directory instead of output directory
198
263
  -A, --auto-download Automatically download FFmpeg and opusenc if needed
199
264
  -k, --keep-temp Keep temporary opus files in a temp folder for testing
265
+ -u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags (DEPRECATED)
200
266
  -C, --compare FILE2 Compare input file with another .taf file for debugging
201
267
  -D, --detailed-compare
202
268
  Show detailed OGG page differences when comparing files
203
-
204
269
  Media Tag Options:
205
270
  -m, --use-media-tags Use media tags from audio files for naming
206
271
  --name-template TEMPLATE
@@ -220,6 +285,7 @@ Logging Options:
220
285
  -T, --trace Enable trace logging (very verbose)
221
286
  -q, --quiet Show only warnings and errors
222
287
  -Q, --silent Show only errors
288
+ --log-file Save logs to a timestamped file in .tonietoolbox folder
223
289
  ```
224
290
 
225
291
  ### Common Usage Examples
@@ -264,6 +330,29 @@ tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extracti
264
330
  tonietoolbox input.mp3 --bitrate 128
265
331
  ```
266
332
 
333
+ #### Constant bitrate encoding:
334
+
335
+ For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
336
+
337
+ ```
338
+ # Encode with constant bitrate at 96 kbps (default)
339
+ tonietoolbox input.mp3 --cbr
340
+
341
+ # Encode with constant bitrate at 128 kbps
342
+ tonietoolbox input.mp3 --cbr --bitrate 128
343
+ ```
344
+
345
+ #### Append Tonie tag:
346
+
347
+ You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
348
+
349
+ ```
350
+ # Add an 8-character hex tag to filename
351
+ tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
352
+
353
+ # The output will be named "input-7F8A6B2E.taf"
354
+ ```
355
+
267
356
  #### Process a complex folder structure:
268
357
 
269
358
  Process an audiobook series with multiple folders:
@@ -275,7 +364,128 @@ tonietoolbox --recursive "\Hörspiele\Die drei Fragezeichen\Folgen"
275
364
  Process a music collection with nested album folders and save TAF files alongside the source directories:
276
365
 
277
366
  ```
278
- tonietoolbox --recursive --output-to-source "\Hörspiele\"
367
+ tonietoolbox --recursive --output-to-source "\Hörspiele\"
368
+ ```
369
+
370
+ #### Automatic dependency download:
371
+
372
+ If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
373
+
374
+ ```
375
+ # Automatically download dependencies when needed
376
+ tonietoolbox input.mp3 --auto-download
377
+
378
+ # Specify custom FFmpeg or opusenc locations
379
+ tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
380
+ ```
381
+
382
+ #### Keep temporary files:
383
+
384
+ When troubleshooting or debugging, you can keep the temporary opus files:
385
+
386
+ ```
387
+ # Keep temporary opus files in the temp folder
388
+ tonietoolbox input.mp3 --keep-temp
389
+
390
+ ```
391
+
392
+ #### Working with list files:
393
+
394
+ Create a text file (.lst) with paths to audio files for batch processing:
395
+
396
+ ```
397
+ # Contents of playlist.lst:
398
+ C:\Music\song1.mp3
399
+ "C:\Music\song2.flac"
400
+ C:\Music\song3.wav
401
+ "C:\Music Path With Spaces\song2.flac"
402
+
403
+ # Process the list file
404
+ tonietoolbox playlist.lst my_playlist.taf
405
+ ```
406
+
407
+ #### TeddyCloud advanced options:
408
+
409
+ Customize your TeddyCloud uploads with connection options:
410
+
411
+ ```
412
+ # Upload with custom timeouts and retry parameters
413
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
414
+
415
+ # Disable progress bar during upload
416
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progress=False
417
+
418
+ # Upload to a special folder in TeddyCloud
419
+ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
420
+ ```
421
+
422
+ #### Get available tags from TeddyCloud:
423
+
424
+ To see which tags you can use with your TeddyCloud server:
425
+
426
+ ```
427
+ tonietoolbox --get-tags https://teddycloud.example.com
428
+ ```
429
+
430
+ #### Version checking and updates:
431
+
432
+ TonieToolbox can check for newer versions and notify you when there are updates available:
433
+
434
+ ```
435
+ # Skip checking for updates if you're offline or want faster startup
436
+ tonietoolbox input.mp3 --skip-update-check
437
+
438
+ # Force refresh of version information from PyPI
439
+ tonietoolbox input.mp3 --force-refresh-cache
440
+
441
+ # Clear cached version information
442
+ tonietoolbox --clear-version-cache
443
+ ```
444
+
445
+ #### Legacy tag options:
446
+
447
+ Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
448
+
449
+ ```
450
+ tonietoolbox input.mp3 --use-legacy-tags
451
+ ```
452
+
453
+ #### Create custom JSON data:
454
+
455
+ When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
456
+
457
+ ```
458
+ tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
459
+ ```
460
+
461
+ This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
462
+
463
+ #### Logging and Troubleshooting:
464
+
465
+ Control the verbosity of console output with different logging levels:
466
+
467
+ ```
468
+ # Enable detailed debug information (useful for troubleshooting)
469
+ tonietoolbox input.mp3 --debug
470
+
471
+ # Enable extremely verbose trace logging (developer level)
472
+ tonietoolbox input.mp3 --trace
473
+
474
+ # Reduce output to show only warnings and errors
475
+ tonietoolbox input.mp3 --quiet
476
+
477
+ # Show only critical errors (minimal output)
478
+ tonietoolbox input.mp3 --silent
479
+ ```
480
+
481
+ You can combine logging options with other commands:
482
+
483
+ ```
484
+ # Debug mode while splitting a TAF file
485
+ tonietoolbox --split my_tonie.taf --debug
486
+
487
+ # Quiet mode while batch processing
488
+ tonietoolbox --recursive "Music/Collection/" --quiet
279
489
  ```
280
490
 
281
491
  ### Media Tags
@@ -383,6 +593,52 @@ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-v
383
593
 
384
594
  Use this option if the TeddyCloud server uses a self-signed certificate.
385
595
 
596
+ ## Real-World Use Cases
597
+
598
+ ### Converting an Audiobook Series
599
+
600
+ To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
601
+
602
+ ```
603
+ 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"
604
+ ```
605
+
606
+ This command will:
607
+ 1. Recursively process the Die Drei Fragezeichen audioplays directory
608
+ 2. Use a naming template based on source metadata
609
+ 3. Encode at 128 kbps
610
+ 4. Upload both audio files and cover art to TeddyCloud
611
+
612
+ ### Creating Children's Story Collections
613
+
614
+ For a custom children's story collection with chapters:
615
+
616
+ ```
617
+ tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
618
+ ```
619
+
620
+ This command:
621
+ 1. Processes a list of story audio files
622
+ 2. Names the output based on metadata
623
+ 3. Uses constant bitrate encoding for consistent quality
624
+ 4. Automatically downloads dependencies if needed
625
+ 5. Shows detailed debug information during the process
626
+
627
+
628
+ ### Advanced Media Tag Usage
629
+
630
+ For complex media tag processing:
631
+
632
+ ```
633
+ # First check available tags
634
+ tonietoolbox --show-tags "C:\Music\Classical\Bach"
635
+
636
+ # Then use a sophisticated naming template
637
+ tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
638
+ ```
639
+
640
+ The first command shows what tags are available, allowing you to create precise naming templates for classical music collections as example.
641
+
386
642
  ## Technical Details
387
643
 
388
644
  ### TAF (Tonie Audio Format) File Structure
@@ -2,4 +2,4 @@
2
2
  TonieToolbox - Convert audio files to Tonie box compatible format
3
3
  """
4
4
 
5
- __version__ = '0.3.0'
5
+ __version__ = '0.4.1'