Skip to content

comicbox.formats.base.transforms.price ΒΆ

Title to Stories Transform Mixin.

price_transform_from_cb(price_tag) ΒΆ

Create a price transform from comicbox to native.

Source code in comicbox/formats/base/transforms/price.py
14
15
16
17
18
19
def price_transform_from_cb(price_tag: str) -> MetaSpec:
    """Create a price transform from comicbox to native."""
    return MetaSpec(
        key_map={price_tag: PRICES_KEY},
        spec=(Coalesce(T.values()), Iter().first()),
    )

price_transform_to_cb(price_tag) ΒΆ

Create a price transform from native to comicbox.

Source code in comicbox/formats/base/transforms/price.py
 9
10
11
def price_transform_to_cb(price_tag: str) -> MetaSpec:
    """Create a price transform from native to comicbox."""
    return MetaSpec(key_map={PRICES_KEY: price_tag}, spec=(Fill({"": T}),))