nefelibata.builders package

Submodules

nefelibata.builders.atom module

class nefelibata.builders.atom.AtomBuilder(root: pathlib.Path, config: Dict[str, Any], *args: Any, **kwargs: Any)[source]

Bases: nefelibata.builders.Builder

process_site(force: bool = False)None[source]

Generate Atom feed.

scopes: List[nefelibata.builders.Scope] = [<Scope.SITE: 'site'>]

nefelibata.builders.categories module

class nefelibata.builders.categories.CategoriesBuilder(root: pathlib.Path, config: Dict[str, Any], *args: Any, **kwargs: Any)[source]

Bases: nefelibata.builders.Builder

process_site(force: bool = False)None[source]

Generate pages for each category.

scopes: List[nefelibata.builders.Scope] = [<Scope.SITE: 'site'>]

nefelibata.builders.index module

class nefelibata.builders.index.IndexBuilder(root: pathlib.Path, config: Dict[str, Any], *args: Any, **kwargs: Any)[source]

Bases: nefelibata.builders.Builder

process_site(force: bool = True)None[source]

Generate index and archives.

scopes: List[nefelibata.builders.Scope] = [<Scope.SITE: 'site'>]

nefelibata.builders.post module

class nefelibata.builders.post.PostBuilder(root: pathlib.Path, config: Dict[str, Any], *args: Any, **kwargs: Any)[source]

Bases: nefelibata.builders.Builder

process_post(post: nefelibata.post.Post, force: bool = False)None[source]

Generate Atom feed.

scopes: List[nefelibata.builders.Scope] = [<Scope.POST: 'post'>]
nefelibata.builders.post.jinja2_formatdate(obj: Union[str, int, float, datetime.datetime], fmt: str)str[source]

Jinja filter for formatting dates.

nefelibata.builders.utils module

nefelibata.builders.utils.contrast(rgb1: Tuple[float, float, float], rgb2: Tuple[float, float, float])float[source]
nefelibata.builders.utils.hash_n(text: bytes, numbers: int = 10)int[source]

Hash a string into a number between 0 and numbers-1.

nefelibata.builders.utils.luminance(rgb: Tuple[float, float, float])float[source]
nefelibata.builders.utils.random_color(text: str, target_contrast: float = 5, rgb: Tuple[float, float, float] = 1, 1, 1)str[source]

Generate a random color based on the hash of the string.

Module contents

class nefelibata.builders.Builder(root: pathlib.Path, config: Dict[str, Any], *args: Any, **kwargs: Any)[source]

Bases: object

process_post(post: nefelibata.post.Post, force: bool = False)None[source]
process_site(force: bool = False)None[source]
scopes: List[nefelibata.builders.Scope] = []
class nefelibata.builders.Scope(value)[source]

Bases: enum.Enum

An enumeration.

POST = 'post'
SITE = 'site'
nefelibata.builders.get_builders(root: pathlib.Path, config: Dict[str, Any], scope: Optional[nefelibata.builders.Scope] = None) → List[nefelibata.builders.Builder][source]