Add plugin for setting logging console
So that we are not tied to tqdm.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
from abc import ABC, abstractmethod, abstractstaticmethod
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from collections import namedtuple
|
||||
from logging import Handler
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, AbstractSet, Callable, Iterable, List, Optional
|
||||
|
||||
@@ -27,6 +28,11 @@ hookspec = pluggy.HookspecMarker('ocrmypdf')
|
||||
# pylint: disable=unused-argument
|
||||
|
||||
|
||||
@hookspec
|
||||
def get_logging_console() -> Handler:
|
||||
"""Returns a logging handler. Should be configured to handle progress bars."""
|
||||
|
||||
|
||||
@hookspec
|
||||
def add_options(parser: ArgumentParser) -> None:
|
||||
"""Allows the plugin to add its own command line and API arguments.
|
||||
|
||||
Reference in New Issue
Block a user