From 47ed181d81fb8f53f52a6dd4d7aca4857a0d51f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Mar 2008 22:12:26 +0000 Subject: [PATCH] --- src/libprs500/ebooks/metadata/epub.py | 5 +++-- src/libprs500/gui2/device.py | 4 ++-- src/libprs500/gui2/main.py | 2 +- src/libprs500/linux.py | 2 +- src/libprs500/manual/custom.py | 4 ++-- src/libprs500/manual/news.rst | 6 ++++++ src/libprs500/ptempfile.py | 2 +- src/libprs500/web/fetch/simple.py | 6 ++++-- 8 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/libprs500/ebooks/metadata/epub.py b/src/libprs500/ebooks/metadata/epub.py index e1ecbdb057..96e55b21e7 100644 --- a/src/libprs500/ebooks/metadata/epub.py +++ b/src/libprs500/ebooks/metadata/epub.py @@ -1,8 +1,9 @@ +#!/usr/bin/env python +from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' -'''Read meta information from epub files''' -from __future__ import with_statement +'''Read meta information from epub files''' import sys, os diff --git a/src/libprs500/gui2/device.py b/src/libprs500/gui2/device.py index 930d3e7bce..89bf5f1697 100644 --- a/src/libprs500/gui2/device.py +++ b/src/libprs500/gui2/device.py @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2008, Kovid Goyal 'Warning +__copyright__ = '2008, Kovid Goyal ' import os, traceback from PyQt4.QtCore import QThread, SIGNAL, QObject @@ -123,4 +123,4 @@ class DeviceManager(QObject): f = open(os.path.join(target, name), 'wb') self.device.get_file(path, f) f.close() - return save_books \ No newline at end of file + return save_books diff --git a/src/libprs500/gui2/main.py b/src/libprs500/gui2/main.py index 151253e222..12e8a63e2c 100644 --- a/src/libprs500/gui2/main.py +++ b/src/libprs500/gui2/main.py @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2008, Kovid Goyal 'Warning +__copyright__ = '2008, Kovid Goyal ' import os, sys, textwrap, collections, traceback, shutil, time from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \ diff --git a/src/libprs500/linux.py b/src/libprs500/linux.py index 2928531ae2..fbb6e885ff 100644 --- a/src/libprs500/linux.py +++ b/src/libprs500/linux.py @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2008, Kovid Goyal 'Warning +__copyright__ = '2008, Kovid Goyal ' import shutil ''' Post installation script for linux ''' import sys, os, re diff --git a/src/libprs500/manual/custom.py b/src/libprs500/manual/custom.py index 4ab1154295..de3b905316 100644 --- a/src/libprs500/manual/custom.py +++ b/src/libprs500/manual/custom.py @@ -22,7 +22,7 @@ def substitute(app, doctree): pass CLI_INDEX = '''\ -.. include:: global.rst +.. include:: ../global.rst || .. _cli: || @@ -55,7 +55,7 @@ You can see usage for undocumented commands by executing them without arguments ''' CLI_CMD=r''' -.. include:: global.rst +.. include:: ../global.rst || .. _$cmd: || diff --git a/src/libprs500/manual/news.rst b/src/libprs500/manual/news.rst index 7ab851bc7e..bb785ff258 100644 --- a/src/libprs500/manual/news.rst +++ b/src/libprs500/manual/news.rst @@ -145,6 +145,12 @@ A reasonably complex real life example that exposes more of the :term:`API` of ` .. literalinclude:: ../web/feeds/recipes/nytimes.py :linenos: +We see several new features in this :term:`recipe`. First, we have:: + + timefmt = ' [%a, %d %b, %Y]' + +This sets the displayed time on the front page of the created e-book to be in the format, +``Day, Day_Number Month, Year``. See :attr:`timefmt `. Tips for developing new recipes --------------------------------- diff --git a/src/libprs500/ptempfile.py b/src/libprs500/ptempfile.py index 8f62185bbb..5724b0c165 100644 --- a/src/libprs500/ptempfile.py +++ b/src/libprs500/ptempfile.py @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2008, Kovid Goyal 'Warning +__copyright__ = '2008, Kovid Goyal ' """ Provides platform independent temporary files that persist even after being closed. diff --git a/src/libprs500/web/fetch/simple.py b/src/libprs500/web/fetch/simple.py index ca160f530b..17c723fef1 100644 --- a/src/libprs500/web/fetch/simple.py +++ b/src/libprs500/web/fetch/simple.py @@ -1,10 +1,12 @@ +#!/usr/bin/env python +from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' + ''' Fetch a webpage and its links recursively. The webpages are saved to disk in UTF-8 encoding with any charset declarations removed. ''' -from __future__ import with_statement import sys, socket, os, urlparse, codecs, logging, re, time, copy, urllib2, threading, traceback from urllib import url2pathname from httplib import responses @@ -411,4 +413,4 @@ def main(args=sys.argv): if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file + sys.exit(main())