From 2be970cbd20d96e7e48490dbace82ec541aaacfe Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Sun, 2 Jun 2024 20:29:31 -0700 Subject: [PATCH] Add CLI script for development, add missing license header --- cli.py | 33 +++++++++++++++++++++++++++++++++ flashkit/__init__.py | 20 ++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100755 cli.py diff --git a/cli.py b/cli.py new file mode 100755 index 0000000..216c45c --- /dev/null +++ b/cli.py @@ -0,0 +1,33 @@ +#!/usr/bin/python3 +# +# FlashKit MD Python Client +# +# Copyright (C) 2024 Joey Parrish +# +# Derived from https://github.com/krikzz/flashkit/, also under GPLv3 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# This is just a frontend to run the CLI. You get something similar installed +# automatically by pip, but if you're running the CLI from your git working +# directory, you want to use this script. + +import sys + +from flashkit.flashkit import main + +if __name__ == '__main__': + sys.argv[0] = 'flashkit' + sys.exit(main()) diff --git a/flashkit/__init__.py b/flashkit/__init__.py index 694d774..c4597f0 100644 --- a/flashkit/__init__.py +++ b/flashkit/__init__.py @@ -1,3 +1,23 @@ +# FlashKit MD Python Client +# +# Copyright (C) 2024 Joey Parrish +# +# Derived from https://github.com/krikzz/flashkit/, also under GPLv3 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + from .device import FlashKitDevice from .cart import Cart from .flashkit import check, readRom, writeRom, readRam, writeRam, main