This commit is contained in:
Kovid Goyal 2008-03-25 22:12:26 +00:00
parent d2381c78af
commit 47ed181d81
8 changed files with 20 additions and 11 deletions

View File

@ -1,8 +1,9 @@
#!/usr/bin/env python
from __future__ import with_statement
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
'''Read meta information from epub files'''
from __future__ import with_statement '''Read meta information from epub files'''
import sys, os import sys, os

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'Warning __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import os, traceback import os, traceback
from PyQt4.QtCore import QThread, SIGNAL, QObject from PyQt4.QtCore import QThread, SIGNAL, QObject
@ -123,4 +123,4 @@ class DeviceManager(QObject):
f = open(os.path.join(target, name), 'wb') f = open(os.path.join(target, name), 'wb')
self.device.get_file(path, f) self.device.get_file(path, f)
f.close() f.close()
return save_books return save_books

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'Warning __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import os, sys, textwrap, collections, traceback, shutil, time import os, sys, textwrap, collections, traceback, shutil, time
from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \ from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'Warning __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import shutil import shutil
''' Post installation script for linux ''' ''' Post installation script for linux '''
import sys, os, re import sys, os, re

View File

@ -22,7 +22,7 @@ def substitute(app, doctree):
pass pass
CLI_INDEX = '''\ CLI_INDEX = '''\
.. include:: global.rst .. include:: ../global.rst
|| ||
.. _cli: .. _cli:
|| ||
@ -55,7 +55,7 @@ You can see usage for undocumented commands by executing them without arguments
''' '''
CLI_CMD=r''' CLI_CMD=r'''
.. include:: global.rst .. include:: ../global.rst
|| ||
.. _$cmd: .. _$cmd:
|| ||

View File

@ -145,6 +145,12 @@ A reasonably complex real life example that exposes more of the :term:`API` of `
.. literalinclude:: ../web/feeds/recipes/nytimes.py .. literalinclude:: ../web/feeds/recipes/nytimes.py
:linenos: :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 <libprs500.web.feeds.news.BasicNewsRecipe.timefmt>`.
Tips for developing new recipes Tips for developing new recipes
--------------------------------- ---------------------------------

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'Warning __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
""" """
Provides platform independent temporary files that persist even after Provides platform independent temporary files that persist even after
being closed. being closed.

View File

@ -1,10 +1,12 @@
#!/usr/bin/env python
from __future__ import with_statement
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
''' '''
Fetch a webpage and its links recursively. The webpages are saved to disk in Fetch a webpage and its links recursively. The webpages are saved to disk in
UTF-8 encoding with any charset declarations removed. 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 import sys, socket, os, urlparse, codecs, logging, re, time, copy, urllib2, threading, traceback
from urllib import url2pathname from urllib import url2pathname
from httplib import responses from httplib import responses
@ -411,4 +413,4 @@ def main(args=sys.argv):
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())