toktokkie.metadata.comic package

Submodules

toktokkie.metadata.comic.Comic module

class toktokkie.metadata.comic.Comic.Comic(directory_path: str, json_data: Optional[Dict[str, Any]] = None, no_validation: bool = False)

Bases: toktokkie.metadata.base.Metadata.Metadata, toktokkie.metadata.comic.ComicRenamer.ComicRenamer, toktokkie.metadata.comic.ComicPrompter.ComicPrompter, toktokkie.metadata.comic.ComicValidator.ComicValidator

Metadata class that handles comics

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
classmethod media_type()toktokkie.enums.MediaType
Returns

The Comic media type

classmethod valid_id_types() → List[toktokkie.enums.IdType]
Returns

A list of valid ID types

toktokkie.metadata.comic.ComicExtras module

class toktokkie.metadata.comic.ComicExtras.ComicExtras

Bases: toktokkie.metadata.base.MetadataBase.MetadataBase, abc.ABC

Additional methods and attributes for comic metadata objects

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
property main_path

The path to the main manga directory :return: The path

property special_chapters
Returns

A list of special chapter identifiers for this series

property special_path

The path to the special manga directory :return: The path or None if it does not exist

toktokkie.metadata.comic.ComicPrompter module

class toktokkie.metadata.comic.ComicPrompter.ComicPrompter

Bases: toktokkie.metadata.base.Prompter.Prompter, toktokkie.metadata.comic.ComicExtras.ComicExtras, abc.ABC

Implements the Prompter functionality for comic metadata

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
classmethod prompt(directory_path: str) → Dict[str, Any]

Generates new Metadata JSON using prompts for a directory :param directory_path: The path to the directory for which to generate

the metadata object

Returns

The generated metadata JSON

toktokkie.metadata.comic.ComicRenamer module

class toktokkie.metadata.comic.ComicRenamer.ComicRenamer

Bases: toktokkie.metadata.base.Renamer.Renamer, toktokkie.metadata.comic.ComicExtras.ComicExtras, abc.ABC

Implements the Renamer functionality for comic metadata

create_rename_operations() → List[toktokkie.metadata.base.components.RenameOperation.RenameOperation]

Creates renaming operations for book series metadata :return: The renaming operations

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
resolve_title_name() → str

If possible, will fetch the appropriate name for the metadata based on IDs, falling back to the directory name if this is not possible or supported.

toktokkie.metadata.comic.ComicValidator module

class toktokkie.metadata.comic.ComicValidator.ComicValidator

Bases: toktokkie.metadata.base.Validator.Validator, toktokkie.metadata.comic.ComicExtras.ComicExtras, abc.ABC

Implements the Validator functionality for comic metadata

classmethod build_schema() → Dict[str, Any]

Generates the JSON schema :return: The JSON schema

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]

Module contents