7 Commits
Author SHA1 Message Date
Muse 934c336667 sgeo --trip: draw the journey as an ordered polyline with time labels
Reads a stag CSV, orders the geotagged rows by their parsed
timestamp (ISO and EXIF-colon forms sort together), and draws the
trip on an OSM map: blue line with white halo, direction arrowhead
per leg, red marker per stop, MM-DD HH:MM label per timestamped
stop. Rows without a timestamp go last in CSV order; rows without
coordinates are skipped. Reuses sgeo tile/zoom/marker code via
shared fetch_tiles/draw_attribution helpers. Tests: 11/11 in
tests/run_tests.sh (3 new trip cases + tests/check_trip.py).
Docs: docs/trip-path.md.
2026-12-02 09:36:30 +00:00
cnmcdee a2106045a6 json: --json output and libsfile linkable library
- sfile --json: one JSON object per file (JSON Lines) carrying format,
  offsets, decoded fields and geotags when present; default CLI
  output byte-identical (verified against the pre-refactor binary).
- libsfile: src/sfile.h + src/sfile_lib.c expose the decoder
  (sfile_decode_file/mem, sfile_result_to_json, format table
  introspection); make lib builds libsfile.a and libsfile.so.1.1.0,
  make install installs them plus the header.
- tests/test_json.py: JSON parses and matches the text table on the
  same files (make test-json); tests/test_library.c + test_lib.sh:
  static and shared link test (make test-lib).
2026-12-02 09:28:39 +00:00
Muse b21573d47d docs: make works in a fresh clone again now decoders landed (b368998)
Remove the stale caveat that make fails without src/geotag.c.
Plain make builds sfile (and scar); make stag sgeo stays the
minimal build for the geotag tools.
2026-12-02 09:23:36 +00:00
Muse 3f725687e2 docs: stag/sgeo usage, CSV format, map + attribution, build caveat
- docs/stag-sgeo.md: building (make stag sgeo; make all blocked on
  uncommitted src/geotag.c), sfile lookup order, media-extension scan
  set, CSV columns + empty-coords rule, real stag/sgeo output against
  the decoder build of sfile (SF/Tokyo EXIF GPS), OSM attribution and
  the runtime tile-fetch dependency, test suite (8/8).
- README.md: stag/sgeo section + Layout/Building entries.
2026-12-02 09:18:42 +00:00
Muse 720523151a contract: datetime is ISO YYYY-MM-DD, not EXIF YYYY:MM:DD
Real-file test against the /opt/sfile decoders showed the decoder
normalises EXIF GPSDateStamp to dashes (geotag.c: EXIF stores the
date as YYYY:MM:DD; normalised to ISO YYYY-MM-DD so the field is
machine-parseable). The contract example/table said YYYY:MM:DD.
Fixed the doc, and the fake sfile + expected CSV to match the real
decoder output (the nyc fallback case still exercises the colon
form via GPSDateStamp).
2026-12-02 09:15:06 +00:00
Muse 8f81caa14b tests + contract: fake-sfile harness, tile server, map checks
tests/run_tests.sh: fake sfile on PATH (tests/bin/sfile, canned GPS
values in section + EXIF tag-name forms), a local tile server
(tests/tile_server.py, $SGEO_TILE_BASE) so sgeo tests run offline,
and tests/check_map.py (stdlib PNG decode: marker-cluster count +
attribution plaque). Cases: multi-file CSV byte-for-byte, multi +
single-point maps, no-geotag dir, empty dir, default outfiles.
8 checks, all passing.

docs/geotag-contract.md: the field-name contract between the
decoder (what sfile prints in its Geotagging: section) and the
client parser (section + EXIF tag-name / uniform-table fallback
forms it accepts), incl. first-source-wins, defaults, and ranges.

Note: tests/bin/sfile is force-added -- .gitignore has a bare
sfile rule for the built binary.
2026-12-02 09:15:06 +00:00
cnmcdee eac6be4802 scar: file carver built on sfiles format table
Scan a raw disk image for sfiles known magics (831 formats) and carve
out the files: PNG chunk walk, JPEG marker walk, GIF block walk, ZIP
local-header walk + EOCD, PDF %%EOF scan, gzip inflate sizing; next-
header/EOF fallback with a size cap for the rest. Report lists offset,
format, size, confidence and how the end was found.

- src/scar.c, src/footers.h: carver + footer/trailer table
- Makefile: scar target (links -lz), test-scar target, install both
- tests/test_scar.py: synthetic image, 7 files recovered byte-identical
- docs/scar.md: usage, real example output, decisions, limits
2026-12-02 09:12:01 +00:00