TonieToolbox 0.4.2__py3-none-any.whl → 0.5.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.
- TonieToolbox/__init__.py +1 -1
- TonieToolbox/__main__.py +269 -349
- TonieToolbox/artwork.py +105 -0
- TonieToolbox/audio_conversion.py +48 -5
- TonieToolbox/media_tags.py +5 -4
- TonieToolbox/recursive_processor.py +24 -19
- TonieToolbox/tags.py +74 -0
- TonieToolbox/teddycloud.py +250 -593
- TonieToolbox/tonie_analysis.py +173 -13
- TonieToolbox/tonie_file.py +17 -29
- TonieToolbox/tonies_json.py +1036 -170
- TonieToolbox/version_handler.py +26 -22
- {tonietoolbox-0.4.2.dist-info → tonietoolbox-0.5.0.dist-info}/METADATA +147 -99
- tonietoolbox-0.5.0.dist-info/RECORD +26 -0
- {tonietoolbox-0.4.2.dist-info → tonietoolbox-0.5.0.dist-info}/WHEEL +1 -1
- tonietoolbox-0.4.2.dist-info/RECORD +0 -24
- {tonietoolbox-0.4.2.dist-info → tonietoolbox-0.5.0.dist-info}/entry_points.txt +0 -0
- {tonietoolbox-0.4.2.dist-info → tonietoolbox-0.5.0.dist-info}/licenses/LICENSE.md +0 -0
- {tonietoolbox-0.4.2.dist-info → tonietoolbox-0.5.0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: TonieToolbox
|
3
|
-
Version: 0.
|
4
|
-
Summary:
|
3
|
+
Version: 0.5.0
|
4
|
+
Summary: Create files for the Tonie box and interact with TeddyCloud servers
|
5
5
|
Home-page: https://github.com/Quentendo64/TonieToolbox
|
6
6
|
Author: Quentendo64
|
7
7
|
Author-email: Quentendo64 <quentin@wohlfeil.at>
|
@@ -20,20 +20,33 @@ 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: requests>=2.32.3
|
23
24
|
Requires-Dist: mutagen>=1.47.0
|
25
|
+
Requires-Dist: packaging>=25.0
|
26
|
+
Provides-Extra: test
|
27
|
+
Requires-Dist: pytest>=8.3.5; extra == "test"
|
28
|
+
Requires-Dist: pytest-cov>=6.1.1; extra == "test"
|
24
29
|
Dynamic: author
|
25
30
|
Dynamic: home-page
|
26
31
|
Dynamic: license-file
|
27
32
|
Dynamic: requires-python
|
28
33
|
|
29
|
-
# TonieToolbox
|
30
|
-
### WIP - Work in Progress
|
31
|
-
Happy Testing :-P
|
34
|
+
# TonieToolbox 🎵📦
|
32
35
|
|
33
|
-
|
36
|
+
[](https://github.com/Quentendo64/TonieToolbox/actions)
|
37
|
+
[](https://github.com/Quentendo64/TonieToolbox/actions)
|
34
38
|
|
35
|
-
|
36
|
-
|
39
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
40
|
+
[](https://badge.fury.io/py/tonietoolbox)
|
41
|
+
[](https://www.python.org/downloads/)
|
42
|
+
[](https://hub.docker.com/r/quentendo64/tonietoolbox)
|
43
|
+
|
44
|
+
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)
|
45
|
+
|
46
|
+
## 🚀 Get Started
|
47
|
+
|
48
|
+
→ [HOWTO Guide for Beginners](HOWTO.md)
|
49
|
+
→ [Contributing Guidelines](CONTRIBUTING.md)
|
37
50
|
|
38
51
|
## Table of Contents
|
39
52
|
|
@@ -59,6 +72,7 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
|
|
59
72
|
- [Related Projects](#related-projects)
|
60
73
|
- [Contributing](#contributing)
|
61
74
|
- [Legal Notice](#legal-notice)
|
75
|
+
- [Support](#support)
|
62
76
|
|
63
77
|
## Overview
|
64
78
|
|
@@ -85,14 +99,14 @@ The tool provides several capabilities:
|
|
85
99
|
- opus-tools (specifically `opusenc` for encoding to opus format)
|
86
100
|
- mutagen (for reading audio file metadata, auto-installed when needed)
|
87
101
|
|
88
|
-
Make sure FFmpeg and opus-tools are installed on your system and accessible in your PATH
|
89
|
-
If the requirements are not found in PATH
|
102
|
+
***Make sure FFmpeg and opus-tools are installed on your system and accessible in your PATH.***
|
103
|
+
If the requirements are not found in PATH, TonieToolbox will download the missing requirements with --auto-download.
|
90
104
|
|
91
105
|
## Installation
|
92
106
|
|
93
107
|
### Install from PyPI (Recommended)
|
94
108
|
|
95
|
-
```
|
109
|
+
```shell
|
96
110
|
pip install tonietoolbox
|
97
111
|
```
|
98
112
|
|
@@ -100,7 +114,7 @@ This will install TonieToolbox and its dependencies, making the `tonietoolbox` c
|
|
100
114
|
|
101
115
|
### Install from Source
|
102
116
|
|
103
|
-
```
|
117
|
+
```shell
|
104
118
|
# Clone the repository
|
105
119
|
git clone https://github.com/Quentendo64/TonieToolbox.git
|
106
120
|
cd TonieToolbox
|
@@ -115,7 +129,7 @@ TonieToolbox is available as a Docker image, which comes with all dependencies p
|
|
115
129
|
|
116
130
|
#### Pull the Docker Image
|
117
131
|
|
118
|
-
```
|
132
|
+
```shell
|
119
133
|
# From Docker Hub
|
120
134
|
docker pull quentendo64/tonietoolbox:latest
|
121
135
|
|
@@ -125,13 +139,13 @@ docker pull ghcr.io/quentendo64/tonietoolbox:latest
|
|
125
139
|
|
126
140
|
#### Build the Docker Image Locally
|
127
141
|
|
128
|
-
```
|
142
|
+
```shell
|
129
143
|
docker build -t tonietoolbox .
|
130
144
|
```
|
131
145
|
|
132
146
|
Or using docker-compose:
|
133
147
|
|
134
|
-
```
|
148
|
+
```shell
|
135
149
|
docker-compose build
|
136
150
|
```
|
137
151
|
|
@@ -142,12 +156,14 @@ docker-compose build
|
|
142
156
|
**Convert a single audio file to Tonie format:**
|
143
157
|
|
144
158
|
If installed via pip:
|
145
|
-
|
159
|
+
|
160
|
+
```shell
|
146
161
|
tonietoolbox input.mp3
|
147
162
|
```
|
148
163
|
|
149
164
|
If installed from source:
|
150
|
-
|
165
|
+
|
166
|
+
```shell
|
151
167
|
python TonieToolbox.py input.mp3
|
152
168
|
```
|
153
169
|
|
@@ -155,7 +171,7 @@ This will create a file named `input.taf` in the `.\output` directory.
|
|
155
171
|
|
156
172
|
**Specify output filename:**
|
157
173
|
|
158
|
-
```
|
174
|
+
```shell
|
159
175
|
tonietoolbox input.mp3 my_tonie.taf
|
160
176
|
```
|
161
177
|
|
@@ -165,13 +181,13 @@ This will create a file named `my_tonie.taf` in the `.\output` directory.
|
|
165
181
|
|
166
182
|
You can specify a directory to convert all audio files within it:
|
167
183
|
|
168
|
-
```
|
184
|
+
```shell
|
169
185
|
tonietoolbox input_directory/
|
170
186
|
```
|
171
187
|
|
172
188
|
Or use a list file (.lst) containing paths to multiple audio files:
|
173
189
|
|
174
|
-
```
|
190
|
+
```shell
|
175
191
|
tonietoolbox playlist.lst
|
176
192
|
```
|
177
193
|
|
@@ -179,7 +195,7 @@ tonietoolbox playlist.lst
|
|
179
195
|
|
180
196
|
To process an entire folder structure with multiple audio folders:
|
181
197
|
|
182
|
-
```
|
198
|
+
```shell
|
183
199
|
tonietoolbox --recursive "Music/Albums"
|
184
200
|
```
|
185
201
|
|
@@ -187,7 +203,7 @@ This will scan all subfolders, identify those containing audio files, and create
|
|
187
203
|
|
188
204
|
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:
|
189
205
|
|
190
|
-
```
|
206
|
+
```shell
|
191
207
|
tonietoolbox --recursive --output-to-source "Music/Albums"
|
192
208
|
```
|
193
209
|
|
@@ -197,26 +213,33 @@ Using TonieToolbox with Docker simplifies the setup process as all dependencies
|
|
197
213
|
|
198
214
|
**Convert a single audio file to Tonie format:**
|
199
215
|
|
216
|
+
**On Windows PowerShell/Unix/macOS:**
|
217
|
+
|
200
218
|
```bash
|
201
|
-
# Use docker run
|
202
219
|
docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
|
220
|
+
```
|
203
221
|
|
204
|
-
|
222
|
+
**On Windows (CMD):**
|
223
|
+
|
224
|
+
```cmd
|
225
|
+
docker run --rm -v "%cd%\input:/tonietoolbox/input" -v "%cd%\output:/tonietoolbox/output" quentendo64/tonietoolbox input/my-audio-file.mp3
|
226
|
+
```
|
227
|
+
|
228
|
+
**Or using docker-compose**
|
229
|
+
|
230
|
+
```shell
|
205
231
|
docker-compose run --rm tonietoolbox input/my-audio-file.mp3
|
206
232
|
```
|
207
233
|
|
208
234
|
**Process folders recursively:**
|
209
235
|
|
210
236
|
```bash
|
211
|
-
# Use docker run
|
212
237
|
docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonietoolbox/output" quentendo64/tonietoolbox --recursive input/folder
|
213
|
-
|
214
238
|
```
|
215
239
|
|
216
240
|
**Advanced options with Docker:**
|
217
241
|
|
218
242
|
```bash
|
219
|
-
# Convert with custom settings
|
220
243
|
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
244
|
```
|
222
245
|
|
@@ -230,12 +253,13 @@ docker run --rm -v "$(pwd)/input:/tonietoolbox/input" -v "$(pwd)/output:/tonieto
|
|
230
253
|
|
231
254
|
Run the following command to see all available options:
|
232
255
|
|
233
|
-
```
|
256
|
+
```shell
|
234
257
|
tonietoolbox -h
|
235
258
|
```
|
236
259
|
|
237
260
|
Output:
|
238
|
-
|
261
|
+
|
262
|
+
```shell
|
239
263
|
usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags URL]
|
240
264
|
[--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
|
241
265
|
[--show-progress] [--connection-timeout SECONDS]
|
@@ -294,6 +318,7 @@ optional arguments:
|
|
294
318
|
-C, --compare FILE2 Compare input file with another .taf file for debugging
|
295
319
|
-D, --detailed-compare
|
296
320
|
Show detailed OGG page differences when comparing files
|
321
|
+
--no-mono-conversion Do not convert mono audio to stereo (default: convert mono to stereo)
|
297
322
|
Media Tag Options:
|
298
323
|
-m, --use-media-tags Use media tags from audio files for naming
|
299
324
|
--name-template TEMPLATE
|
@@ -318,51 +343,51 @@ Logging Options:
|
|
318
343
|
|
319
344
|
### Common Usage Examples
|
320
345
|
|
321
|
-
#### Analyze a Tonie file
|
346
|
+
#### Analyze a Tonie file
|
322
347
|
|
323
|
-
```
|
348
|
+
```shell
|
324
349
|
tonietoolbox --info my_tonie.taf
|
325
350
|
```
|
326
351
|
|
327
|
-
#### Split a Tonie file into individual opus tracks
|
352
|
+
#### Split a Tonie file into individual opus tracks
|
328
353
|
|
329
|
-
```
|
354
|
+
```shell
|
330
355
|
tonietoolbox --split my_tonie.taf
|
331
356
|
```
|
332
357
|
|
333
|
-
#### Compare TAF files
|
358
|
+
#### Compare TAF files
|
334
359
|
|
335
360
|
Compare two TAF files for debugging purposes:
|
336
361
|
|
337
|
-
```
|
362
|
+
```shell
|
338
363
|
tonietoolbox file1.taf --compare file2.taf
|
339
364
|
```
|
340
365
|
|
341
366
|
For detailed comparison including OGG page differences:
|
342
367
|
|
343
|
-
```
|
368
|
+
```shell
|
344
369
|
tonietoolbox file1.taf --compare file2.taf --detailed-compare
|
345
370
|
```
|
346
371
|
|
347
|
-
#### Custom timestamp options
|
372
|
+
#### Custom timestamp options
|
348
373
|
|
349
|
-
```
|
374
|
+
```shell
|
350
375
|
tonietoolbox input.mp3 --timestamp 1745078762 # UNIX Timestamp
|
351
376
|
tonietoolbox input.mp3 --timestamp 0x6803C9EA # Bitstream time
|
352
377
|
tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extraction
|
353
378
|
```
|
354
379
|
|
355
|
-
#### Set custom bitrate
|
380
|
+
#### Set custom bitrate
|
356
381
|
|
357
|
-
```
|
382
|
+
```shell
|
358
383
|
tonietoolbox input.mp3 --bitrate 128
|
359
384
|
```
|
360
385
|
|
361
|
-
#### Constant bitrate encoding
|
386
|
+
#### Constant bitrate encoding
|
362
387
|
|
363
388
|
For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
|
364
389
|
|
365
|
-
```
|
390
|
+
```shell
|
366
391
|
# Encode with constant bitrate at 96 kbps (default)
|
367
392
|
tonietoolbox input.mp3 --cbr
|
368
393
|
|
@@ -370,36 +395,36 @@ tonietoolbox input.mp3 --cbr
|
|
370
395
|
tonietoolbox input.mp3 --cbr --bitrate 128
|
371
396
|
```
|
372
397
|
|
373
|
-
#### Append Tonie tag
|
398
|
+
#### Append Tonie tag
|
374
399
|
|
375
400
|
You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
|
376
401
|
|
377
|
-
```
|
402
|
+
```shell
|
378
403
|
# Add an 8-character hex tag to filename
|
379
404
|
tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
|
380
405
|
|
381
406
|
# The output will be named "input-7F8A6B2E.taf"
|
382
407
|
```
|
383
408
|
|
384
|
-
#### Process a complex folder structure
|
409
|
+
#### Process a complex folder structure
|
385
410
|
|
386
411
|
Process an audiobook series with multiple folders:
|
387
412
|
|
388
|
-
```
|
389
|
-
tonietoolbox --recursive "
|
413
|
+
```shell
|
414
|
+
tonietoolbox --recursive "C:\Hörspiele\Die drei Fragezeichen\Folgen"
|
390
415
|
```
|
391
416
|
|
392
417
|
Process a music collection with nested album folders and save TAF files alongside the source directories:
|
393
418
|
|
394
|
-
```
|
395
|
-
tonietoolbox --recursive --output-to-source "
|
419
|
+
```shell
|
420
|
+
tonietoolbox --recursive --output-to-source "C:\Hörspiele\"
|
396
421
|
```
|
397
422
|
|
398
|
-
#### Automatic dependency download
|
423
|
+
#### Automatic dependency download
|
399
424
|
|
400
425
|
If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
|
401
426
|
|
402
|
-
```
|
427
|
+
```shell
|
403
428
|
# Automatically download dependencies when needed
|
404
429
|
tonietoolbox input.mp3 --auto-download
|
405
430
|
|
@@ -407,36 +432,38 @@ tonietoolbox input.mp3 --auto-download
|
|
407
432
|
tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
|
408
433
|
```
|
409
434
|
|
410
|
-
#### Keep temporary files
|
435
|
+
#### Keep temporary files
|
411
436
|
|
412
437
|
When troubleshooting or debugging, you can keep the temporary opus files:
|
413
438
|
|
414
|
-
```
|
439
|
+
```shell
|
415
440
|
# Keep temporary opus files in the temp folder
|
416
441
|
tonietoolbox input.mp3 --keep-temp
|
417
442
|
|
418
443
|
```
|
419
444
|
|
420
|
-
#### Working with list files
|
445
|
+
#### Working with list files
|
421
446
|
|
422
447
|
Create a text file (.lst) with paths to audio files for batch processing:
|
423
448
|
|
424
|
-
```
|
449
|
+
```text
|
425
450
|
# Contents of playlist.lst:
|
426
451
|
C:\Music\song1.mp3
|
427
452
|
"C:\Music\song2.flac"
|
428
453
|
C:\Music\song3.wav
|
429
454
|
"C:\Music Path With Spaces\song2.flac"
|
455
|
+
```
|
430
456
|
|
457
|
+
```shell
|
431
458
|
# Process the list file
|
432
459
|
tonietoolbox playlist.lst my_playlist.taf
|
433
460
|
```
|
434
461
|
|
435
|
-
#### TeddyCloud advanced options
|
462
|
+
#### TeddyCloud advanced options
|
436
463
|
|
437
464
|
Customize your TeddyCloud uploads with connection options:
|
438
465
|
|
439
|
-
```
|
466
|
+
```shell
|
440
467
|
# Upload with custom timeouts and retry parameters
|
441
468
|
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
|
442
469
|
|
@@ -447,19 +474,19 @@ tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progres
|
|
447
474
|
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
|
448
475
|
```
|
449
476
|
|
450
|
-
#### Get available tags from TeddyCloud
|
477
|
+
#### Get available tags from TeddyCloud
|
451
478
|
|
452
479
|
To see which tags you can use with your TeddyCloud server:
|
453
480
|
|
454
|
-
```
|
481
|
+
```shell
|
455
482
|
tonietoolbox --get-tags https://teddycloud.example.com
|
456
483
|
```
|
457
484
|
|
458
|
-
#### Version checking and updates
|
485
|
+
#### Version checking and updates
|
459
486
|
|
460
487
|
TonieToolbox can check for newer versions and notify you when there are updates available:
|
461
488
|
|
462
|
-
```
|
489
|
+
```shell
|
463
490
|
# Skip checking for updates if you're offline or want faster startup
|
464
491
|
tonietoolbox input.mp3 --skip-update-check
|
465
492
|
|
@@ -470,29 +497,29 @@ tonietoolbox input.mp3 --force-refresh-cache
|
|
470
497
|
tonietoolbox --clear-version-cache
|
471
498
|
```
|
472
499
|
|
473
|
-
#### Legacy tag options
|
500
|
+
#### Legacy tag options
|
474
501
|
|
475
502
|
Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
|
476
503
|
|
477
|
-
```
|
504
|
+
```shell
|
478
505
|
tonietoolbox input.mp3 --use-legacy-tags
|
479
506
|
```
|
480
507
|
|
481
|
-
#### Create custom JSON data
|
508
|
+
#### Create custom JSON data
|
482
509
|
|
483
510
|
When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
|
484
511
|
|
485
|
-
```
|
512
|
+
```shell
|
486
513
|
tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
|
487
514
|
```
|
488
515
|
|
489
516
|
This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
|
490
517
|
|
491
|
-
#### Logging and Troubleshooting
|
518
|
+
#### Logging and Troubleshooting
|
492
519
|
|
493
520
|
Control the verbosity of console output with different logging levels:
|
494
521
|
|
495
|
-
```
|
522
|
+
```shell
|
496
523
|
# Enable detailed debug information (useful for troubleshooting)
|
497
524
|
tonietoolbox input.mp3 --debug
|
498
525
|
|
@@ -508,7 +535,7 @@ tonietoolbox input.mp3 --silent
|
|
508
535
|
|
509
536
|
You can combine logging options with other commands:
|
510
537
|
|
511
|
-
```
|
538
|
+
```shell
|
512
539
|
# Debug mode while splitting a TAF file
|
513
540
|
tonietoolbox --split my_tonie.taf --debug
|
514
541
|
|
@@ -520,45 +547,45 @@ tonietoolbox --recursive "Music/Collection/" --quiet
|
|
520
547
|
|
521
548
|
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.
|
522
549
|
|
523
|
-
#### View available tags in audio files
|
550
|
+
#### View available tags in audio files
|
524
551
|
|
525
552
|
To see what tags are available in your audio files:
|
526
553
|
|
527
|
-
```
|
554
|
+
```shell
|
528
555
|
tonietoolbox --show-tags input.mp3
|
529
556
|
```
|
530
557
|
|
531
558
|
This will display all readable tags from the file, which can be useful for creating naming templates.
|
532
559
|
|
533
|
-
#### Use media tags for file naming
|
560
|
+
#### Use media tags for file naming
|
534
561
|
|
535
562
|
To use the metadata from audio files when generating output filenames:
|
536
563
|
|
537
|
-
```
|
564
|
+
```shell
|
538
565
|
tonietoolbox input.mp3 --use-media-tags
|
539
566
|
```
|
540
567
|
|
541
568
|
For single files, this will use a default template of "{title} - {artist}" for the output filename.
|
542
569
|
|
543
|
-
#### Custom naming templates
|
570
|
+
#### Custom naming templates
|
544
571
|
|
545
572
|
You can specify custom templates for generating filenames based on the audio metadata:
|
546
573
|
|
547
|
-
```
|
574
|
+
```shell
|
548
575
|
tonietoolbox input.mp3 --use-media-tags --name-template "{artist} - {album} - {title}"
|
549
576
|
```
|
550
577
|
|
551
|
-
#### Recursive processing with media tags
|
578
|
+
#### Recursive processing with media tags
|
552
579
|
|
553
580
|
When processing folders recursively, media tags can provide more consistent naming:
|
554
581
|
|
555
|
-
```
|
582
|
+
```shell
|
556
583
|
tonietoolbox --recursive --use-media-tags "Music/Collection/"
|
557
584
|
```
|
558
585
|
|
559
586
|
This will attempt to use the album information from the audio files for naming the output files:
|
560
587
|
|
561
|
-
```
|
588
|
+
```shell
|
562
589
|
tonietoolbox --recursive --use-media-tags --name-template "{date} - {album} ({artist})" "Music/Collection/"
|
563
590
|
```
|
564
591
|
|
@@ -566,56 +593,59 @@ tonietoolbox --recursive --use-media-tags --name-template "{date} - {album} ({ar
|
|
566
593
|
|
567
594
|
TonieToolbox can upload files directly to a TeddyCloud server, which is an alternative to the official Tonie cloud for managing custom Tonies.
|
568
595
|
|
569
|
-
#### Upload a Tonie file to TeddyCloud
|
596
|
+
#### Upload a Tonie file to TeddyCloud
|
570
597
|
|
571
|
-
```
|
598
|
+
```shell
|
572
599
|
tonietoolbox --upload https://teddycloud.example.com my_tonie.taf
|
573
600
|
```
|
574
601
|
|
575
602
|
This will upload the specified Tonie file to the TeddyCloud server.
|
576
603
|
|
577
|
-
#### Upload a newly created Tonie file
|
604
|
+
#### Upload a newly created Tonie file
|
578
605
|
|
579
606
|
You can combine conversion and upload in a single command:
|
580
607
|
|
581
|
-
```
|
608
|
+
```shell
|
582
609
|
tonietoolbox input.mp3 --upload https://teddycloud.example.com
|
583
610
|
```
|
584
611
|
|
585
612
|
This will convert the input file to TAF format and then upload it to the TeddyCloud server.
|
586
613
|
|
587
|
-
#### Upload with custom path
|
614
|
+
#### Upload with custom path
|
588
615
|
|
589
|
-
```
|
616
|
+
```shell
|
590
617
|
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --path "/custom_audio"
|
591
|
-
The path
|
618
|
+
# The path must already exist in the TeddyCloud Library.
|
592
619
|
```
|
593
620
|
|
594
|
-
#### Upload with artwork
|
621
|
+
#### Upload with artwork
|
622
|
+
|
623
|
+
> **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).
|
595
624
|
|
596
625
|
TonieToolbox can automatically find and upload cover artwork alongside your Tonie files:
|
597
626
|
|
598
|
-
```
|
627
|
+
```shell
|
599
628
|
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --include-artwork
|
600
629
|
```
|
601
630
|
|
602
631
|
This will:
|
632
|
+
|
603
633
|
1. Look for cover images (like "cover.jpg", "artwork.png", etc.) in the source directory
|
604
634
|
2. If no cover image is found, attempt to extract embedded artwork from the audio files
|
605
635
|
3. Upload the artwork to the "/custom_img" directory on the TeddyCloud server
|
606
636
|
4. The artwork will be uploaded with the same filename as the Tonie file for easier association
|
607
637
|
|
608
|
-
#### Recursive processing with uploads
|
638
|
+
#### Recursive processing with uploads
|
609
639
|
|
610
|
-
```
|
640
|
+
```shell
|
611
641
|
tonietoolbox --recursive "Music/Albums" --upload https://teddycloud.example.com --include-artwork
|
612
642
|
```
|
613
643
|
|
614
644
|
This will process all folders recursively, create TAF files, and upload both the TAF files and their cover artwork to the TeddyCloud server.
|
615
645
|
|
616
|
-
#### Upload with SSL certificate verification disabled
|
646
|
+
#### Upload with SSL certificate verification disabled
|
617
647
|
|
618
|
-
```
|
648
|
+
```shell
|
619
649
|
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-verify
|
620
650
|
```
|
621
651
|
|
@@ -627,11 +657,12 @@ Use this option if the TeddyCloud server uses a self-signed certificate.
|
|
627
657
|
|
628
658
|
To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
|
629
659
|
|
630
|
-
```
|
631
|
-
tonietoolbox --recursive --use-media-tags --name-template "{
|
660
|
+
```shell
|
661
|
+
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
662
|
```
|
633
663
|
|
634
664
|
This command will:
|
665
|
+
|
635
666
|
1. Recursively process the Die Drei Fragezeichen audioplays directory
|
636
667
|
2. Use a naming template based on source metadata
|
637
668
|
3. Encode at 128 kbps
|
@@ -641,23 +672,23 @@ This command will:
|
|
641
672
|
|
642
673
|
For a custom children's story collection with chapters:
|
643
674
|
|
644
|
-
```
|
675
|
+
```shell
|
645
676
|
tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
|
646
677
|
```
|
647
678
|
|
648
679
|
This command:
|
680
|
+
|
649
681
|
1. Processes a list of story audio files
|
650
682
|
2. Names the output based on metadata
|
651
683
|
3. Uses constant bitrate encoding for consistent quality
|
652
684
|
4. Automatically downloads dependencies if needed
|
653
685
|
5. Shows detailed debug information during the process
|
654
686
|
|
655
|
-
|
656
687
|
### Advanced Media Tag Usage
|
657
688
|
|
658
689
|
For complex media tag processing:
|
659
690
|
|
660
|
-
```
|
691
|
+
```shell
|
661
692
|
# First check available tags
|
662
693
|
tonietoolbox --show-tags "C:\Music\Classical\Bach"
|
663
694
|
|
@@ -665,7 +696,7 @@ tonietoolbox --show-tags "C:\Music\Classical\Bach"
|
|
665
696
|
tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
|
666
697
|
```
|
667
698
|
|
668
|
-
The first command shows what tags are available, allowing you to create precise naming templates for classical music collections
|
699
|
+
The first command shows what tags are available, allowing you to create precise naming templates for classical music collections.
|
669
700
|
|
670
701
|
## Technical Details
|
671
702
|
|
@@ -682,6 +713,7 @@ Located at the beginning of the file, structured as:
|
|
682
713
|
- Padding to fill the entire 4096 bytes (0x1000)
|
683
714
|
|
684
715
|
The Protocol Buffer structure contains:
|
716
|
+
|
685
717
|
```protobuf
|
686
718
|
message TonieHeader {
|
687
719
|
bytes dataHash = 1; // SHA1 hash of the audio data
|
@@ -695,6 +727,7 @@ message TonieHeader {
|
|
695
727
|
#### 2. Audio Data
|
696
728
|
|
697
729
|
The audio data consists of:
|
730
|
+
|
698
731
|
- Opus encoded audio in Ogg container format
|
699
732
|
- Every page after the header has a fixed size of 4096 bytes (0x1000)
|
700
733
|
- First page contains the Opus identification header
|
@@ -705,11 +738,17 @@ The audio data consists of:
|
|
705
738
|
#### 3. Special Requirements
|
706
739
|
|
707
740
|
For optimal compatibility with Tonie boxes:
|
708
|
-
|
741
|
+
|
742
|
+
- Audio should be stereo (2 channels)
|
709
743
|
- Sample rate must be 48 kHz
|
710
744
|
- Pages must be aligned to 4096 byte boundaries
|
711
745
|
- Bitrate of 96 kbps VBR is recommended
|
712
746
|
|
747
|
+
**Mono audio handling:**
|
748
|
+
|
749
|
+
- By default, TonieToolbox will automatically convert mono audio files to stereo for compatibility.
|
750
|
+
- To disable this behavior (and require your input to already be stereo), use the `--no-mono-conversion` flag.
|
751
|
+
|
713
752
|
### File Analysis
|
714
753
|
|
715
754
|
When using the `--info` flag, TonieToolbox checks and displays detailed information about a .TAF (Tonie Audio File):
|
@@ -741,7 +780,8 @@ This is particularly useful for debugging when creating TAF files with different
|
|
741
780
|
This project is inspired by and builds upon the work of other Tonie-related open source projects:
|
742
781
|
|
743
782
|
- [opus2tonie](https://github.com/bailli/opus2tonie) - A command line utility to convert opus files to the Tonie audio format
|
744
|
-
- [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud) - Self-hosted alternative to the Tonie cloud for managing custom
|
783
|
+
- [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud) - Self-hosted alternative to the Tonie cloud / Boxine cloud for managing custom content
|
784
|
+
- [TeddyCloudStarter](https://github.com/Quentendo64/TeddyCloudStarter) - A Wizard for Docker-based deployment of [teddycloud](https://github.com/toniebox-reverse-engineering/teddycloud)
|
745
785
|
|
746
786
|
## Contributing
|
747
787
|
|
@@ -751,10 +791,18 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
751
791
|
|
752
792
|
This project is an independent, community-driven effort created for educational and personal use purposes.
|
753
793
|
|
754
|
-
- tonies®, toniebox®, Hörfigur® are registered trademarks of [tonies GmbH](https://tonies.com).
|
794
|
+
- tonies®, toniebox®, and Hörfigur® are registered trademarks of [tonies GmbH](https://tonies.com).
|
755
795
|
- This project is not affiliated with, endorsed by, or connected to tonies GmbH in any way.
|
756
796
|
- TonieToolbox is provided "as is" without warranty of any kind, either express or implied.
|
757
797
|
- Users are responsible for ensuring their usage complies with all applicable copyright and intellectual property laws.
|
758
798
|
- This tool is intended for personal use with legally owned content only.
|
759
799
|
|
760
800
|
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.
|
801
|
+
|
802
|
+
## Support
|
803
|
+
|
804
|
+
If you need help, have questions, or want to report a bug, please use the following channels:
|
805
|
+
|
806
|
+
- [GitHub Issues](https://github.com/Quentendo64/TonieToolbox/issues) for bug reports and feature requests
|
807
|
+
- [GitHub Discussions](https://github.com/Quentendo64/TonieToolbox/discussions) for general questions and community support
|
808
|
+
- [HOWTO Guide](HOWTO.md) for common usage instructions
|