mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
d5447ea750
Signed-off-by: lucasew <lucas59356@gmail.com>
21 lines
402 B
Python
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)
|