TonieToolbox 0.2.3__tar.gz → 0.4.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.
- {tonietoolbox-0.2.3/TonieToolbox.egg-info → tonietoolbox-0.4.0}/PKG-INFO +296 -6
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/README.md +296 -6
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/__init__.py +1 -1
- tonietoolbox-0.4.0/TonieToolbox/__main__.py +680 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/audio_conversion.py +36 -14
- tonietoolbox-0.4.0/TonieToolbox/constants.py +90 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/dependency_manager.py +5 -5
- tonietoolbox-0.4.0/TonieToolbox/logger.py +103 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/media_tags.py +189 -7
- tonietoolbox-0.4.0/TonieToolbox/teddycloud.py +679 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/tonie_file.py +32 -12
- tonietoolbox-0.4.0/TonieToolbox/tonies_json.py +502 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0/TonieToolbox.egg-info}/PKG-INFO +296 -6
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox.egg-info/SOURCES.txt +2 -0
- tonietoolbox-0.2.3/TonieToolbox/__main__.py +0 -336
- tonietoolbox-0.2.3/TonieToolbox/constants.py +0 -15
- tonietoolbox-0.2.3/TonieToolbox/logger.py +0 -57
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/LICENSE.md +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/MANIFEST.in +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/filename_generator.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/ogg_page.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/opus_packet.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/recursive_processor.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/tonie_analysis.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/tonie_header.proto +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/tonie_header_pb2.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox/version_handler.py +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox.egg-info/dependency_links.txt +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox.egg-info/entry_points.txt +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox.egg-info/requires.txt +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/TonieToolbox.egg-info/top_level.txt +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/pyproject.toml +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/setup.cfg +0 -0
- {tonietoolbox-0.2.3 → tonietoolbox-0.4.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: TonieToolbox
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: Convert audio files to Tonie box compatible format
|
5
5
|
Home-page: https://github.com/Quentendo64/TonieToolbox
|
6
6
|
Author: Quentendo64
|
@@ -47,12 +47,15 @@ A Python tool for converting audio files to Tonie box compatible format (TAF - T
|
|
47
47
|
- [Advanced Options](#advanced-options)
|
48
48
|
- [Common Usage Examples](#common-usage-examples)
|
49
49
|
- [Media Tags](#media-tags)
|
50
|
+
- [TeddyCloud Upload](#teddycloud-upload)
|
51
|
+
- [Real-World Use Cases](#real-world-use-cases)
|
50
52
|
- [Technical Details](#technical-details)
|
51
53
|
- [TAF File Structure](#taf-tonie-audio-format-file-structure)
|
52
54
|
- [File Analysis](#file-analysis)
|
53
55
|
- [File Comparison](#file-comparison)
|
54
56
|
- [Related Projects](#related-projects)
|
55
57
|
- [Contributing](#contributing)
|
58
|
+
- [Legal Notice](#legal-notice)
|
56
59
|
|
57
60
|
## Overview
|
58
61
|
|
@@ -69,6 +72,8 @@ The tool provides several capabilities:
|
|
69
72
|
- Compare two TAF files for debugging differences
|
70
73
|
- Support various input formats through FFmpeg conversion
|
71
74
|
- Extract and use audio media tags (ID3, Vorbis Comments, etc.) for better file naming
|
75
|
+
- Upload Tonie files directly to a TeddyCloud server
|
76
|
+
- Automatically upload cover artwork alongside Tonie files
|
72
77
|
|
73
78
|
## Requirements
|
74
79
|
|
@@ -167,10 +172,14 @@ tonietoolbox -h
|
|
167
172
|
|
168
173
|
Output:
|
169
174
|
```
|
170
|
-
usage: TonieToolbox.py [-h] [-v] [
|
171
|
-
[-
|
172
|
-
[-
|
173
|
-
[--
|
175
|
+
usage: TonieToolbox.py [-h] [-v] [--upload URL] [--include-artwork] [--get-tags URL]
|
176
|
+
[--ignore-ssl-verify] [--special-folder FOLDER] [--path PATH]
|
177
|
+
[--show-progress] [--connection-timeout SECONDS]
|
178
|
+
[--read-timeout SECONDS] [--max-retries RETRIES]
|
179
|
+
[--retry-delay SECONDS] [--create-custom-json] [-t TIMESTAMP] [-f FFMPEG]
|
180
|
+
[-o OPUSENC] [-b BITRATE] [-c] [-a TAG] [-n] [-i] [-s] [-r] [-O]
|
181
|
+
[-A] [-k] [-u] [-C FILE2] [-D] [-m] [--name-template TEMPLATE]
|
182
|
+
[--show-tags] [-S] [-F] [-X] [-d] [-T] [-q] [-Q]
|
174
183
|
SOURCE [TARGET]
|
175
184
|
|
176
185
|
Create Tonie compatible file from Ogg opus file(s).
|
@@ -179,6 +188,25 @@ positional arguments:
|
|
179
188
|
SOURCE input file or directory or a file list (.lst)
|
180
189
|
TARGET the output file name (default: ---ID---)
|
181
190
|
|
191
|
+
TeddyCloud Options:
|
192
|
+
--upload URL Upload to TeddyCloud instance (e.g., https://teddycloud.example.com). Supports .taf, .jpg, .jpeg, .png files.
|
193
|
+
--include-artwork Upload cover artwork image alongside the Tonie file when using --upload
|
194
|
+
--get-tags URL Get available tags from TeddyCloud instance
|
195
|
+
--ignore-ssl-verify Ignore SSL certificate verification (for self-signed certificates)
|
196
|
+
--special-folder FOLDER
|
197
|
+
Special folder to upload to (currently only "library" is supported)
|
198
|
+
--path PATH Path where to write the file on TeddyCloud server
|
199
|
+
--show-progress Show progress bar during file upload (default: enabled)
|
200
|
+
--connection-timeout SECONDS
|
201
|
+
Connection timeout in seconds (default: 10)
|
202
|
+
--read-timeout SECONDS
|
203
|
+
Read timeout in seconds (default: 300)
|
204
|
+
--max-retries RETRIES
|
205
|
+
Maximum number of retry attempts (default: 3)
|
206
|
+
--retry-delay SECONDS
|
207
|
+
Delay between retry attempts in seconds (default: 5)
|
208
|
+
--create-custom-json Fetch and update custom Tonies JSON data
|
209
|
+
|
182
210
|
optional arguments:
|
183
211
|
-h, --help show this help message and exit
|
184
212
|
-v, --version show program version and exit
|
@@ -198,10 +226,10 @@ optional arguments:
|
|
198
226
|
Save output files in the source directory instead of output directory
|
199
227
|
-A, --auto-download Automatically download FFmpeg and opusenc if needed
|
200
228
|
-k, --keep-temp Keep temporary opus files in a temp folder for testing
|
229
|
+
-u, --use-legacy-tags Use legacy hardcoded tags instead of dynamic TonieToolbox tags (DEPRECATED)
|
201
230
|
-C, --compare FILE2 Compare input file with another .taf file for debugging
|
202
231
|
-D, --detailed-compare
|
203
232
|
Show detailed OGG page differences when comparing files
|
204
|
-
|
205
233
|
Media Tag Options:
|
206
234
|
-m, --use-media-tags Use media tags from audio files for naming
|
207
235
|
--name-template TEMPLATE
|
@@ -221,6 +249,7 @@ Logging Options:
|
|
221
249
|
-T, --trace Enable trace logging (very verbose)
|
222
250
|
-q, --quiet Show only warnings and errors
|
223
251
|
-Q, --silent Show only errors
|
252
|
+
--log-file Save logs to a timestamped file in .tonietoolbox folder
|
224
253
|
```
|
225
254
|
|
226
255
|
### Common Usage Examples
|
@@ -265,6 +294,29 @@ tonietoolbox input.mp3 --timestamp ./reference.taf # Reference TAF for extracti
|
|
265
294
|
tonietoolbox input.mp3 --bitrate 128
|
266
295
|
```
|
267
296
|
|
297
|
+
#### Constant bitrate encoding:
|
298
|
+
|
299
|
+
For more predictable file sizes and consistent quality, use constant bitrate (CBR) encoding:
|
300
|
+
|
301
|
+
```
|
302
|
+
# Encode with constant bitrate at 96 kbps (default)
|
303
|
+
tonietoolbox input.mp3 --cbr
|
304
|
+
|
305
|
+
# Encode with constant bitrate at 128 kbps
|
306
|
+
tonietoolbox input.mp3 --cbr --bitrate 128
|
307
|
+
```
|
308
|
+
|
309
|
+
#### Append Tonie tag:
|
310
|
+
|
311
|
+
You can append a hexadecimal tag to the filename, which is useful for organizing Tonie files:
|
312
|
+
|
313
|
+
```
|
314
|
+
# Add an 8-character hex tag to filename
|
315
|
+
tonietoolbox input.mp3 --append-tonie-tag 7F8A6B2E
|
316
|
+
|
317
|
+
# The output will be named "input-7F8A6B2E.taf"
|
318
|
+
```
|
319
|
+
|
268
320
|
#### Process a complex folder structure:
|
269
321
|
|
270
322
|
Process an audiobook series with multiple folders:
|
@@ -279,6 +331,127 @@ Process a music collection with nested album folders and save TAF files alongsid
|
|
279
331
|
tonietoolbox --recursive --output-to-source "\Hörspiele\"
|
280
332
|
```
|
281
333
|
|
334
|
+
#### Automatic dependency download:
|
335
|
+
|
336
|
+
If FFmpeg or opusenc are not found in your PATH, TonieToolbox can automatically download them:
|
337
|
+
|
338
|
+
```
|
339
|
+
# Automatically download dependencies when needed
|
340
|
+
tonietoolbox input.mp3 --auto-download
|
341
|
+
|
342
|
+
# Specify custom FFmpeg or opusenc locations
|
343
|
+
tonietoolbox input.mp3 --ffmpeg "C:\path\to\ffmpeg.exe" --opusenc "C:\path\to\opusenc.exe"
|
344
|
+
```
|
345
|
+
|
346
|
+
#### Keep temporary files:
|
347
|
+
|
348
|
+
When troubleshooting or debugging, you can keep the temporary opus files:
|
349
|
+
|
350
|
+
```
|
351
|
+
# Keep temporary opus files in the temp folder
|
352
|
+
tonietoolbox input.mp3 --keep-temp
|
353
|
+
|
354
|
+
```
|
355
|
+
|
356
|
+
#### Working with list files:
|
357
|
+
|
358
|
+
Create a text file (.lst) with paths to audio files for batch processing:
|
359
|
+
|
360
|
+
```
|
361
|
+
# Contents of playlist.lst:
|
362
|
+
C:\Music\song1.mp3
|
363
|
+
"C:\Music\song2.flac"
|
364
|
+
C:\Music\song3.wav
|
365
|
+
"C:\Music Path With Spaces\song2.flac"
|
366
|
+
|
367
|
+
# Process the list file
|
368
|
+
tonietoolbox playlist.lst my_playlist.taf
|
369
|
+
```
|
370
|
+
|
371
|
+
#### TeddyCloud advanced options:
|
372
|
+
|
373
|
+
Customize your TeddyCloud uploads with connection options:
|
374
|
+
|
375
|
+
```
|
376
|
+
# Upload with custom timeouts and retry parameters
|
377
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --connection-timeout 20 --read-timeout 600 --max-retries 5 --retry-delay 10
|
378
|
+
|
379
|
+
# Disable progress bar during upload
|
380
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --show-progress=False
|
381
|
+
|
382
|
+
# Upload to a special folder in TeddyCloud
|
383
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --special-folder library
|
384
|
+
```
|
385
|
+
|
386
|
+
#### Get available tags from TeddyCloud:
|
387
|
+
|
388
|
+
To see which tags you can use with your TeddyCloud server:
|
389
|
+
|
390
|
+
```
|
391
|
+
tonietoolbox --get-tags https://teddycloud.example.com
|
392
|
+
```
|
393
|
+
|
394
|
+
#### Version checking and updates:
|
395
|
+
|
396
|
+
TonieToolbox can check for newer versions and notify you when there are updates available:
|
397
|
+
|
398
|
+
```
|
399
|
+
# Skip checking for updates if you're offline or want faster startup
|
400
|
+
tonietoolbox input.mp3 --skip-update-check
|
401
|
+
|
402
|
+
# Force refresh of version information from PyPI
|
403
|
+
tonietoolbox input.mp3 --force-refresh-cache
|
404
|
+
|
405
|
+
# Clear cached version information
|
406
|
+
tonietoolbox --clear-version-cache
|
407
|
+
```
|
408
|
+
|
409
|
+
#### Legacy tag options:
|
410
|
+
|
411
|
+
Use legacy hardcoded tags instead of dynamic TonieToolbox tags:
|
412
|
+
|
413
|
+
```
|
414
|
+
tonietoolbox input.mp3 --use-legacy-tags
|
415
|
+
```
|
416
|
+
|
417
|
+
#### Create custom JSON data:
|
418
|
+
|
419
|
+
When uploading to TeddyCloud, you can also update the custom Tonies JSON data with information about the uploaded file:
|
420
|
+
|
421
|
+
```
|
422
|
+
tonietoolbox input.mp3 --upload https://teddycloud.example.com --create-custom-json
|
423
|
+
```
|
424
|
+
|
425
|
+
This will fetch and update the custom Tonies JSON data in the TeddyCloud server with information from your audio files.
|
426
|
+
|
427
|
+
#### Logging and Troubleshooting:
|
428
|
+
|
429
|
+
Control the verbosity of console output with different logging levels:
|
430
|
+
|
431
|
+
```
|
432
|
+
# Enable detailed debug information (useful for troubleshooting)
|
433
|
+
tonietoolbox input.mp3 --debug
|
434
|
+
|
435
|
+
# Enable extremely verbose trace logging (developer level)
|
436
|
+
tonietoolbox input.mp3 --trace
|
437
|
+
|
438
|
+
# Reduce output to show only warnings and errors
|
439
|
+
tonietoolbox input.mp3 --quiet
|
440
|
+
|
441
|
+
# Show only critical errors (minimal output)
|
442
|
+
tonietoolbox input.mp3 --silent
|
443
|
+
```
|
444
|
+
|
445
|
+
You can combine logging options with other commands:
|
446
|
+
|
447
|
+
```
|
448
|
+
# Debug mode while splitting a TAF file
|
449
|
+
tonietoolbox --split my_tonie.taf --debug
|
450
|
+
|
451
|
+
# Quiet mode while batch processing
|
452
|
+
tonietoolbox --recursive "Music/Collection/" --quiet
|
453
|
+
```
|
454
|
+
|
282
455
|
### Media Tags
|
283
456
|
|
284
457
|
TonieToolbox can read metadata tags from audio files (such as ID3 tags in MP3 files, Vorbis comments in FLAC/OGG files, etc.) and use them to create more meaningful filenames or display information about your audio collection.
|
@@ -325,6 +498,111 @@ This will attempt to use the album information from the audio files for naming t
|
|
325
498
|
tonietoolbox --recursive --use-media-tags --name-template "{date} - {album} ({artist})" "Music/Collection/"
|
326
499
|
```
|
327
500
|
|
501
|
+
### TeddyCloud Upload
|
502
|
+
|
503
|
+
TonieToolbox can upload files directly to a TeddyCloud server, which is an alternative to the official Tonie cloud for managing custom Tonies.
|
504
|
+
|
505
|
+
#### Upload a Tonie file to TeddyCloud:
|
506
|
+
|
507
|
+
```
|
508
|
+
tonietoolbox --upload https://teddycloud.example.com my_tonie.taf
|
509
|
+
```
|
510
|
+
|
511
|
+
This will upload the specified Tonie file to the TeddyCloud server.
|
512
|
+
|
513
|
+
#### Upload a newly created Tonie file:
|
514
|
+
|
515
|
+
You can combine conversion and upload in a single command:
|
516
|
+
|
517
|
+
```
|
518
|
+
tonietoolbox input.mp3 --upload https://teddycloud.example.com
|
519
|
+
```
|
520
|
+
|
521
|
+
This will convert the input file to TAF format and then upload it to the TeddyCloud server.
|
522
|
+
|
523
|
+
#### Upload with custom path:
|
524
|
+
|
525
|
+
```
|
526
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --path "/custom_audio"
|
527
|
+
The path needs to be existing in the TeddyCloud Library.
|
528
|
+
```
|
529
|
+
|
530
|
+
#### Upload with artwork:
|
531
|
+
|
532
|
+
TonieToolbox can automatically find and upload cover artwork alongside your Tonie files:
|
533
|
+
|
534
|
+
```
|
535
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --include-artwork
|
536
|
+
```
|
537
|
+
|
538
|
+
This will:
|
539
|
+
1. Look for cover images (like "cover.jpg", "artwork.png", etc.) in the source directory
|
540
|
+
2. If no cover image is found, attempt to extract embedded artwork from the audio files
|
541
|
+
3. Upload the artwork to the "/custom_img" directory on the TeddyCloud server
|
542
|
+
4. The artwork will be uploaded with the same filename as the Tonie file for easier association
|
543
|
+
|
544
|
+
#### Recursive processing with uploads:
|
545
|
+
|
546
|
+
```
|
547
|
+
tonietoolbox --recursive "Music/Albums" --upload https://teddycloud.example.com --include-artwork
|
548
|
+
```
|
549
|
+
|
550
|
+
This will process all folders recursively, create TAF files, and upload both the TAF files and their cover artwork to the TeddyCloud server.
|
551
|
+
|
552
|
+
#### Upload with SSL certificate verification disabled:
|
553
|
+
|
554
|
+
```
|
555
|
+
tonietoolbox my_tonie.taf --upload https://teddycloud.example.com --ignore-ssl-verify
|
556
|
+
```
|
557
|
+
|
558
|
+
Use this option if the TeddyCloud server uses a self-signed certificate.
|
559
|
+
|
560
|
+
## Real-World Use Cases
|
561
|
+
|
562
|
+
### Converting an Audiobook Series
|
563
|
+
|
564
|
+
To convert an entire audiobook series with proper metadata and upload to TeddyCloud:
|
565
|
+
|
566
|
+
```
|
567
|
+
tonietoolbox --recursive --use-media-tags --name-template "{YEAR} - {ALBUMARTIST} - {ALBUM}" --bitrate 128 --upload https://teddycloud.example.com --include-artwork "C:\Hörspiele\Die Drei Fragezeichen"
|
568
|
+
```
|
569
|
+
|
570
|
+
This command will:
|
571
|
+
1. Recursively process the Die Drei Fragezeichen audioplays directory
|
572
|
+
2. Use a naming template based on source metadata
|
573
|
+
3. Encode at 128 kbps
|
574
|
+
4. Upload both audio files and cover art to TeddyCloud
|
575
|
+
|
576
|
+
### Creating Children's Story Collections
|
577
|
+
|
578
|
+
For a custom children's story collection with chapters:
|
579
|
+
|
580
|
+
```
|
581
|
+
tonietoolbox story_collection.lst kids_stories.taf --bitrate 96 --cbr --auto-download --use-media-tags --name-template "{title} Stories" --debug
|
582
|
+
```
|
583
|
+
|
584
|
+
This command:
|
585
|
+
1. Processes a list of story audio files
|
586
|
+
2. Names the output based on metadata
|
587
|
+
3. Uses constant bitrate encoding for consistent quality
|
588
|
+
4. Automatically downloads dependencies if needed
|
589
|
+
5. Shows detailed debug information during the process
|
590
|
+
|
591
|
+
|
592
|
+
### Advanced Media Tag Usage
|
593
|
+
|
594
|
+
For complex media tag processing:
|
595
|
+
|
596
|
+
```
|
597
|
+
# First check available tags
|
598
|
+
tonietoolbox --show-tags "C:\Music\Classical\Bach"
|
599
|
+
|
600
|
+
# Then use a sophisticated naming template
|
601
|
+
tonietoolbox "C:\Music\Classical\Bach" --use-media-tags --name-template "{composer} - {opus} in {key} ({conductor}, {orchestra})"
|
602
|
+
```
|
603
|
+
|
604
|
+
The first command shows what tags are available, allowing you to create precise naming templates for classical music collections as example.
|
605
|
+
|
328
606
|
## Technical Details
|
329
607
|
|
330
608
|
### TAF (Tonie Audio Format) File Structure
|
@@ -404,3 +682,15 @@ This project is inspired by and builds upon the work of other Tonie-related open
|
|
404
682
|
## Contributing
|
405
683
|
|
406
684
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
685
|
+
|
686
|
+
## Legal Notice
|
687
|
+
|
688
|
+
This project is an independent, community-driven effort created for educational and personal use purposes.
|
689
|
+
|
690
|
+
- tonies®, toniebox®, Hörfigur® are registered trademarks of [tonies GmbH](https://tonies.com).
|
691
|
+
- This project is not affiliated with, endorsed by, or connected to tonies GmbH in any way.
|
692
|
+
- TonieToolbox is provided "as is" without warranty of any kind, either express or implied.
|
693
|
+
- Users are responsible for ensuring their usage complies with all applicable copyright and intellectual property laws.
|
694
|
+
- This tool is intended for personal use with legally owned content only.
|
695
|
+
|
696
|
+
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.
|