TonieToolbox 0.5.0a1__tar.gz → 0.6.0__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 (39) hide show
  1. {tonietoolbox-0.5.0a1/TonieToolbox.egg-info → tonietoolbox-0.6.0}/PKG-INFO +257 -177
  2. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/README.md +255 -176
  3. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/__init__.py +2 -1
  4. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/__main__.py +303 -141
  5. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/artwork.py +59 -10
  6. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/audio_conversion.py +106 -34
  7. tonietoolbox-0.6.0/TonieToolbox/constants.py +213 -0
  8. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/dependency_manager.py +679 -184
  9. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/filename_generator.py +57 -10
  10. tonietoolbox-0.6.0/TonieToolbox/integration.py +73 -0
  11. tonietoolbox-0.6.0/TonieToolbox/integration_macos.py +613 -0
  12. tonietoolbox-0.6.0/TonieToolbox/integration_ubuntu.py +2 -0
  13. tonietoolbox-0.6.0/TonieToolbox/integration_windows.py +445 -0
  14. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/logger.py +9 -10
  15. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/media_tags.py +24 -104
  16. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/ogg_page.py +41 -41
  17. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/opus_packet.py +15 -15
  18. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/recursive_processor.py +34 -34
  19. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/tags.py +4 -5
  20. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/teddycloud.py +164 -51
  21. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/tonie_analysis.py +26 -24
  22. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/tonie_file.py +88 -72
  23. tonietoolbox-0.6.0/TonieToolbox/tonies_json.py +1372 -0
  24. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/version_handler.py +14 -20
  25. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0/TonieToolbox.egg-info}/PKG-INFO +257 -177
  26. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox.egg-info/SOURCES.txt +4 -0
  27. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox.egg-info/requires.txt +1 -0
  28. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/pyproject.toml +3 -2
  29. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/setup.py +5 -2
  30. tonietoolbox-0.5.0a1/TonieToolbox/constants.py +0 -90
  31. tonietoolbox-0.5.0a1/TonieToolbox/tonies_json.py +0 -579
  32. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/LICENSE.md +0 -0
  33. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/MANIFEST.in +0 -0
  34. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/tonie_header.proto +0 -0
  35. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox/tonie_header_pb2.py +0 -0
  36. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox.egg-info/dependency_links.txt +0 -0
  37. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox.egg-info/entry_points.txt +0 -0
  38. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/TonieToolbox.egg-info/top_level.txt +0 -0
  39. {tonietoolbox-0.5.0a1 → tonietoolbox-0.6.0}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TonieToolbox
3
- Version: 0.5.0a1
4
- Summary: Create files for the Tonie box and interact with TeddyCloud servers
3
+ Version: 0.6.0
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"
@@ -31,14 +32,30 @@ Dynamic: home-page
31
32
  Dynamic: license-file
32
33
  Dynamic: requires-python
33
34
 
34
- # TonieToolbox
35
- ### WIP - Work in Progress
36
- Happy Testing :-P
35
+ # TonieToolbox 🎵📦
37
36
 
