[Athen] [EXTERNAL] Geeky Daisy question

Alexis Delevett alexis_delevett at cuesta.edu
Tue Jun 28 15:21:31 PDT 2022


According to the spec<http://www.daisy.org/z3986/2005/Z3986-2005.html> the title meta data is contained within the head tag of the DTB XML<http://www.daisy.org/z3986/2005/Z3986-2005.html#OPF> (or package file).

For the example from the DAISY website it looks like this,

<head>
<meta content="1.0" name="dt:version" />
<meta name="dtb:uid" content="AUTO-UID-4767990567747899000" />
<meta content="ARE YOU READY?" name="dc:Title" />
<meta content="WikiHow" name="dc:Creator" />
<meta content="2009-04-26" name="dc:Date" />
<meta content="DAISY India" name="dc:Publisher" />
<meta name="dc:Subject" content="A Short Manual for Disaster Management" />
<meta content="5078727220897727718" name="dc:Identifier" />
<meta name="dc:Language" content="en-IN" />
</head>
________________________________
From: athen-list <athen-list-bounces at mailman12.u.washington.edu> on behalf of Deborah Armstrong <armstrongdeborah at fhda.edu>
Sent: Tuesday, June 28, 2022 3:04 PM
To: 'Access Technology Higher Education Network' <athen-list at u.washington.edu>
Subject: [EXTERNAL] [Athen] Geeky Daisy question


I’m learning Python and simultaneously impressed with how the Humanware devices and most Daisy readers list books not by their filename but by their titles.

I thought a fun Python program to write that would practice file handling for me is this.

Take a directory of bookshare Daisy books (unzipped to make it easier) and open each folder, find the book title and rename the book’s folder with its title. This is the way the Humanware companion and the Humanware devices do it with Daisy files.

I know that in Daisy 2 audio the book title is in the NCC.HTML, but I can’t figure out where it hides in Daisy 3 files; does anyone know?

I do know it appears at the very start of the book when you open it in a Daisy reader, but I’m pretty sure there’s one file that has the title in a specific file location.

My program would open each folder, open that particular file, extract the title, then rename the parent folder with the book title, truncating it if necessary.

This would be useful for anyone with a lot of Daisy books that have weird filenames. And yes, I know the HumanWare companion software can do this already in copying to a flash drive or SD card. I want to rename the files in place.



--Debee


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman12.u.washington.edu/pipermail/athen-list/attachments/20220628/4eb6eadb/attachment.html>


More information about the athen-list mailing list