nixpkgs/pkgs/by-name/ba/backgroundremover/test-script.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
402 B
Python
Raw Normal View History

from argparse import ArgumentParser
from pathlib import Path
import backgroundremover.utilities as utilities
from backgroundremover import bg
parser = ArgumentParser()
parser.add_argument('input', type=Path)
parser.add_argument('output', type=Path)
args = parser.parse_args()
input_bytes = args.input.read_bytes()
output_bytes = bg.remove(
input_bytes,
)
args.output.write_bytes(output_bytes)