From c3df42bcd957c4c5589f389d2712ff379e6a01d0 Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Thu, 9 Aug 2018 11:26:53 -0700 Subject: [PATCH] filled out config stub and removed dummy collections --- mar/collections/config.hoon | 141 +++++++++++------------- web/collections/bar.collections-config | Bin 114 -> 0 bytes web/collections/blah.collections-config | Bin 96 -> 0 bytes web/collections/blah.umd | 4 - web/collections/foo.collections-config | Bin 114 -> 0 bytes web/collections/foo/moo.umd | 5 - web/collections/moo.umd | 5 - web/collections/readme.md | 5 - 8 files changed, 64 insertions(+), 96 deletions(-) delete mode 100644 web/collections/bar.collections-config delete mode 100644 web/collections/blah.collections-config delete mode 100644 web/collections/blah.umd delete mode 100644 web/collections/foo.collections-config delete mode 100644 web/collections/foo/moo.umd delete mode 100644 web/collections/moo.umd delete mode 100644 web/collections/readme.md diff --git a/mar/collections/config.hoon b/mar/collections/config.hoon index 119b7e075e..17d4e23d2a 100644 --- a/mar/collections/config.hoon +++ b/mar/collections/config.hoon @@ -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 -- diff --git a/web/collections/bar.collections-config b/web/collections/bar.collections-config deleted file mode 100644 index 9c291e6ac501f88cea4816c406a3a2ef36c7b699..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 114 zcmWgjVXxV;eOu9klZP0X7{H*VwoQm3L<-1e{$Tj+*s(A(x9Q)WnO!&f_AG5$8DB+G z;wOf<6}E5~bLG96j_T>cpvM$IkLOKul_Qy(5&V!Hb!JA;Ed8 N)Q6)t?wy;-1OPB&FKYk* diff --git a/web/collections/blah.collections-config b/web/collections/blah.collections-config deleted file mode 100644 index 9af969e7777bee1ccba6db11b00eb1eb8dc1735c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmWgjVXxV;eOu9klZP0X7{FlKG-qLk5Gf#=`GeuNW5>eG+@^nfW_I1^+q1N3Wqd!9 yauQ!K#3kqFCE0ky7wb)je<18zw&I|xKHYf`K diff --git a/web/collections/blah.umd b/web/collections/blah.umd deleted file mode 100644 index 6963cb6972..0000000000 --- a/web/collections/blah.umd +++ /dev/null @@ -1,4 +0,0 @@ -:- ~[comments+&] -;> - -this is blah.umd diff --git a/web/collections/foo.collections-config b/web/collections/foo.collections-config deleted file mode 100644 index e13d2b7de556c34b9f9bf18afc8ff4e1c166dd28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 114 zcmWgjVXxV;eOu9klZP0X7{I{lyp<3`h!l{`{K4?sv14IoZqvU#GrMl|?OEEiGQNtm z{PzrT$@w`ssmUdo`FWok%EQ&RB}%dXID7A2)QMBij-BOmfSA;<;d}s7gBLRcLxS^G NsSihQ+&edu2>={9FDn25 diff --git a/web/collections/foo/moo.umd b/web/collections/foo/moo.umd deleted file mode 100644 index 34db3097f4..0000000000 --- a/web/collections/foo/moo.umd +++ /dev/null @@ -1,5 +0,0 @@ -;> - -this is moo.umd - -no comments diff --git a/web/collections/moo.umd b/web/collections/moo.umd deleted file mode 100644 index 34db3097f4..0000000000 --- a/web/collections/moo.umd +++ /dev/null @@ -1,5 +0,0 @@ -;> - -this is moo.umd - -no comments diff --git a/web/collections/readme.md b/web/collections/readme.md deleted file mode 100644 index 1f3c0b6565..0000000000 --- a/web/collections/readme.md +++ /dev/null @@ -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.