about summary refs log tree commit diff
path: root/pkgs/by-name/ba/backgroundremover/test-script.py
blob: 29af6fd76e80bff923577053b81f03d0821716a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)