mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
24 lines
551 B
Python
Executable file
24 lines
551 B
Python
Executable file
#!/usr/bin/env python3
|
|
# regenerate the .ICO file from .PSD.
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from shared.icons import generate_icon
|
|
|
|
|
|
def parse_args() -> argparse.Namespace:
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("path", type=Path)
|
|
parser.add_argument("-o", "--output", type=Path, required=True)
|
|
return parser.parse_args()
|
|
|
|
|
|
def main() -> None:
|
|
args = parse_args()
|
|
if args.output.exists():
|
|
args.output.unlink()
|
|
generate_icon(args.path, args.output)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|