Document node-diary-diff con

This commit is contained in:
bonbud-macryg 2024-06-05 16:01:56 +01:00
parent 7dd1037879
commit 318c659297

View File

@ -1,11 +1,16 @@
/@ node
/@ diary-diff
/@ node :: manx
/@ diary-diff :: ?([%put-entry id=@da txt=@t] [%del-entry id=@da])
:: import /lib/manx-utils
/- manx-utils
:: declare that this is a conversion from a
:: dynamic XML node to diary-diff
:- [%node %$ %diary-diff]
|= nod=node
^- diary-diff
=/ mu ~(. manx-utils nod)
:: extract head, id, and text atttributes from XML node
=/ head (@tas (got:mu %head))
=/ id (slav %da (vol:mu "id"))
=/ text (vol:mu "text")
:: construct the diary-diff
[%put-entry id text]