-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc.js
27 lines (15 loc) · 12.7 KB
/
src.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const title = `["Accessible EPUB 3","Children's Literature","Creative Commons Shared Culture","EPUB 3.0 Specification","Figure Gallery","Georgia","Georgia with EPUB Canonical Fragment Identifiers","Haruko","Haruko with JPEGs in spine","Haruko with Region-Based Navigation","Hefty Water","Indexing for Editors and Authors: A Practical Guide to Understanding Indexes","Indexing for Editors and Authors: A Practical Guide to Understanding Indexes","Internal Links","Israel Sailing","Kusamakura","Kusamakura Preview","Kusamakura Embedded Preview","Linear Algebra","Mahabharata","Moby Dick","Moby Dick with Media Overlays","Page Blanche","Page Blanche with JPEGs in spine","Quiz","Regime Anti-Cancer Arabic","Requirements for Japanese Text Layout","Requirements for Japanese Text Layout (English)","Sous le vent","Sous le Vent with SVG in spine","SVG-in-spine","The Swans","The Voyage of Life","The Voyage of Life with textual overlays","The Waste Land","The Waste Land with OTF fonts","The Waste Land with encrypted OTF fonts","The Waste Land with WOFF fonts","The Waste Land with WOFF encrypted fonts","Trees","Vertical Writing","World Cultures and Geography"]`;
const titleParsed = JSON.parse(title);
const { ok } = require("assert");
ok(titleParsed.length === 42);
const desc = `["Strategies for creating EPUB 3 content that can be read by people with different preferred reading modalities.","This sample section from Children's Literature includes span-element headings in the navigation document toc and also includes the table of contents in the spine with styling and hidden page list.","The video, audio and text from Creative Commons A Shared Culture in EPUB form; each spine item containing a variation of <video>/<audio> embedding. See the Navigation Document (toc.xhtml) for details.\\n\\nLicensing: CC-BY-NC-SA","The EPUB 3.0 specifications in EPUB 3.0 format.","A bindings-based \\"object rotator\\". This particular sample represents an image gallery with caption fields. (The data model is based on the HTML5 figure element, and is thus intended to be used with any type of content that can be represented using <figure>.)\\n\\nImplementations that do not support bindings will fallback to display all figures simultaneously.","This sample entry from the Encyclopedia Britannica includes a PLS lexicon file and embedded SSML pronunciations showing how the two technologies can be used together to improve TTS rendering.\\n\\nThis sample also includes a page-list nav.","Like the base version, but uses EPUB Canonical Fragment Identifiers (CFI) in the Navigation Document page-list.\\n\\nThis sample demonstrates how CFI can be used to identify positions in a target document without having to modify the target document structure. Note that the identified page boundary positions in this document are otherwise identical to those in the base version.","Japanese manga. Each page is represented by an HTML document having a single image and nothing else.","Japanese manga. Each page is represented by a single image, which has a fallback HTML.","Contains a region-nav allowing navigation by region of interest.","This sample contains one instance of the epub:switch element, along with inline instructions for how to determine whether a Reading System supports epub:switch. There is also a little bit of ruby markup available, used to render captions under/over chemical formula segments.","Sample publication with a single index document conformant to the EPUB Indexes 1.0 Specifications.\\n\\nLicensing: See the package document for usage restrictions.","Like the base version, but the index is split across three content documents.\\n\\nLicensing: See the package document for usage restrictions.","Test document for internal linking.","BIDI, page-progression-direction, rtl, and Hebrew text.","A Japanese Novel Kusamakura 草枕 by Natsume Sōseki 夏目漱石. This EPUB publication has features as below:\\nVertical Writing\\nRuby\\nMedia overlay\\nNon-ASCII file names and Internationalized Resource Identifiers\\nEmphasis Dots\\nEmbedded OpenType? font for U+2014\\nEPUB3 metadata including phonetics\\nXMP metadata","A standalone preview of the the base version.","Like the base version, but includes an embedded declaration for a preview.","A First Course in Linear Algebra, available in its canonical version at http://linear.ups.edu. This sample contains substantive amounts of MathML.\\n\\nLicensing: GNU FDL 1.2","The Mahabharata in Devanāgarī (देवनागरी). Note that this sample does not include embedded fonts, and can thus be used to test Reading System native support for Devanāgarī font/glyph rendering.","Herman Melville's Moby-Dick with, as opposed to wasteland, one spine item per chapter. Includes embedded fonts (OpenType). Uses the epub:type attribute.","Like the base version, but includes Media Overlays for the first two chapters.","An extract of a fixed layout document, using XHTML spine items that embed bitmaps. This sample has both the rendition:orientation and the rendition:spread properties set to 'auto'.","Much like the base version, but instead of JPEG embedded in XHTML spine items, this variant uses JPEG spine items.","A bindings-based \\"quiz\\". This particular sample represents a multiple-choice quiz with a self-checking feature. Allows for three types of quizzes: all questions at once, one question at a time, and one question at a time with immediate feedback (\\"flashcard\\" mode). Implementations that do not support bindings will fallback to display all questions and possible answers as a static list.","Arabic content. Note that this sample does not include embedded fonts, and can thus be used to test Reading System native support for arabic font/glyph rendering.","EPUB version of Requirements for Japanese Text Layout (W3C Note) in Japanese","EPUB version of Requirements for Japanese Text Layout (W3C Note) in English","An extract of a fixed layout document, using SVG embedded in XHTML spine items. This sample has the rendition:orientation property set to 'portrait', and the rendition:spread property set to 'none'.","Much like the base version, but instead of SVG embedded in XHTML spine items, this variant uses SVG spine items.","An extract of a fixed layout document, using SVG spine items. This sample uses spine itemref page-spread-* properties in a way that impacts default spread population behavior for the first two pages.","This sample contains CSS Media Queries with adaptions for device screen size and orientation.\\n\\nBy virtue of the included Package Document metadata, this sample can also be used to test how Reading Systems handles multiple DC elements of the same kind, and whether it recognizes MARC relator codes (the sample includes multiple dc:creator elements, annotated with MARC illustrator and author roles).","A mixed reflowable and fixed layout document. This sample can be used to test Reading System support for item-level changes to fixed layout meta properties.","Much like the base version, but instead of interspersed reflowable/fixed pages, this variant contains an experimental \\"textual overlay\\" for each painting (click or tap on the painting surface to toggle the visibility of the text).\\n\\nWhile the implementation of the toggling in this sample is not very slick, the main purpose is to show how rich text can be supplied with otherwise image-centric content without negative impact on the visual experience.","A basic recast of T.S. Eliot's The Waste Land in a single XHTML document, using <section> elements and the epub:type attribute to mark a live linked note apparatus and other structural components. Contains day and night alternate style sheets.\\n\\nFor EPUB 2.0 Reading System compatibility purposes, a 2.01 NCX and the EPUB 2 cover meta element is included.","Like the base version, but uses serif OTF embedded fonts. The fallback is a sans-serif system font.","Like the base version, but uses serif OTF embedded fonts encrypted using the OCF 3.0 font obfuscation algorithm. The fallback is a sans-serif system font.","Like the base version, but uses serif WOFF embedded fonts. The fallback is a sans-serif system font.","Like the base version, but uses serif WOFF embedded fonts encrypted using the OCF 3.0 font obfuscation algorithm. The fallback is a sans-serif system font.","This sample contains the HTML5 canvas element used to draw decorational trees on page load. If your reading system does not support canvas, the text \\"Your Reading System does not support canvas\\" will be shown instead.\\n\\nFollowing the title (first) page, this sample also contains two spine items that are styled using CSS multi-column layout. If your reading system supports multi-column layout, then the pages will be rendered in two columns.","Vertical writing, page-progression-direction rtl, and alternate stylesheets for vertical/horizontal writing.","Multiple rendition publication containing a text and braille rendition as well as a mapping document."]`;
const descParsed = JSON.parse(desc);
ok(descParsed.length === 42);
const href = '["https://github.com/IDPF/epub3-samples/releases/download/20170606/accessible_epub_3.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/childrens-literature.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/cc-shared-culture.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/epub30-spec.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/figure-gallery-bindings.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/georgia-pls-ssml.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/georgia-cfi.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/haruko-html-jpeg.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/haruko-jpeg.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/haruko-ahl.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/hefty-water.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/indexing-for-eds-and-auths-3f.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/indexing-for-eds-and-auths-3md.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/internallinks.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/israelsailing.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/kusamakura-japanese-vertical-writing.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/kusamakura-preview.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/kusamakura-preview-embedded.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/linear-algebra.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/mahabharata.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/moby-dick.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/moby-dick-mo.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/page-blanche.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/page-blanche-bitmaps-in-spine.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/quiz-bindings.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/regime-anticancer-arabic.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/jlreq-in-japanese.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/jlreq-in-english.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/sous-le-vent.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/sous-le-vent_svg-in-spine.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/svg-in-spine.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/childrens-media-query.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/cole-voyage-of-life.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/cole-voyage-of-life-tol.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/wasteland.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/wasteland-otf.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/wasteland-otf-obf.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/wasteland-woff.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/wasteland-woff-obf.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/trees.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/mymedia_lite.epub","https://github.com/IDPF/epub3-samples/releases/download/20170606/WCAG.epub"]';
const urlParsed = JSON.parse(href);
ok(urlParsed.length === 42);
export {
url: urlParsed,
title: titleParsed,
desc: descParsed,
}