[Python-modules-commits] [python-odf] 88/118: Updated the manual

Wolfgang Borgert debacle at moszumanska.debian.org
Fri Oct 3 21:27:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to reference refs/remotes/upstream/master
in repository python-odf.

commit 059a027f33533c1d0170dadd71964cfe361a7361
Author: Søren Roug <soren.roug at eea.europa.eu>
Date:   Sun May 16 17:48:56 2010 +0000

    Updated the manual
---
 contrib/odf2epub/odf2epub     |  6 ++----
 contrib/odf2epub/odf2epub.1   | 18 ++++++++++++++----
 contrib/odf2epub/odf2epub.xml | 21 ++++++++++++++++++++-
 3 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/contrib/odf2epub/odf2epub b/contrib/odf2epub/odf2epub
index 53f51fb..47446ba 100755
--- a/contrib/odf2epub/odf2epub
+++ b/contrib/odf2epub/odf2epub
@@ -30,7 +30,7 @@ def escaped(string):
     return escape(string).encode('us-ascii','xmlcharrefreplace')
 
 def usage():
-    sys.stderr.write("Usage: %s [-p] inputfile\n" % sys.argv[0])
+    sys.stderr.write("Usage: %s [-c cover-image] [-o output-file] [-p] inputfile\n" % sys.argv[0])
 
 class NavpointEntry:
     def __init__(self, anchor, title, chapter, level):
@@ -340,13 +340,11 @@ if len(args) != 1:
     usage()
     sys.exit(2)
 
-epub = EPublication(args[0], coverimage)
-epub.save(outputfilename)
-sys.exit(0)
 try:
     epub = EPublication(args[0], coverimage)
     epub.save(outputfilename)
 except:
     sys.stderr.write("Unable to open file %s or file is not OpenDocument\n" % sys.argv[1])
     sys.exit(1)
+sys.exit(0)
 
diff --git a/contrib/odf2epub/odf2epub.1 b/contrib/odf2epub/odf2epub.1
index 20b47c7..0dbe110 100644
--- a/contrib/odf2epub/odf2epub.1
+++ b/contrib/odf2epub/odf2epub.1
@@ -2,12 +2,12 @@
 .\"     Title: odf2epub
 .\"    Author: S\(/oren Roug
 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: 03/22/2010
+.\"      Date: 05/16/2010
 .\"    Manual: User commands
 .\"    Source: odfpy
 .\"  Language: English
 .\"
-.TH "ODF2EPUB" "1" "03/22/2010" "odfpy" "User commands"
+.TH "ODF2EPUB" "1" "05/16/2010" "odfpy" "User commands"
 .\" -----------------------------------------------------------------
 .\" * set default formatting
 .\" -----------------------------------------------------------------
@@ -22,7 +22,7 @@
 odf2epub \- Convert ODF to an ePub ebook
 .SH "SYNOPSIS"
 .HP \w'\fBodf2epub\fR\ 'u
-\fBodf2epub\fR [\-p] [\-o\ \fIoutputfile\fR] \fIpath\fR
+\fBodf2epub\fR [\-p] [\-o\ \fIoutputfile\fR] [\-c\ \fIcover_image\fR] \fIpath\fR
 .SH "DESCRIPTION"
 .PP
 \fBodf2epub\fR
@@ -31,6 +31,11 @@ is a program that will create an ebook (\&.epub) from the input file and will wr
 "Path" is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&.
 .SH "OPTIONS"
 .PP
+\-c, \-\-cover
+.RS 4
+The \-c argument add a cover image to the EPUB file\&. Make sure the cover image itself is scaled to less than 1000px in width and height\&. Best practice is to use an image in JPG or PNG format at 600 pixels wide by 800 pixels in height\&.
+.RE
+.PP
 \-p, \-\-plain
 .RS 4
 The \-p flag will generate HTML without CSS\&.
@@ -46,11 +51,16 @@ Specify the output file with this flag\&. "\-" implies standard out\&.
 .RS 4
 .\}
 .nf
-odf2epub odf\-file
+odf2epub \-o example\&.epub odf\-file\&.odt
 .fi
 .if n \{\
 .RE
 .\}
+.SH "BUGS"
+.PP
+The EPUB format has the following limitations when running on a mobile device\&. If these limits are not adhered to, EPUB files
+\fImight\fR
+not work on mobile devices\&. Image Size: 10MB uncompressed\&. Individual XHTML file sizes: 300k uncompressed/100k compressed\&. Odf2epub does not ensure that these limits are adhered to\&.
 .SH "SEE ALSO"
 .PP
 \fBodf2xhtml\fR(1)
diff --git a/contrib/odf2epub/odf2epub.xml b/contrib/odf2epub/odf2epub.xml
index 40cb65b..1ab208c 100644
--- a/contrib/odf2epub/odf2epub.xml
+++ b/contrib/odf2epub/odf2epub.xml
@@ -21,6 +21,7 @@
       <command>odf2epub</command>
       <arg choice="opt">-p </arg>
       <arg choice="opt">-o <replaceable>outputfile</replaceable></arg>
+      <arg choice="opt">-c <replaceable>cover_image</replaceable></arg>
       <arg choice="plain">
         <replaceable>path</replaceable>
       </arg>
@@ -41,6 +42,16 @@ OpenDocument file of text, spreadsheet or presentation type.
     <title>Options</title>
     <variablelist>
       <varlistentry>
+        <term>-c, --cover</term>
+        <listitem>
+          <para>
+The -c argument add a cover image to the EPUB file.
+Make sure the cover image itself is scaled to less than 1000px in width and height. Best practice
+is to use an image in JPG or PNG format at 600 pixels wide by 800 pixels in height.
+</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
         <term>-p, --plain</term>
         <listitem>
           <para>
@@ -62,10 +73,18 @@ Specify the output file with this flag. "-" implies standard out.
   <refsect1>
     <title>Example</title>
     <screen>
-odf2epub odf-file
+odf2epub -o example.epub odf-file.odt
 </screen>
   </refsect1>
   <refsect1>
+    <title>Bugs</title>
+    <para>The EPUB format has the following limitations when running on a mobile  device.
+    If these limits are not adhered to, EPUB files <emphasis>might</emphasis> not work on mobile devices. Image Size: 10MB uncompressed.
+    Individual XHTML file sizes: 300k uncompressed/100k compressed. Odf2epub does not ensure
+    that these limits are adhered to.
+              </para>
+  </refsect1>
+  <refsect1>
     <title>See Also</title>
     <para><command>odf2xhtml</command>(1)</para>
   </refsect1>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-odf.git



More information about the Python-modules-commits mailing list