OpenPoiesis/poietic-tool

Add reset-midpoints command

オープン

#1 opened on 2025/03/25

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Swift (1 件のフォーク)auto 404
enhancementgood first issue

Repository metrics

Stars
 (1 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド