Py_sax2sab/run.py
arda.aydin@ontrol.com.tr 2dcc1704a6 Add a window, and run.py as the entry point
gui.py: one button per direction, "SAB file to SAX file" and "SAX file to
SAB file". The button decides which extension the chooser offers and which
way the conversion goes. The log names the chosen file and its folder before
the work starts, then the output file and folder when it finishes, each value
on its own line. Output lands next to the input under the timestamped name,
so there is no save dialog and nothing is overwritten. Sedona home sits at
the top with a Change... button that validates manifests/ and rewrites
system.properties.

run.py: no arguments opens the window, any argument goes to the command line
converter. pythonw run.py for a shortcut with no console.

config: NAME/VERSION are now "SAB - SAX Sedona Files Converter 0.0.0.002",
carried by the window title, every dialog title and the CLI banner. Adds
choose_sab_input() - the existing choose_sab_file() is the save dialog.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 23:05:15 +03:00

23 lines
558 B
Python

"""Start here.
python run.py the window
pythonw run.py the window, without a console behind it
python run.py app.sab [out] straight to the command line converter
No arguments means the GUI; any argument is passed through to sab2sax.py, so
the same entry point serves a double-click and a script.
"""
import sys
def main(argv):
if len(argv) > 1:
import sab2sax
return sab2sax.main(argv) or 0
import gui
return gui.main()
if __name__ == "__main__":
sys.exit(main(sys.argv))