How to use the libratom.cli.PATH_METAVAR function in libratom

To help you get started, we’ve selected a few libratom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github libratom / libratom / libratom / cli / cli.py View on Github external
    metavar=PATH_METAVAR,
    default=Path.cwd,
    callback=validate_existing_dir,
    type=PathPath(resolve_path=True),
    help=f"Look for input files in {PATH_METAVAR}.",
)
@click.argument(
    "src",
    metavar="[SOURCE]",
    type=PathPath(exists=True, resolve_path=True),
    callback=validate_eml_export_input,
)
def emldump(out, location, src) -> None:
    """
    Generate .eml files from pst/mbox files.
    """
github libratom / libratom / libratom / scripts / get_media_type_list.py View on Github external
    metavar=PATH_METAVAR,
    default=Path("media_types.json"),
    callback=validate_out_path,
    type=PathPath(resolve_path=True),
    help=f"Write the output to {PATH_METAVAR}.",
)
def download_media_type_files(out) -> None:
    """Download media type files from https://www.iana.org/ and write a JSON file of all media types.
    """

    media_types = []

    media_type_registries = [
        "application",
        "audio",
        "font",
        "image",
github libratom / libratom / libratom / scripts / get_media_type_list.py View on Github external
    help=f"Write the output to {PATH_METAVAR}.",
)
def download_media_type_files(out) -> None:
    """Download media type files from https://www.iana.org/ and write a JSON file of all media types.
    """

    media_types = []

    media_type_registries = [
        "application",
        "audio",
        "font",
        "image",
        "message",
        "model",
        "multipart",
        "text",
github libratom / libratom / libratom / cli / cli.py View on Github external
    help=f"Write the output to {PATH_METAVAR}.",
)
@click.option(
    "-m",
    "--include-message-contents",
    is_flag=True,
    help="Also extract message headers and bodies.",
)
@click.option(
    "-j",
    "--jobs",
    metavar=INT_METAVAR,
    type=click.INT,
    help=f"Use {INT_METAVAR} concurrent jobs.",
    default=cpu_count(),
)
@click.argument(