Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2019, 05:43 PM   #1
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,285
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Corrections to format_docs/pdb/apnx.txt

I've been trying to learn some details of amazon's apnx format and the least difficult for me to follow description I've found is calbre's format_docs/pdb/apnx.txt, but I think that has not kept up with the source code and some of it does not reflect what can be gleaned from examination of an apnx file and how a book from amazon behaves.
Quote:
Page Mapping Header
-------------------

The page mapping header is a string enclosed in {} containing key, value pairs.

content comments

asin The ISBN 10 for the paper book the pages correspond to
pageMap Three value tuple. Looks like: "(N,N,N)"
1) Number of bytes after header that starts the page numbering sequence
2) unknown
3) unknown
I think the tuple descriptions should be something like:

A pbook that has X leafs has 2X page numbers, which may be Indo-Arabic numerals, Roman numerals, or something else. There is a value in the Page List section and the end of the apnx file that is the byte of the book HTML that is the start of the page for each labeled page in the book.

1) The first labeled page of the sequence of pages this tuple describes.
2) Page number type, a: Indo-Arabic numeral, r: Roman numeral, c: something else
3) Value of page number for the first page of this sequence.

A tuple with page type "c" can only describe 1 page. The other types get incremented by 1 until the first page of the next tuple.

Last edited by j.p.s; 11-24-2019 at 05:47 PM.
j.p.s is offline   Reply With Quote
Old 11-24-2019, 06:26 PM   #2
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,498
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
My best guess is that "c" stands for character string. It supports a list of values separated by "|" characters as the third entry in the tuple.

There is some additional information in the MobileRead Wiki: https://wiki.mobileread.com/wiki/APNX

Last edited by jhowell; 11-24-2019 at 06:36 PM.
jhowell is offline   Reply With Quote
Old 11-24-2019, 08:21 PM   #3
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,285
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by jhowell View Post
My best guess is that "c" stands for character string. It supports a list of values separated by "|" characters as the third entry in the tuple.

There is some additional information in the MobileRead Wiki: https://wiki.mobileread.com/wiki/APNX
Thanks. I've read the wki page before, but it must have been at a time when I wasn't able to follow it and much of it didn't stick.

I still think that docs/pdb/apnx.txt should be updated similar to as suggested in post #1 and maybe a reference to the wiki page added.
j.p.s is offline   Reply With Quote
Old 11-24-2019, 09:41 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Feel free to post the updated text file and I will add it to calibre, or directly send a pull request.
kovidgoyal is offline   Reply With Quote
Old 11-29-2019, 05:22 PM   #5
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,285
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by kovidgoyal View Post
Feel free to post the updated text file and I will add it to calibre, or directly send a pull request.
OK, I just made my first ever github pull request.

Also attached here.
Attached Files
File Type: txt apnx.txt (3.0 KB, 180 views)
j.p.s is offline   Reply With Quote
Old 11-29-2019, 10:25 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks, merged.
kovidgoyal is offline   Reply With Quote
Reply

Tags
apnx


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacked Up Reader for epub/fb2/txt/rtf/html/pdb/etc bhaak Kindle Developer's Corner 296 10-01-2016 01:11 PM
Txt to PDB questions pckopp Calibre 7 07-24-2010 08:51 PM
TXT->PDB (eReader) conversion error solitaire Calibre 5 01-25-2010 07:37 PM
.txt to .pdb? nlaplaca Apple Devices 1 12-21-2008 08:15 PM
ereader pdb to rtf, txt, anything? Dave Berk Reading and Management 11 03-24-2007 07:45 PM


All times are GMT -4. The time now is 06:08 AM.


MobileRead.com is a privately owned, operated and funded community.