comicbox.readinglists.library ¶
Read a directory of comics, to match a list against them and tag them.
Each comic is read in a pool of worker processes. Besides its tags, a read records the tag formats the comic carries, so a write can name the ones it removes, and the tag files comicbox could not parse: a write would replace them with what was read from the rest, so such a comic is never written.
The workers never take Ctrl-C: it goes to this process alone, which stops the read. Before, every worker printed its own traceback.
Comic dataclass ¶
One comic’s tags, and its tag files.
formats are the tag formats it carries that comicbox read, and unreadable names the tag files it carries that comicbox could not parse.
Source code in comicbox/readinglists/library.py
41 42 43 44 45 46 47 48 49 50 51 52 53 | |
Library dataclass ¶
The comics under a directory, by path, and why any directory went unread.
Source code in comicbox/readinglists/library.py
56 57 58 59 60 61 | |
comic_paths(directory, on_error) ¶
List the comic archives under a directory, in path order.
A linked file is listed; a linked directory is not searched, as with comicbox’s --recurse. A directory that cannot be read goes to on_error.
Source code in comicbox/readinglists/library.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
read_comics(directory, config=None, on_error=None, *, log_level='INFO') ¶
Read every comic under a directory, in path order.
A comic that cannot be read goes to on_error and the rest are read; a directory that cannot be read is in unread_directories. A comic with no tags is left out: there is nothing to match it by. log_level is the workers’ logging level.
Source code in comicbox/readinglists/library.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |