diff --git a/src/calibre/ebooks/lit/lzxcomp.py b/src/calibre/ebooks/lit/lzxcomp.py index 1a3f944c89..badfa807fb 100644 --- a/src/calibre/ebooks/lit/lzxcomp.py +++ b/src/calibre/ebooks/lit/lzxcomp.py @@ -1,4 +1,11 @@ +''' +Higher-level LZX compression/decompression routines. +''' from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2008, Marshall T. Vandegrift ' + import sys import os from cStringIO import StringIO diff --git a/src/calibre/ebooks/lit/mssha1.py b/src/calibre/ebooks/lit/mssha1.py index 1708c8dd8b..29261e7313 100644 --- a/src/calibre/ebooks/lit/mssha1.py +++ b/src/calibre/ebooks/lit/mssha1.py @@ -4,6 +4,9 @@ Modified version of SHA-1 used in Microsoft LIT files. Adapted from the PyPy pure-Python SHA-1 implementation. """ +__license__ = 'GPL v3' +__copyright__ = '2008, Marshall T. Vandegrift ' + import struct, copy # ====================================================================== diff --git a/src/calibre/ebooks/lit/oeb.py b/src/calibre/ebooks/lit/oeb.py index fc1aaeef90..2a553006ab 100644 --- a/src/calibre/ebooks/lit/oeb.py +++ b/src/calibre/ebooks/lit/oeb.py @@ -1,4 +1,11 @@ +''' +Basic support for manipulating OEB 1.x/2.0 content and metadata. +''' from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2008, Marshall T. Vandegrift ' + import os import sys from collections import defaultdict diff --git a/src/calibre/ebooks/lit/stylizer.py b/src/calibre/ebooks/lit/stylizer.py index 1986f6a2ed..47018201ae 100644 --- a/src/calibre/ebooks/lit/stylizer.py +++ b/src/calibre/ebooks/lit/stylizer.py @@ -1,6 +1,13 @@ -#! /usr/bin/python2.5 # -*- encoding: utf-8 -*- +''' +CSS property propagation class. +''' +from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2008, Marshall T. Vandegrift ' + from __future__ import with_statement import sys import os @@ -324,12 +331,12 @@ class Style(object): def _get(self, name): result = None - styles = self._stylizer._styles if name in self._style: result = self._style[name] if (result == 'inherit' or (result is None and name in INHERITED and self._has_parent())): + styles = self._stylizer._styles result = styles[self._element.getparent()]._get(name) if result is None: result = DEFAULTS[name] diff --git a/src/calibre/ebooks/lit/writer.py b/src/calibre/ebooks/lit/writer.py index f374d49ddf..e5eea46baa 100644 --- a/src/calibre/ebooks/lit/writer.py +++ b/src/calibre/ebooks/lit/writer.py @@ -1,3 +1,11 @@ +''' +Basic support for writing LIT files. +''' +from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2008, Marshall T. Vandegrift ' + from __future__ import with_statement import sys import os