X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Flib.py;fp=manga%2Flib.py;h=0890eaf10e4d693803656cafb1d074996967feb0;hb=3683ab38c8cb8b221c2ec20c898fa47a884d3842;hp=b5d13c1f69941987141ab4a07ae112a6e838bc9c;hpb=3bba3a7b136276653da1a0782168a6464309f539;p=automanga.git diff --git a/manga/lib.py b/manga/lib.py index b5d13c1..0890eaf 100644 --- a/manga/lib.py +++ b/manga/lib.py @@ -15,7 +15,18 @@ class library(object): Not all libraries need implement this.""" raise NotImplementedError("manga.lib.library iterator") -class pagelist(object): +class pagetree(object): + """Base class for objects in the tree of pages and pagelists. + + All pagetree objects should contain an attribute `stack', contains + a list of pairs. The last pair in the list should be the pagetree + object which yielded this pagetree object, along with the index + which yielded it. Every non-last pair should be the same + information for the pair following it. The only objects with empty + `stack' lists should be `manga' objects.""" + pass + +class pagelist(pagetree): """Class representing a list of either pages, or nested pagelists. Might be, for instance, a volume or a chapter. @@ -43,7 +54,7 @@ class manga(pagelist): and all constraints valid for it.""" pass -class page(object): +class page(pagetree): """Class representing a single page of a manga. Pages make up the leaf nodes of a pagelist tree.