38
- A Python tool for converting audio files to Tonie box compatible format (TAF - Tonie Audio Format).
37
+ [![Publish to DockerHub](https://github.com/Quentendo64/TonieToolbox/actions/workflows/publish-to-docker.yml/badge.svg)](https://github.com/Quentendo64/TonieToolbox/actions)
38
+ [![Publish to PyPI](https://github.com/Quentendo64/TonieToolbox/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/Quentendo64/TonieToolbox/actions)
39
+
40
+ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
41
+ [![PyPI version](https://badge.fury.io/py/tonietoolbox.svg)](https://badge.fury.io/py/tonietoolbox)
42
+ [![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)
43
+ [![Docker](https://img.shields.io/docker/pulls/quentendo64/tonietoolbox)](https://hub.docker.com/r/quentendo64/tonietoolbox)
44
+
45
+ A Toolkit for converting various audio formats into the Tonie-compatible TAF format (Tonie Audio Format) and interacting with [TeddyCloud powered by RevvoX](https://github.com/toniebox-reverse-engineering/teddycloud)
46
+
47
+ ## 🚀 Get Started
48
+
49
+ → [HOWTO Guide for Beginners](HOWTO.md)
50
+ → [Contributing Guidelines](CONTRIBUTING.md)
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
39
58
 
40
- # Beginners Guide
41
- - [HOWTO](HOWTO.md)
42
59
 
43
60
  ## Table of Contents
44
61
 
@@ -64,6 +81,7 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
64
81
  - [Related Projects](#related-projects)
65
82
  - [Contributing](#contributing)
66
83
  - [Legal Notice](#legal-notice)
84
+ - [Support](#support)
67
85
 
68
86
  ## Overview
69
87
 
@@ -90,14 +108,14 @@ The tool provides several capabilities:
90
108
  - opus-tools (specifically `opusenc` for encoding to opus format)
91
109
  - mutagen (for reading audio file metadata, auto-installed when needed)
92
110
 
93
- Make sure FFmpeg and opus-tools are installed on your system and accessible in your PATH.
94
- If the requirements are not found in PATH. TonieToolbox will download the missing requirements with --auto-download.
111
+ ***Make sure FFmpeg and opus-tools are installed on your system and accessible in your PATH.***
112
+ If the requirements are not found in PATH, TonieToolbox will download the missing requirements with --auto-download.
95
113
 
96
114
  ## Installation
97
115
 
98
116
  ### Install from PyPI (Recommended)
99
117
 
100
- ```
118
+ ```shell
101
119
  pip install tonietoolbox
102
120
  ```
103
121
 
@@ -105,7 +123,7 @@ This will install TonieToolbox and its dependencies, making the `tonietoolbox` c
105
123
 
106
124
  ### Install from Source
107
125
 
108
- ```
126
+ ```shell
109
127
  # Clone the repository
110
128
  git clone https://github.com/Quentendo64/TonieToolbox.git
111
129
  cd TonieToolbox
@@ -120,7 +138,7 @@ TonieToolbox is available as a Docker image, which comes with all dependencies p
120
138
 
121
139
  #### Pull the Docker Image
122
140
 
123
- ```
141
+ ```shell
124
142
  # From Docker Hub
125
143
  docker pull quentendo64/tonietoolbox:latest
126
144
 
@@ -130,13 +148,13 @@ docker pull ghcr.io/quentendo64/tonietoolbox:latest
130
148
 
131
149
  #### Build the Docker Image Locally
132
150
 
133
- ```
151
+ ```shell
134
152
  docker build -t tonietoolbox .
135
153
  ```
136
154
 
137
155
  Or using docker-compose:
138
156
 
139
- ```
157
+ ```shell
140
158
  docker-compose build
141
159
  ```
142
160
 
@@ -147,12 +165,14 @@ docker-compose build
147
165
  **Convert a single audio file to Tonie format:**
148
166
 
149
167
  If installed via pip:
150
- ```
168
+
169
+ ```shell
151
170
  tonietoolbox input.mp3
152
171
  ```
153
172
 
154
173
  If installed from source:
155
- ```
174
+
175
+ ```shell
156
176
  python TonieToolbox.py input.mp3
157
177
  ```
158
178
 
@@ -160,7 +180,7 @@ This will create a file named `input.taf` in the `.\output` directory.
160
180
 
161
181
  **Specify output filename:**
162
182
 
163
- ```
183
+ ```shell
164
184
  tonietoolbox input.mp3 my_tonie.taf
165
185
  ```
166
186
 
@@ -170,13 +190,13 @@ This will create a file named `my_tonie.taf` in the `.\output` directory.
170
190
 
171
191
  You can specify a directory to convert all audio files within it:
172
192
 
173
- ```
193
+ ```shell
174
194
  tonietoolbox input_directory/
175
195
  ```
176
196
 
177
197
  Or use a list file (.lst) containing paths to multiple audio files:
178
198
 
179
- ```
199
+ ```shell
180
200
  tonietoolbox playlist.lst
181
201
  ```
182
202
 
@@ -184,7 +204,7 @@ tonietoolbox playlist.lst
184
204
 
185
205
  To process an entire folder structure with multiple audio folders:
186
206
 
187
- ```
207
+ ```shell
188
208
  tonietoolbox --recursive "Music/Albums"
189
209
  ```
190
210
 
@@ -192,7 +212,7 @@ This will scan all subfolders, identify those containing audio files, and create
192
212
 
193
213
  By default, all generated TAF files are saved in the `.\output` directory. If you want to save each TAF file in its source directory instead:
194
214
 
195
- ```
215
+ ```shell
196
216
  tonietoolbox --recursive --output-to-source "Music/Albums"
197
217
  ```
198
218
 
@@ -202,26 +222,33 @@ Using TonieToolbox with Docker simplifies the setup process as all dependencies
202
222
 
203
223
  **Convert a single audio file to Tonie format:**
204
224
 
225
+ **On Windows PowerShell/Unix/macOS:**
226
+
205
227
  ```bash
206
- # Use docker run
207
228
  docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
229
+ ```
230
+
231
+ **On Windows (CMD):**
232
+
233
+ ```cmd
234
+ docker run --rm -v "%cd%\input:/tonietoolbox/input" -v "%cd%\output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
235
+ ```
236
+
237
+ **Or using docker-compose:**
208
238
 
209
- # Or using docker-compose
239
+ ```shell
210
240
  docker-compose run --rm tonietoolbox input/my-audio-file.mp3
211
241
  ```
212
242
 
213
243
  **Process folders recursively:**
214
244
 
215
245
  ```bash
216
- # Use docker run
217
246
  docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive input/folder
218
-
219
247
  ```
220
248
 
221
249
  **Advanced options with Docker:**
222
250
 
223
251
  ```bash
224
- # Convert with custom settings
225
252
  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
226
253
  ```
227
254
 
@@ -235,20 +262,26 @@ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonieto
235
262
 
236
263
  Run the following command to see all available options:
237
264
 
238
- ```
265
+ ```shell
239
266
  tonietoolbox -h
240
267
  ```
241
268
 
242
269
  Output:
243
- ```
270
+
271
+ ```shell
244
272
  usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags URL]
245
273
  [--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
246
- [--show-progress] [--connection-timeout SECONDS]
247
- [--read-timeout SECONDS] [--max-retries RETRIES]
248
- [--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]
249
279
  [-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
250
- [-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
251
- [--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]
252
285
  SOURCE [TARGET]
253
286
 
254
287
  Create Tonie compatible file from Ogg opus file(s).
@@ -264,8 +297,7 @@ TeddyCloud Options:
264
297
  --ignore-ssl-verify Ignore SSL certificate verification (for self-signed certificates)
265
298
  --special-folder FOLDER
266
299
  Special folder to upload to (currently only "library" is supported)
267
- --path PATH Path where to write the file on TeddyCloud server
268
- --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}")
269
301
  --connection-timeout SECONDS
270
302
  Connection timeout in seconds (default: 10)
271
303
  --read-timeout SECONDS
@@ -275,12 +307,19 @@ TeddyCloud Options:
275
307
  --retry-delay SECONDS
276
308
  Delay between retry attempts in seconds (default: 5)
277
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
278
317
 
279
318
  optional arguments:
280
319
  -h, --help show this help message and exit
281
320
  -v, --version show program version and exit
282
321
  -t, --timestamp TIMESTAMP
283
- set custom timestamp / bitstream serial / reference .taf file
322
+ set custom timestamp / bitstream serial
284
323
  -f, --ffmpeg FFMPEG specify location of ffmpeg
285
324
  -o, --opusenc OPUSENC specify location of opusenc
286
325
  -b, --bitrate BITRATE set encoding bitrate in kbps (default: 96)
@@ -293,16 +332,27 @@ optional arguments:
293
332
  -r, --recursive Process folders recursively
294
333
  -O, --output-to-source
295
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)
296
338
  -A, --auto-download Automatically download FFmpeg and opusenc if needed
297
339
  -k, --keep-temp Keep temporary opus files in a temp folder for testing
298
- -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
299
341
  -C, --compare FILE2 Compare input file with another .taf file for debugging
300
342
  -D, --detailed-compare
301
343
  Show detailed OGG page differences when comparing files
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
+
302
350
  Media Tag Options:
303
351
  -m, --use-media-tags Use media tags from audio files for naming
304
352
  --name-template TEMPLATE
305
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}"
306
356
  --show-tags Show available media tags from input files
307
357
 
308
358
  Version Check Options:
@@ -323,51 +373,51 @@ Logging Options:
323
373
 
324
374
  ### Common Usage Examples
325
375
 
326
- #### Analyze a Tonie file:
376
+ #### Analyze a Tonie file
327
377
 
328
- ```
378
+ ```shell
329
379
  tonietoolbox --info my_tonie.taf
330
380
  ```
331
381
 
332
- #### Split a Tonie file into individual opus tracks:
382
+ #### Split a Tonie file into individual opus tracks
333
383
 
334
- ```
384
+ ```shell
335
385
  tonietoolbox --split my_tonie.taf
336
386
  ```
337
387
 
338
- #### Compare TAF files:
388
+ #### Compare TAF files
339
389
 
340
390
  Compare two TAF files for debugging purposes:
341
391
 
342
- ```
392
+ ```shell
343
393
  tonietoolbox file1.taf --compare file2.taf
344
394
  ```
345
395
 
346
396
  For detailed comparison including OGG page differences:
347
397
 
348
- ```
398
+ ```shell
349
399
  tonietoolbox file1.taf --compare file2.taf --detailed-compare
350
400
  ```
351
401
 
352
- #### Custom timestamp options:
402
+ #### Custom timestamp options
353
403
 
354
- ```
404
+ ```shell
355
405
  tonietoolbox input.mp3 --timestamp 1745078762 # UNIX Timestamp
356
406
  tonietoolbox input.mp3 --timestamp 0x6803C9EA # Bitstream time
357
407
  tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extraction
358
408
  ```
359
409
 
360
- #### Set custom bitrate:
410
+ #### Set custom bitrate
361
411
 
362
- ```
412
+ ```shell
363
413
  tonietoolbox input.mp3 --bitrate 128
364
414
  ```
365
415
 
366
- #### Constant bitrate encoding:
416
+ #### Constant bitrate encoding
367
417
 
368
418
  For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
369
419
 
370
- ```
420
+ ```shell
371
421
  # Encode with constant bitrate at 96 kbps (default)
372
422
  tonietoolbox input.mp3 --cbr
373
423
 
@@ -375,36 +425,36 @@ tonietoolbox input.mp3 --cbr
375
425
  tonietoolbox input.mp3 --cbr --bitrate 128
376
426
  ```
377
427
 
378
- #### Append Tonie tag:
428
+ #### Append Tonie tag
379
429
 
380
430
  You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
381
431
 
382
- ```
432
+ ```shell
383
433
  # Add an 8-character hex tag to filename
384
434
  tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
385
435
 
386
436
  # The output will be named "input-7F8A6B2E.taf"
387
437
  ```
388
438
 
389
- #### Process a complex folder structure:
439
+ #### Process a complex folder structure
390
440
 
391
441
  Process an audiobook series with multiple folders:
392
442
 
393
- ```
394
- tonietoolbox --recursive "\Hörspiele\Die drei Fragezeichen\Folgen"
443
+ ```shell
444
+ tonietoolbox --recursive "C:\Hörspiele\Die drei Fragezeichen\Folgen"
395
445
  ```
396
446
 
397
447
  Process a music collection with nested album folders and save TAF files alongside the source directories:
398
448
 
399
- ```
400
- tonietoolbox --recursive --output-to-source "\Hörspiele\"
449
+ ```shell
450
+ tonietoolbox --recursive --output-to-source "C:\Hörspiele\"
401
451
  ```
402
452
 
403
- #### Automatic dependency download:
453
+ #### Automatic dependency download
404
454
 
405
455
  If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
406
456
 
407
- ```
457
+ ```shell
408
458
  # Automatically download dependencies when needed
409
459
  tonietoolbox input.mp3 --auto-download
410
460
 
@@ -412,36 +462,38 @@ tonietoolbox input.mp3 --auto-download
412
462
  tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
413
463
  ```
414
464
 
415
- #### Keep temporary files:
465
+ #### Keep temporary files
416
466
 
417
467
  When troubleshooting or debugging, you can keep the temporary opus files:
418
468
 
419
- ```
469
+ ```shell
420
470
  # Keep temporary opus files in the temp folder
421
471
  tonietoolbox input.mp3 --keep-temp
422
472
 
423
473
  ```
424
474
 
425
- #### Working with list files:
475
+ #### Working with list files
426
476
 
427
477
  Create a text file (.lst) with paths to audio files for batch processing:
428
478
 
429
- ```
479
+ ```text
430
480
  # Contents of playlist.lst:
431
481
  C:\Music\song1.mp3
432
482
  "C:\Music\song2.flac"
433
483
  C:\Music\song3.wav
434
484
  "C:\Music Path With Spaces\song2.flac"
485
+ ```
435
486
 
487
+ ```shell
436
488
  # Process the list file
437
489
  tonietoolbox playlist.lst my_playlist.taf
438
490
  ```
439
491
 
440
- #### TeddyCloud advanced options:
492
+ #### TeddyCloud advanced options
441
493
 
442
494
  Customize your TeddyCloud uploads with connection options:
443
495
 
444
- ```
496
+ ```shell
445
497
  # Upload with custom timeouts and retry parameters
446
498
  tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
447
499
 
@@ -452,19 +504,19 @@ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progres
452
504
  tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
453
505
  ```
454
506
 
455
- #### Get available tags from TeddyCloud:
507
+ #### Get available tags from TeddyCloud
456
508
 
457
509
  To see which tags you can use with your TeddyCloud server:
458
510
 
459
- ```
511
+ ```shell
460
512
  tonietoolbox --get-tags https://teddycloud.example.com
461
513
  ```
462
514
 
463
- #### Version checking and updates:
515
+ #### Version checking and updates
464
516
 
465
517
  TonieToolbox can check for newer versions and notify you when there are updates available:
466
518
 
467
- ```
519
+ ```shell
468
520
  # Skip checking for updates if you're offline or want faster startup
469
521
  tonietoolbox input.mp3 --skip-update-check
470
522
 
@@ -475,29 +527,29 @@ tonietoolbox input.mp3 --force-refresh-cache
475
527
  tonietoolbox --clear-version-cache
476
528
  ```
477
529
 
478
- #### Legacy tag options:
530
+ #### Legacy tag options
479
531
 
480
532
  Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
481
533
 
482
- ```
534
+ ```shell
483
535
  tonietoolbox input.mp3 --use-legacy-tags
484
536
  ```
485
537
 
486
- #### Create custom JSON data:
538
+ #### Create custom JSON data
487
539
 
488
540
  When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
489
541
 
490
- ```
542
+ ```shell
491
543
  tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
492
544
  ```
493
545
 
494
546
  This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
495
547
 
496
- #### Logging and Troubleshooting:
548
+ #### Logging and Troubleshooting
497
549
 
498
550
  Control the verbosity of console output with different logging levels:
499
551
 
500
- ```
552
+ ```shell
501
553
  # Enable detailed debug information (useful for troubleshooting)
502
554
  tonietoolbox input.mp3 --debug
503
555
 
@@ -513,7 +565,7 @@ tonietoolbox input.mp3 --silent
513
565
 
514
566
  You can combine logging options with other commands:
515
567
 
516
- ```
568
+ ```shell
517
569
  # Debug mode while splitting a TAF file
518
570
  tonietoolbox --split my_tonie.taf --debug
519
571
 
@@ -521,49 +573,130 @@ tonietoolbox --split my_tonie.taf --debug
521
573
  tonietoolbox --recursive "Music/Collection/" --quiet
522
574
  ```
523
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
+
524
657
  ### Media Tags
525
658
 
526
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.
527
660
 
528
- #### View available tags in audio files:
661
+ #### View available tags in audio files
529
662
 
530
663
  To see what tags are available in your audio files:
531
664
 
532
- ```
665
+ ```shell
533
666
  tonietoolbox --show-tags input.mp3
534
667
  ```
535
668
 
536
669
  This will display all readable tags from the file, which can be useful for creating naming templates.
537
670
 
538
- #### Use media tags for file naming:
671
+ #### Use media tags for file naming
539
672
 
540
673
  To use the metadata from audio files when generating output filenames:
541
674
 
542
- ```
675
+ ```shell
543
676
  tonietoolbox input.mp3 --use-media-tags
544
677
  ```
545
678
 
546
679
  For single files, this will use a default template of "{title} - {artist}" for the output filename.
547
680
 
548
- #### Custom naming templates:
681
+ #### Custom naming templates
549
682
 
550
683
  You can specify custom templates for generating filenames based on the audio metadata:
551
684
 
552
- ```
685
+ ```shell
553
686
  tonietoolbox input.mp3 --use-media-tags --name-template "{artist} - {album} - {title}"
554
687
  ```
555
688
 
556
- #### Recursive processing with media tags:
689
+ #### Recursive processing with media tags
557
690
 
558
691
  When processing folders recursively, media tags can provide more consistent naming:
559
692
 
560
- ```
693
+ ```shell
561
694
  tonietoolbox --recursive --use-media-tags "Music/Collection/"
562
695
  ```
563
696
 
564
697
  This will attempt to use the album information from the audio files for naming the output files:
565
698
 
566
- ```
699
+ ```shell
567
700
  tonietoolbox --recursive --use-media-tags --name-template "{date} - {album} ({artist})" "Music/Collection/"
568
701
  ```
569
702
 
@@ -571,56 +704,59 @@ tonietoolbox --recursive --use-media-tags --name-template "{date} - {album} ({ar
571
704
 
572
705
  TonieToolbox can upload files directly to a TeddyCloud server, which is an alternative to the official Tonie cloud for managing custom Tonies.
573
706
 
574
- #### Upload a Tonie file to TeddyCloud:
707
+ #### Upload a Tonie file to TeddyCloud
575
708
 
576
- ```
709
+ ```shell
577
710
  tonietoolbox --upload https://teddycloud.example.com my_tonie.taf
578
711
  ```
579
712
 
580
713
  This will upload the specified Tonie file to the TeddyCloud server.
581
714
 
582
- #### Upload a newly created Tonie file:
715
+ #### Upload a newly created Tonie file
583
716
 
584
717
  You can combine conversion and upload in a single command:
585
718
 
586
- ```
719
+ ```shell
587
720
  tonietoolbox input.mp3 --upload https://teddycloud.example.com
588
721
  ```
589
722
 
590
723
  This will convert the input file to TAF format and then upload it to the TeddyCloud server.
591
724
 
592
- #### Upload with custom path:
725
+ #### Upload with custom path
593
726
 
594
- ```
727
+ ```shell
595
728
  tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --path "/custom_audio"
596
- The path needs to be existing in the TeddyCloud Library.
729
+ # The path must already exist in the TeddyCloud Library.
597
730
  ```
598
731
 
599
- #### Upload with artwork:
732
+ #### Upload with artwork
733
+
734
+ > **Note:** This function will only work if the `/custom_img` folder is mounted in the TeddyCloud Library. For an easy start and to handle this automatically (and much more), use [TeddyCloudStarter](https://github.com/Quentendo64/TeddyCloudStarter).
600
735
 
601
736
  TonieToolbox can automatically find and upload cover artwork alongside your Tonie files:
602
737
 
603
- ```
738
+ ```shell
604
739
  tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --include-artwork
605
740
  ```
606
741
 
607
742
  This will:
743
+
608
744
  1. Look for cover images (like "cover.jpg", "artwork.png", etc.) in the source directory
609
745
  2. If no cover image is found, attempt to extract embedded artwork from the audio files
610
746
  3. Upload the artwork to the "/custom_img" directory on the TeddyCloud server
611
747
  4. The artwork will be uploaded with the same filename as the Tonie file for easier association
612
748
 
613
- #### Recursive processing with uploads:
749
+ #### Recursive processing with uploads
614
750
 
615
- ```
751
+ ```shell
616
752
  tonietoolbox --recursive "Music/Albums" --upload https://teddycloud.example.com --include-artwork
617
753
  ```
618
754
 
619
755
  This will process all folders recursively, create TAF files, and upload both the TAF files and their cover artwork to the TeddyCloud server.
620
756
 
621
- #### Upload with SSL certificate verification disabled:
757
+ #### Upload with SSL certificate verification disabled
622
758
 
623
- ```
759
+ ```shell
624
760
  tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-verify
625
761
  ```
626
762
 
@@ -632,11 +768,12 @@ Use this option if the TeddyCloud server uses a self-signed certificate.
632
768
 
633
769
  To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
634
770
 
635
- ```
636
- 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"
771
+ ```shell
772
+ 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"
637
773
  ```
638
774
 
639
775
  This command will:
776
+
640
777
  1. Recursively process the Die Drei Fragezeichen audioplays directory
641
778
  2. Use a naming template based on source metadata
642
779
  3. Encode at 128 kbps
@@ -646,23 +783,23 @@ This command will:
646
783
 
647
784
  For a custom children's story collection with chapters:
648
785
 
649
- ```
786
+ ```shell
650
787
  tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
651
788
  ```
652
789
 
653
790
  This command:
791
+
654
792
  1. Processes a list of story audio files
655
793
  2. Names the output based on metadata
656
794
  3. Uses constant bitrate encoding for consistent quality
657
795
  4. Automatically downloads dependencies if needed
658
796
  5. Shows detailed debug information during the process
659
797
 
660
-
661
798
  ### Advanced Media Tag Usage
662
799
 
663
800
  For complex media tag processing:
664
801
 
665
- ```
802
+ ```shell
666
803
  # First check available tags
667
804
  tonietoolbox --show-tags "C:\Music\Classical\Bach"
668
805
 
@@ -670,96 +807,39 @@ tonietoolbox --show-tags "C:\Music\Classical\Bach"
670
807
  tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
671
808
  ```
672
809
 
673
- The first command shows what tags are available, allowing you to create precise naming templates for classical music collections as example.
810
+ The first command shows what tags are available, allowing you to create precise naming templates for classical music collections.
674
811
 
675
812
  ## Technical Details
676
-
677
- ### TAF (Tonie Audio Format) File Structure
678
-
679
- The Tonie Audio Format (TAF) consists of several parts:
680
-
681
- #### 1. Tonie Header (0x1000 bytes)
682
-
683
- Located at the beginning of the file, structured as:
684
-
685
- - A 4-byte big-endian integer specifying the header length
686
- - A Protocol Buffer encoded header (defined in `tonie_header.proto`)
687
- - Padding to fill the entire 4096 bytes (0x1000)
688
-
689
- The Protocol Buffer structure contains:
690
- ```protobuf
691
- message TonieHeader {
692
- bytes dataHash = 1; // SHA1 hash of the audio data
693
- uint32 dataLength = 2; // Length of the audio data in bytes
694
- uint32 timestamp = 3; // Unix timestamp (also used as bitstream serial number)
695
- repeated uint32 chapterPages = 4 [packed=true]; // Page numbers for chapter starts
696
- bytes padding = 5; // Padding to fill up the header
697
- }
698
- ```
699
-
700
- #### 2. Audio Data
701
-
702
- The audio data consists of:
703
- - Opus encoded audio in Ogg container format
704
- - Every page after the header has a fixed size of 4096 bytes (0x1000)
705
- - First page contains the Opus identification header
706
- - Second page contains the Opus comments/tags
707
- - Remaining pages contain the actual audio data
708
- - All pages use the same bitstream serial number (timestamp from header)
709
-
710
- #### 3. Special Requirements
711
-
712
- For optimal compatibility with Tonie boxes:
713
- - Audio must be stereo (2 channels)
714
- - Sample rate must be 48 kHz
715
- - Pages must be aligned to 4096 byte boundaries
716
- - Bitrate of 96 kbps VBR is recommended
717
-
718
- ### File Analysis
719
-
720
- When using the `--info` flag, TonieToolbox checks and displays detailed information about a .TAF (Tonie Audio File):
721
-
722
- - SHA1 hash validation
723
- - Timestamp/bitstream serial consistency
724
- - Opus data length verification
725
- - Opus header validation (version, channels, sample rate)
726
- - Page alignment and size validation
727
- - Total runtime
728
- - Track listing with durations
729
-
730
- ### File Comparison
731
-
732
- When using the `--compare` flag, TonieToolbox provides a detailed comparison of two .TAF files:
733
-
734
- - File size comparison
735
- - Header size verification
736
- - Timestamp comparison
737
- - Data length validation
738
- - SHA1 hash verification
739
- - Chapter page structure analysis
740
- - OGG page-by-page comparison (with `--detailed-compare` flag)
741
-
742
- This is particularly useful for debugging when creating TAF files with different tools or parameters.
813
+ [Moved to TECHNICAL.md](TECHNICAL.md)
743
814
 
744
815
  ## Related Projects
745
816
 
746
817
  This project is inspired by and builds upon the work of other Tonie-related open source projects:
747
818
 
748
819
  - [opus2tonie](https://github.com/bailli/opus2tonie) - A command line utility to convert opus files to the Tonie audio format
749
- - [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud) - Self-hosted alternative to the Tonie cloud for managing custom Tonies
750
-
751
- ## Contributing
820
+ - [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud) - Self-hosted alternative to the Tonie cloud / Boxine cloud for managing custom content
821
+ - [TeddyCloudStarter](https://github.com/Quentendo64/TeddyCloudStarter) - A Wizard for Docker-based deployment of [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud)
752
822
 
753
- Contributions are welcome! Please feel free to submit a Pull Request.
754
823
 
755
824
  ## Legal Notice
756
825
 
757
826
  This project is an independent, community-driven effort created for educational and personal use purposes.
758
827
 
759
- - tonies®, toniebox®, Hörfigur® are registered trademarks of [tonies GmbH](https://tonies.com).
828
+ - tonies®, toniebox®, and Hörfigur® are registered trademarks of [tonies GmbH](https://tonies.com).
760
829
  - This project is not affiliated with, endorsed by, or connected to tonies GmbH in any way.
761
830
  - TonieToolbox is provided "as is" without warranty of any kind, either express or implied.
762
831
  - Users are responsible for ensuring their usage complies with all applicable copyright and intellectual property laws.
763
832
  - This tool is intended for personal use with legally owned content only.
764
833
 
765
834
  By using TonieToolbox, you acknowledge that the authors of this software take no responsibility for any potential misuse or any damages that might result from the use of this software.
835
+
836
+ ## Support
837
+
838
+ If you need help, have questions, or want to report a bug, please use the following channels:
839
+
840
+ - [GitHub Issues](https://github.com/Quentendo64/TonieToolbox/issues) for bug reports and feature requests
841
+ - [GitHub Discussions](https://github.com/Quentendo64/TonieToolbox/discussions) for general questions and community support
842
+ - [HOWTO Guide](HOWTO.md) for common usage instructions
843
+
844
+ ## Attribution
845
+ [Parrot Icon created by Freepik - Flaticon](https://www.flaticon.com/free-animated-icons/parrot)