filled out config stub and removed dummy collections

This commit is contained in:
Isaac Visintainer 2018-08-09 11:26:53 -07:00
parent 7c7084216b
commit c3df42bcd9
8 changed files with 64 additions and 96 deletions

View File

@ -2,6 +2,7 @@
:::: /hoon/config/collection/mar
::
/+ collections
!:
|_ con=config:collections
::
::
@ -9,88 +10,74 @@
|%
++ mime
:- /text/x-collection-config
(as-octs:mimes:html (jam con))
:: ++ txt
:: |^
:: ^- (list @t)
:: ;: weld
:: ::
:: :~ (cat 3 'name: ' goodname.con)
:: (cat 3 'owner: ' (scot %p owner.con))
:: (cat 3 'date-created: ' (scot %da date-created.con))
:: (cat 3 'last-modified: ' (scot %da last-modified.con))
:: (cat 3 'comments: ' ?:(comments.con 'y' 'n'))
:: ==
:: ::
:: ?~ sort-key.con ~
:: [(cat 3 'sort-key: ' (scot %ud u.sortkey.con)) ~]
:: ::
:: :- 'config-permissions:'
:: (rules-to-txt r.config-permissions.con w.config-permissions.con)
:: ::
:: :- 'content-permissions:'
:: (rules-to-txt r.content-permissions.con w.content-permissions.con)
:: ::
:: ==
:: ++ rules-to-txt
:: |= [r=rule:clay w=rule:clay]
:: ^- (list @t)
:: ;: weld
:: ::
:: :* (cat 3 ' read: ' mod.r)
:: %+ turn ~(tap by who.r)
:: |= hoe=whom:clay
:: ?- -.hoe
:: %& (cat 3 ' ' (scot %p +.hoe))
:: %| (cat 3 ' ' +.hoe)
:: ==
:: ==
:: ::
:: [' ==' ~]
:: ::
:: :* (cat 3 ' write: ' mod.w)
:: %+ turn ~(tap by who.w)
:: |= hoe=whom:clay
:: ?- -.hoe
:: %& (cat 3 ' ' (scot %p +.hoe))
:: %| (cat 3 ' ' +.hoe)
:: ==
:: ==
:: ::
:: [' ==' ~]
:: ==
:: --
(as-octs:mimes:html (of-wain:format txt))
++ txt
^- wain
::
:~ (cat 3 'full-path: ' (spat (en-beam:format full-path.con)))
(cat 3 'name: ' name.con)
(cat 3 'description: ' description.con)
::
(cat 3 'owner: ' (scot %p owner.con))
::
(cat 3 'date-created: ' (scot %da date-created.con))
(cat 3 'last-modified: ' (scot %da last-modified.con))
::
(cat 3 'type: ' type.con)
(cat 3 'comments: ' ?:(comments.con 'y' 'n'))
(cat 3 'sort-key: ' ?~(sort-key.con '~' (scot %ud u.sort-key.con)))
(cat 3 'visible: ' ?:(visible.con 'y' 'n'))
==
--
++ grab
|%
++ mime
|= [mite:eyre p=octs:eyre]
((hard config:collections) (cue q.p))
:: ++ txt
:: |= txs=(list @t)
:: ?> ?= $: name=@t
:: owner=@t
:: dc=@t
:: lm=@t
:: com=@t
:: res=(lest @t)
:: ==
:: txs
:: ::
:: =/ top
:: :* (rash name.txs ;~(pfix (jest 'name: ') (cook crip (star next))))
:: (rash owner.txs ;~(pfix (jest 'owner: ~') (fed:ag)))
:: (rash dc.txs ;~(pfix (jest 'date-created: ~') (cook |=(a=^ +.a) crub:so)))
:: (rash lm.txs ;~(pfix (jest 'last-modified: ~') (cook |=(a=^ +.a) crub:so)))
:: (rash com.txs ;~(pfix (jest 'comments: ') (flag %y %n)))
:: ==
(txt (to-wain:format q.p))
++ txt
|= txs=(pole @t)
^- config:collections
?> ?= $: full-path=@t
name=@t
desc=@t
owner=@t
dc=@t
lm=@t
type=@t
com=@t
sk=@t
vis=@t
~
==
txs
::
%- (hard config:collections)
:* %- need
%+ rash full-path.txs
;~ pfix (jest 'full-path: ')
%+ cook de-beam:format
;~(pfix fas (more fas urs:ab))
==
::
(rash name.txs ;~(pfix (jest 'name: ') (cook crip (star next))))
::
(rash desc.txs ;~(pfix (jest 'description: ') (cook crip (star next))))
::
(rash owner.txs ;~(pfix (jest 'owner: ~') fed:ag))
::
(rash dc.txs ;~(pfix (jest 'date-created: ~') (cook |=(a=^ +.a) crub:so)))
::
(rash lm.txs ;~(pfix (jest 'last-modified: ~') (cook |=(a=^ +.a) crub:so)))
::
(rash type.txs ;~(pfix (jest 'type: ') (cook crip (star next))))
::
(rash com.txs ;~(pfix (jest 'comments: ') (flag %y %n)))
::
(rush sk.txs ;~(pfix (jest 'sort-key: ') dem:ag))
::
(rash vis.txs ;~(pfix (jest 'visible: ') (flag %y %n)))
==
++ noun config:collections
--
++ grad %mime
++ grad %txt
--

View File

@ -1,4 +0,0 @@
:- ~[comments+&]
;>
this is blah.umd

View File

@ -1,5 +0,0 @@
;>
this is moo.umd
no comments

View File

@ -1,5 +0,0 @@
;>
this is moo.umd
no comments

View File

@ -1,5 +0,0 @@
# Collections
A thin layer for managing file-system-based content, like blogs, forums and notes. Sends notifications using `hall`.
Very much in development. Not even functional yet.