GPX export: missing per-cache desc summary, urlname, short_description, travelbugs elements

Aperta
#700 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python, xml
Ambito
data

Direzione di ricerca

The GPX output is built in garmin.py, where the if cache.short_description: guard already exists. Compare the wpt-level <desc> and <urlname> writing against the GCBTPGK sample file, and check how cache.trackables is read. Done means the new <desc> summary, <urlname>, and groundspeak:travelbugs block are written and the export still passes the existing GPX tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: gps-export improvement
Current State

While verifying the fix for #695 (wrong/missing IDs in GPX export), a side-by-side diff against the original geocaching.com GPX (same cache, GCBTPGK) turned up a few smaller, unrelated gaps in the exported /groundspeak:cache content. None of these affect the ID/owner/finder data #695 was about — cache id, owner, and all finder ids now match the source exactly.

Proposed Improvement

Gaps found
(wpt-level) uses only the cache name, not GSAK's summary format
Geocaching.com / GSAK: Deset kirke by LarsET, Traditional Cache (3/1.5)
OpenSAK: Deset kirke
Missing: owner, cache type, and D/T rating in the summary line.
(wpt-level) is never written
Geocaching.com: Deset kirke
OpenSAK: element absent entirely.
groundspeak:travelbugs is never written
Present (empty) in the source file for this particular cache, so no visible difference in this test — but the export code has no handling for cache.trackables at all, so any cache that actually has travel bugs/trackables present would lose that data on export.
Not a bug (confirmed while investigating)

groundspeak:short_description looked missing in the diff, but this is correct behavior — the source file's short_description was empty, and the export code already correctly skips writing the element when there's no content (if cache.short_description: in garmin.py). No change needed there.

Suggested fix
Build the wpt-level as f"{cache.name} by {cache.placed_by}, {cache.cache_type} ({difficulty}/{terrain})" (or similar), matching GSAK/geocaching.com's format.
Add a element mirroring cache.name.
Add a groundspeak:travelbugs block populated from cache.trackables, matching the structure GSAK uses (this ties into the still-open child-waypoint/.gpi POI export gap noted elsewhere — worth checking both together if/when trackable export is tackled).

Low priority — none of this affects Garmin device recognition (that was the attributes/long_description/log-truncation fix from #656) or data integrity (that was #695). Good candidate for the general backlog rather than the v1.16.2 hotfix.

Expected Benefits

No response

Lingua principale
Python
Stelle
37
Fork
17
Merge medio
16h 7m
PR unite (30g)
128

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenSAK-Org/OpenSAK

Tutte le issue di OpenSAK-Org/OpenSAK

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.