comicbox.readinglists.render ¶
Print reading lists, comparisons and combine reports for the CLI.
Every cell is a Text with a Style, never markup, and the consoles do not highlight: series names and paths carry brackets ([Marvel] Civil War) that markup would swallow or misread.
arc_text(name, number) ¶
Name an arc and its number, as a line about it shows them.
Source code in comicbox/readinglists/render.py
442 443 444 | |
console(*, stderr=False) ¶
Get a console that prints text as given.
Text is not wrapped: a long path stays on its line, and a terminal wraps it. A table fits a terminal’s width; written anywhere else, it is not wrapped at all, so each row stays one line for a script to read.
Source code in comicbox/readinglists/render.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
entries_table(reading_list) ¶
Tabulate a list’s entries in reading order.
Source code in comicbox/readinglists/render.py
149 150 151 152 153 154 155 156 | |
header_table(reading_list) ¶
Tabulate a list’s header.
Source code in comicbox/readinglists/render.py
198 199 200 201 202 203 204 205 | |
print_ambiguous(out, path, position, volumes) ¶
Say a comic is not tagged: its entry fits it and a comic of another volume.
Source code in comicbox/readinglists/render.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
print_arc_write(out, write, *, done, problem=None, moved=None, deleted=False, removed=None) ¶
Print what tagging one file with an arc did, or would do, or why not.
problem says why a write that was made did not hold, moved is the CBZ a write converted the file to, and deleted whether the original then went. The file’s other paths follow, each on its own line, saying whether they went with it: removed gives each one removed, with why it could not be, if not.
Source code in comicbox/readinglists/render.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | |
print_catalog_entries(out, entries) ¶
Tabulate catalog search results; fetch catalog:PATH takes the path.
Source code in comicbox/readinglists/render.py
337 338 339 340 341 342 | |
print_combine_report(out, result, paths) ¶
Print what each input added and every disagreement found.
Source code in comicbox/readinglists/render.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | |
print_comparison(out, comparison) ¶
Print the verdict and the numbers behind it.
Source code in comicbox/readinglists/render.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
print_error(out, path, error) ¶
Print a failure in one line, naming its file once.
Source code in comicbox/readinglists/render.py
219 220 221 222 223 224 225 226 | |
print_matches(out, reading_list, result, directory, notes=None) ¶
Tabulate a list’s entries with the comics that are them, or missing.
Each comic is a row of its own, with how it matched and its note. A cover-year match of one of several volumes is marked ambiguous. Under a missing entry, each comic refused for it as another volume or for its cover year is a row marked refused.
Source code in comicbox/readinglists/render.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
print_messages(out, messages, label) ¶
Print warnings or losses, one per line.
Source code in comicbox/readinglists/render.py
208 209 210 211 | |
print_metron_lists(out, lists) ¶
Tabulate Metron search results; fetch metron:ID takes the ID.
Source code in comicbox/readinglists/render.py
322 323 324 325 326 327 328 329 330 331 332 333 334 | |
print_note(out, message) ¶
Print a line about what is going on, dimmed.
Source code in comicbox/readinglists/render.py
214 215 216 | |
print_reading_list(out, path, result) ¶
Print a list’s name, header and entries.
Source code in comicbox/readinglists/render.py
229 230 231 232 233 234 235 236 | |
print_status(out, path, ok, detail) ¶
Print one line: a mark, the path and what was found.
Source code in comicbox/readinglists/render.py
239 240 241 242 243 244 245 246 | |
print_variant_only(out, path) ¶
Say a comic was found only by a name variant, so is not tagged.
Source code in comicbox/readinglists/render.py
569 570 571 | |
volumes_text(volumes) ¶
Name the volumes an entry fits.
By start year, the 2011 and 2016 volumes, and by number, volumes 1 and 2.
Source code in comicbox/readinglists/render.py
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |