Commit Graph

4 Commits

Author SHA1 Message Date
arda.aydin@ontrol.com.tr
1fdfed90dd verify.py: round-trip any app you pick, with a file chooser
Takes a file now -- python verify.py [app.sax|app.sab] [sedona_home] -- and
opens the same chooser as the converter when none is given. Direction follows
the extension:

  .sab  sab -> sax -> sab            must come back byte-identical
  .sax  sax -> sab -> sax -> sab     the two sabs must be identical

The sax case compares the binaries, not the two texts: a sab carries no
runtime prop values and no formatting, so a regenerated sax may legitimately
differ from a hand-written original. That is printed as a note, not a failure.

Cancelling the chooser falls back to the built-in testprogram/ regression,
now four checks (both sedonac comparisons plus both round trips).

Malformed input fails with a one-line reason and exit 1 instead of a
traceback, and sax.py reports a broken parent/child/sibling id as
"comp 0 app: missing child 254" rather than a bare KeyError. Sedona home is
resolved lazily so importing verify opens no dialog.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 22:30:52 +03:00
arda.aydin@ontrol.com.tr
dd7b586ea0 Drop testprogram/ from the repo, show version in dialog titles
testprogram/ is local test data, not part of the tool: untracked and
gitignored so it never comes back. verify.py now prints SKIP and exits 0
when the test pair is absent instead of blowing up.

Adds config.NAME / config.VERSION (sab2sax 0.0.0.001). Every dialog title
bar goes through config.title(), and the CLI prints the same line at
startup, so it is clear which build produced a file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 22:08:20 +03:00
arda.aydin@ontrol.com.tr
ec4019ea96 Convert both directions, and read sedona home from system.properties
Adds the reverse conversion (sab -> sax) and makes the tools usable without
remembering paths on the command line.

- sax.py: decoder ported from OfflineApp.decodeAppBinary + encodeAppXml.
  Rebuilds the tree from the firstChild/nextSibling chain and writes XML the
  way XWriter does. Reproduces java.lang.Float.toString, and rounds manifest
  defaults to f4 before comparing them - otherwise props equal to their
  default (0.1) get written where sedonac omits them.
- sab2sax.py: CLI dispatching on the input extension, like sedonac. sab.py
  still runs and hands off to it.
- config.py: sedona.home lives in system.properties. If it is missing or has
  no manifests/, a folder chooser opens and the answer is written back. File
  choosers for the input, save dialogs for the output; the default output name
  carries a timestamp so a run never overwrites the previous one.
- verify.py: checks both directions plus a sab -> sax -> sab round trip, and
  points at testprogram/ where the test files actually live.

All three checks pass byte-identical against the checked-in sedonac output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 21:51:04 +03:00
arda.aydin@ontrol.com.tr
3e313f8223 First commit tekrar
Bu dosyalar Claude uzerinden olusturuldu
2026-08-12 20:49:31 +03:00