From 735d6a60eeca35e6d27f8b45aa7e7cdc01d16fd4 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 24 Mar 2025 20:43:34 -0500 Subject: [PATCH] [studio] Fix closing tab with unsaved changes --- scripts/file-to-cpp.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/file-to-cpp.py diff --git a/scripts/file-to-cpp.py b/scripts/file-to-cpp.py new file mode 100755 index 0000000..057976a --- /dev/null +++ b/scripts/file-to-cpp.py @@ -0,0 +1,30 @@ +#! /usr/bin/env python3 + +# +# Copyright 2016 - 2025 gary@drinkingtea.net +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +import argparse +import sys + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument('--file', help='path to file') + parser.add_argument('--out-cpp', help='path to output cpp file') + parser.add_argument('--out-hpp', help='path to output hpp file') + parser.add_argument('--namespace', help='path to output hpp file') + args = parser.parse_args() + return 0 + + +if __name__ == '__main__': + try: + err = main() + sys.exit(err) + except KeyboardInterrupt: + sys.exit(1)