X-Git-Url: http://dolda2000.com/gitweb/?p=automanga.git;a=blobdiff_plain;f=manga%2Flib.py;h=353d7ada48a9b53c40f2dd1e04fe2115caa30b79;hp=21edd3db2b0b48fa593d9690bae57544afc56c85;hb=ffd12e718bf1915abde0455fdf05a34d0632ed4d;hpb=5e98c1aa8cfadcb81cd9ebb61a1e6352c6e16e80 diff --git a/manga/lib.py b/manga/lib.py index 21edd3d..353d7ad 100644 --- a/manga/lib.py +++ b/manga/lib.py @@ -9,6 +9,19 @@ class library(object): All libraries should implement this.""" raise NotImplementedError() + def search(self, string): + """Returns an iterable object of mangas in this library that + matches the search string in a library-dependent manner. While + each library is at liberty to define its own matching + criteria, it is probably likely to involve something akin to + searching for keywords in the titles of the library. + + Searching may return very many results and may be slow to + iterate. + + Not all libraries need implement this.""" + raise NotImplementedError() + def byid(self, id): """Returns a previously known manga by its string ID, or raises KeyError if no such manga could be found.