💾 Archived View for gemini.ctrl-c.club › ~ssb22 › anemone.gmi captured on 2024-08-25 at 02:02:56. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-08-18)

➡️ Next capture (2024-08-31)

🚧 View Differences

-=-=-=-=-=-=-

Anemone DAISY maker

Anemone is a Python 3 script to put together a DAISY digital talking book, from HTML text, MP3 audio recordings and time index data.

Anemone produces DAISY 2.02 files by default, or DAISY 3 (i.e. ANSI/NISO Z39.86) if an option is set. It can produce four different types of digital talking book:

1. Full audio with basic Navigation Control Centre only: this requires a list of MP3 or WAV files for the audio, one per section, and the title of each section can be placed either in a separate text file or in the filename of the audio file.

2. Full audio with full text: this requires MP3 or WAV files for the audio, corresponding XHTML files for the text, and corresponding JSON files for the timing synchronisation. Each JSON file is expected to contain a list called "markers" whose items contain "id" (or "paragraphId" or anything else ending id) and "time" (or "startTime" or anything else ending time), which can be in seconds, minutes:seconds or hours:minutes:seconds (fractions of a second are allowed in each case). The IDs in these JSON files should have corresponding attributes in the XHTML, by default data-pid but this can be changed with an option.

3. Text with no audio: this requires just XHTML files, and extracts all text with a specified attribute (data-pid by default)

4. Text with some audio: this is a combination of the above two methods, and you’ll need to specify skip in the JSON file list for the chapters that do not yet have recorded audio

All files are placed on the command line (or in parameters if you’re using Anemone as a module), and Anemone assumes the correspondences are ordered. So for example if MP3, HTML and JSON files are given, Anemone assumes the first-listed MP3 file corresponds with the first-listed HTML file and the first-listed JSON file, and so on for the second, third, etc. With most sensible file naming schemes, you should be able to use shell wildcards like * when passing the files to Anemone.

You may also set the name of an output file ending zip; the suffix _daisy.zip is common.

The title, publisher, language etc of the book should be set via options: run the program with --help or see below.

Download anemone.py or use pip install anemone-daisy-maker or pipx run anemone-daisy-maker

Download anemone.py

History on GitHub

The daisy anemone is a sea creature on the rocky Western shores of Britain and Ireland; the Dorset Wildlife Trust says it’s “usually found in deep pools or hiding in holes or crevices, or buried in the sediment with only tentacles displayed”. Similarly this script has no interactive user interface; it hides away on the command line, or as a library module for your Python program.

Options for Anemone 1.68

Behaviour of DAISY readers in 2024

Legal

All material © Silas S. Brown unless otherwise stated. Android is a trademark of Google LLC. GitHub is a trademark of GitHub Inc. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Mac is a trademark of Apple Inc. Microsoft is a registered trademark of Microsoft Corp. MP3 is a trademark that was registered in Europe to Hypermedia GmbH Webcasting but I was unable to confirm its current holder. Python is a trademark of the Python Software Foundation. Windows is a registered trademark of Microsoft Corp. Any other trademarks I mentioned without realising are trademarks of their respective holders.