From 7f2f01edc8fb9f1337127eeb485132089d213522 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 May 2007 21:35:04 +0000 Subject: [PATCH] Fix documentation --- epydoc-pdf.conf | 2 +- epydoc.conf | 2 +- src/libprs500/__init__.py | 22 +--------------------- upload | 20 +++++++------------- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/epydoc-pdf.conf b/epydoc-pdf.conf index 3ac260f650..2285935ed0 100644 --- a/epydoc-pdf.conf +++ b/epydoc-pdf.conf @@ -7,7 +7,7 @@ url: http://libprs500.kovidgoyal.net # The list of modules to document. Modules can be named using # dotted names, module filenames, or package directory names. # This option may be repeated. -modules: src/libprs500/*.py, libprs500.lrf, struct +modules: src/libprs500/*.py, libprs500.ebooks.lrf, struct output: pdf target: docs/pdf diff --git a/epydoc.conf b/epydoc.conf index 6d8d72c2fa..546556b6d5 100644 --- a/epydoc.conf +++ b/epydoc.conf @@ -7,7 +7,7 @@ url: http://libprs500.kovidgoyal.net # The list of modules to document. Modules can be named using # dotted names, module filenames, or package directory names. # This option may be repeated. -modules: src/libprs500/*.py, libprs500.lrf, struct +modules: src/libprs500/*.py, libprs500.ebooks.lrf, struct # Write html output to the directory "docs" output: html diff --git a/src/libprs500/__init__.py b/src/libprs500/__init__.py index 36c66c1d73..860581833f 100644 --- a/src/libprs500/__init__.py +++ b/src/libprs500/__init__.py @@ -12,27 +12,7 @@ ## You should have received a copy of the GNU General Public License along ## with this program; if not, write to the Free Software Foundation, Inc., ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -""" -This package provides an interface to the SONY Reader PRS-500 over USB. - -The public interface for device backends is defined in libprs500.device. - -There is also a script L{prs500} that provides a command-line interface to -the SONY Reader. See the script -for more usage examples. A GUI is available via the command prs500-gui. - -The packet structure used by the SONY Reader USB protocol is defined -in the module L{prstypes}. The communication logic -is defined in the module L{communicate}. - -In order to use it as a non-root user on Linux, you should have -the following rule in C{/etc/udev/rules.d/90-local.rules} :: - BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", - MODE="660", GROUP="plugdev" -You may have to adjust the GROUP and the location of the rules file to -suit your distribution. -""" - +''' E-book management software''' __version__ = "0.3.43" __docformat__ = "epytext" __author__ = "Kovid Goyal " diff --git a/upload b/upload index 237c86a1e3..15a287c83b 100644 --- a/upload +++ b/upload @@ -1,7 +1,13 @@ #!/usr/bin/python import sys, glob, os, subprocess +from subprocess import check_call as _check_call +from functools import partial from pyvix.vix import * +check_call = partial(_check_call, shell=True) + +check_call("sudo python setup.py develop", shell=True) + files = glob.glob('dist/*.exe') for file in files: os.unlink(file) @@ -37,19 +43,7 @@ f.write(open(os.path.join(HTML2LRF, 'demo.html')).read()) f.write('\n') f.close() -def check_call(cmd): - try: - retcode = subprocess.call(cmd, shell=True) - if retcode < 0: - print >>sys.stderr, cmd, "was terminated by signal", -retcode - elif retcode > 0: - print >>sys.stderr, cmd, 'failed with retrun code:', retcode - if retcode != 0: - sys.exit(1) - except OSError, e: - print >>sys.stderr, "Execution of", cmd, "failed:", e - sys.exit(1) - + check_call('''html2lrf --title='Demonstration of html2lrf' --author='Kovid Goyal' --header --output=/tmp/html2lrf.lrf %s/demo.html'''%(HTML2LRF,)) check_call('''scp /tmp/html2lrf.lrf castalia:%s/'''%(DOWNLOADS,)) check_call('''python setup.py register sdist bdist_egg upload''')