Skip to content

Commit

Permalink
Add chunk-size option to zedai-to-epub3
Browse files Browse the repository at this point in the history
  • Loading branch information
bertfrees committed Oct 1, 2018
1 parent 7e83d5c commit 564a58a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</p:output>

<p:option name="output-dir" required="true"/>
<p:option name="chunk-size" required="false" select="'-1'"/>
<p:option name="audio" required="false" select="'false'"/>

<p:import href="http://www.daisy.org/pipeline/modules/html-utils/library.xpl"/>
Expand Down Expand Up @@ -178,7 +179,9 @@
<p:empty/>
</p:input>
</p:xslt>
<px:html-chunker name="zedai-to-html.html-chunks"/>
<px:html-chunker name="zedai-to-html.html-chunks">
<p:with-option name="chunk-size" select="$chunk-size"/>
</px:html-chunker>
<p:for-each name="zedai-to-html.iterate">
<p:output port="fileset" primary="true"/>
<p:output port="html-files" sequence="true">
Expand Down
10 changes: 10 additions & 0 deletions zedai-to-epub3/src/main/resources/xml/xproc/zedai-to-epub3.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
</p:documentation>
</p:option>

<p:option name="chunk-size" required="false" px:type="integer" select="'-1'">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h2 px:role="name">Chunk size</h2>
<p px:role="desc" xml:space="preserve">The maximum size of HTML files in kB. Specify "-1" for no maximum.

Top-level sections in the ZedAI become separate HTML files in the resulting EPUB. Each of these HTML files is
further split up if they exceed the given maximum size.</p>
</p:documentation>
</p:option>

<p:import href="zedai-to-epub3.convert.xpl"/>

<p:import href="http://www.daisy.org/pipeline/modules/epub3-nav-utils/library.xpl"/>
Expand Down

0 comments on commit 564a58a

Please sign in to comment.