nixpkgs/pkgs/by-name/ba/backgroundremover/test-script.py
lucasew d5447ea750 backgroundremover: init at 0.2.6
Signed-off-by: lucasew <lucas59356@gmail.com>
2024-03-22 17:23:28 -03:00

21 lines
402 B
Python

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)