Skip to content

module data_file

Object stored in the file.

Global Variables

  • TYPE_CHECKING

class ParseError

Error parsing content.


class DataFile

Object stored in the file.

method __init__

__init__(
    library: 'Library',
    folder: Optional[Path] = None,
    file_name: Optional[Path] = None,
    content: Optional[str] = None
)  None

Set fields from args.


property content

File content.

Automatically generate content from object's fields if not assigned.


Return file link.


property file_name

Markdown file name.

Automatically generate file name from book's fields if not assigned.


property path

Return file path.


method check_regexes

check_regexes(checks: Dict[str, Dict[str, Any]], default_regex: str)  bool

Check regexps.

checks is a dict of {check name: {initial value, parsed value function, regexp}}


method delete_file

delete_file()  None

Delete the series file.


method parse

parse()  None

Parse file content.


method render_body

render_body()  str

Return rendered body.


method write

write()  None

Write file to path.


This file was automatically generated via lazydocs.