Printed page to library page
shamela_resolve_printed_pageردُّ رقم الصفحة المطبوعة إلى صفحات البرنامج
Turn a printed citation — «vol. 4, p. 405» — into the internal page ids that carry it, in one indexed query. A printed page number and a page_id are different things with no arithmetic between them, so estimating an id and correcting it by reading is both slow and unreliable. Returns page_ids[]: ONE printed page routinely maps to SEVERAL ids (part='1', page=6 is ids 9, 10 and 11 in the fixture book) because Shamela splits a long printed page across records — read them all, since the first alone is a fragment quoted as the page. Failure is specific rather than null: 'book_not_downloaded', 'no_printed_pagination' (Shamela paginates this entry itself, so no printed page exists to find), 'part_not_found' (with available_parts), 'page_not_in_part' (with the range that does exist). citable false means the numbers are Shamela's own, not a published edition's. Omit part for a single-volume work or a citation with no volume; parts_matched then reports whether the number was ambiguous across volumes. Different printings paginate differently — resolve the title with shamela_resolve_work first and use the printing the citation came from. Examples: shamela_resolve_printed_page({book_id:1681, part:'1', page:6}), shamela_resolve_printed_page({book_id:6910, part:'4', page:405}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | The PRINTED page number as the citation gives it (e.g. 405). | |
| part | No | The volume/part label as the book uses it, usually a bare number ('4'). Omit when the citation names no volume or the work is single-volume: the search then runs across every part and the response reports which parts matched, so an ambiguous page number is visible rather than silently resolved to the first volume. | |
| book_id | Yes | The book. Resolve a cited title with shamela_resolve_work first — and note that different printings of one work paginate differently, so the book_id must be the printing the citation came from. | |
| response_format | No | Output format for the human-readable text. 'markdown' (default) is best for direct display; 'json' returns the same data as a single JSON code block; 'none' skips the rendered text entirely and returns a one-line pointer, leaving `structuredContent` as the whole answer. The structured data is returned in `structuredContent` regardless of this setting, so a caller that parses it should pass 'none' — the character budget is measured over BOTH channels, and the unread copy is otherwise spending most of it. Requires the 'response_format.none' capability (see shamela_brief). | markdown |