shrub/pkg/arvo/mar/publish/info.hoon

59 lines
1.6 KiB
Plaintext
Raw Normal View History

::
2019-07-12 01:07:05 +03:00
:::: /hoon/info/publish/mar
2020-10-19 09:11:06 +03:00
:: tombstoned, now unused
::
2019-12-14 01:27:37 +03:00
/- *publish
!:
2019-12-14 01:27:37 +03:00
|_ info=notebook-info
::
::
++ grab
|%
++ mime
|= [mite p=octs]
2020-01-21 21:48:22 +03:00
|^ (rash q.p both-parser)
++ key-val
|* [key=rule val=rule]
;~(sfix ;~(pfix key val) gaq)
++ old-parser
;~ plug
(key-val (jest 'owner: ~') fed:ag)
(key-val (jest 'title: ') (cook crip (star prn)))
2020-01-21 21:48:22 +03:00
(key-val (jest 'filename: ') sym)
%+ key-val (jest 'comments: ')
;~(pose (jest %open) (jest %closed) (jest %none))
%+ key-val (jest 'allow-edit: ')
;~(pose (jest %post) (jest %comment) (jest %all) (jest %none))
(key-val (jest 'date-created: ~') (cook year when:so))
;~ pose
(key-val (jest 'last-modified: ~') (cook year when:so))
;~(pfix (jest 'last-modified: ~') (cook year when:so))
2019-12-14 01:27:37 +03:00
==
2020-01-21 21:48:22 +03:00
==
++ new-parser
;~ plug
(key-val (jest 'title: ') (cook crip (star prn)))
(key-val (jest 'description: ') (cook crip (star prn)))
2020-01-21 21:48:22 +03:00
%+ key-val (jest 'comments: ')
(cook |=(a=@ =(%on a)) ;~(pose (jest %on) (jest %off)))
2020-05-28 14:58:18 +03:00
(key-val (jest 'writers: ') ;~(pfix fas (more fas urs:ab)))
2020-01-21 21:48:22 +03:00
;~ pose
2020-05-28 14:58:18 +03:00
(key-val (jest 'subscribers: ') ;~(pfix fas (more fas urs:ab)))
;~(pfix (jest 'subscribers: ') ;~(pfix fas (more fas urs:ab)))
2020-01-21 21:48:22 +03:00
==
==
++ both-parser
;~ pose
new-parser
%+ cook
|= [@ title=@t @ comments=@ *]
^- notebook-info
[title '' =('open' comments) / /]
old-parser
==
--
2019-12-14 01:27:37 +03:00
++ noun notebook-info
--
++ grad %mime
--