OpenPoiesis/poietic-tool

Add reset-midpoints command

Offen

#1 geöffnet am 25.03.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Swift (1 Fork)auto 404
enhancementgood first issue

Repository-Metriken

Stars
 (1 Stern)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Add edit reset-midpoints command that will remove midpoints from all or selected edges.

Proposed usage:

poietic edit reset-midpoints [EDGE...]

Implementation Notes

  • resolve ID references to actual ID objects
  • throw error if any of the IDs does not exist
  • change only those that have midpoints set
let trans: TransientFrame

for edge in edges {
    guard edge["midpoints"] != nil else {
        continue
    }
    var mutable = trans.mutate(edge.id)
    mutable["midpoints"] = nil
}
...
  • Commit only if there are changes

Contributor Guide