cleaned up comments and lines over 80

This commit is contained in:
Isaac Visintainer 2018-09-06 17:31:06 -07:00
parent 6bf78803e7
commit 7e07a4d8e8

View File

@ -197,7 +197,7 @@
::
:: +poke-collections-action:
::
:: the main interface for creating and deleting collections and collections items
:: the main interface for creating and deleting collections and items
::
++ poke-collections-action
|= act=action:collections
@ -233,7 +233,9 @@
::
++ ta-this .
::
:: +ta-done: flop :moves for finalization, since moves are to the head of the list
:: +ta-done:
::
:: flop :moves for finalization, since moves are prepended to the list
::
++ ta-done [(flop moves) this]
::
@ -295,7 +297,8 @@
:: XX some of this is redunant
::
%collection
=/ perms .^([dict:clay dict:clay] %cp (weld sap /[dat]/collections-config))
=/ perms
.^([dict:clay dict:clay] %cp (weld sap /[dat]/collections-config))
?. (allowed-by src.bol +.perms)
ta-this
=/ conf=config
@ -316,7 +319,7 @@
:: restrict permissions on config file
=. ta-this
%^ ta-set-permissions (weld pax.a /[dat]/collections-config)
[%white ((set whom:clay) [[& src.bol] ~ ~])] :: read XX maybe open this?
[%white ((set whom:clay) [[& src.bol] ~ ~])] :: read
[%white ((set whom:clay) [[& src.bol] ~ ~])] :: write
:: open permissions on collection items
=. ta-this
@ -393,14 +396,14 @@
++ ta-insert-item
|= [new=item pax=path]
^+ ta-this
:: ~& insert+[-.new pax]
=/ parent-path (scag (dec (lent pax)) pax)
::
?- -.new
::
%collection
=. ta-this
(ta-hall-json parent-path 'new collection' (collection-notify pax meta.col.new))
%^ ta-hall-json parent-path 'new collection'
(collection-notify pax meta.col.new)
::
=. ta-this (ta-hall-create-circle pax description.meta.col.new)
=/ items=(list [nom=@ta =item]) ~(tap by data.col.new)
@ -410,10 +413,6 @@
$(items t.items)
::
%both
:: =. ta-this
:: (ta-hall-json parent-path 'new collection' (collection-notify pax meta.col.new))
:: =. ta-this
:: (ta-hall-json parent-path 'new item' (item-notify pax raw.new))
=. ta-this (ta-hall-create-circle pax description.meta.col.new)
=/ items=(list [nom=@ta =item]) ~(tap by data.col.new)
=. ta-this
@ -422,11 +421,6 @@
=. ta-this (ta-insert-item item.i.items (weld pax [nom.i.items ~]))
$(items t.items)
::
:: ?: ?& (~(has by meta.raw.new) %comments)
:: =('.y' (~(got by meta.raw.new) %comments))
:: ==
:: ~& insert-both-comments+pax
:: (ta-generate-comments pax)
ta-this
::
%raw
@ -443,7 +437,6 @@
++ ta-remove-item
|= [old=item pax=path]
^+ ta-this
:: ~& remove+[-.old pax]
:: flush permissions
:: notify parent of deletion
=/ parent (scag (dec (lent pax)) pax)
@ -452,7 +445,8 @@
::
%collection
=. ta-this
(ta-hall-json parent 'deleted collection' (collection-notify pax meta.col.old))
%^ ta-hall-json parent 'deleted collection'
(collection-notify pax meta.col.old)
=. ta-this (ta-flush-permissions (weld pax /collections-config))
=/ items=(list [nom=@ta =item]) ~(tap by data.col.old)
|-
@ -461,10 +455,6 @@
$(items t.items)
::
%both
:: =. ta-this
:: (ta-hall-json parent 'deleted collection' (collection-notify pax meta.col.old))
:: =. ta-this
:: (ta-hall-json parent 'deleted item' (item-notify pax raw.old))
=. ta-this (ta-flush-permissions pax)
=. ta-this (ta-flush-permissions (weld pax /collections-config))
=/ items=(list [nom=@ta =item]) ~(tap by data.col.old)
@ -487,7 +477,6 @@
::
|= [old=item new=item pax=path]
^+ ta-this
:: ~& update-item+[-.old -.new pax]
?: =(old new)
ta-this
::
@ -542,7 +531,6 @@
++ ta-update-raw-item
|= [old=raw-item new=raw-item pax=path]
^+ ta-this
:: ~& update-raw-item+[-.old -.new pax]
?: =(old new)
ta-this
::
@ -575,9 +563,6 @@
%+ update-umd-front
(~(put by meta.new) %last-modified (scot %da now.bol))
data.new
:: ~& %update-last-modified
:: ~& contents
:: ~& (weld pax /umd)
(ta-write (weld pax /umd) %umd !>(contents))
::
ta-this
@ -588,11 +573,11 @@
pax=path
==
^+ ta-this
:: ~& update-collection+pax
::
=? ta-this !=(meta.old meta.new)
=/ parent-path (scag (dec (lent pax)) pax)
(ta-hall-json parent-path 'edited collection' (collection-notify pax meta.new))
%^ ta-hall-json parent-path 'edited collection'
(collection-notify pax meta.new)
::
?: =(data.old data.new)
ta-this
@ -612,10 +597,6 @@
=/ del-old=(list [nom=knot =item]) ~(tap by del-old)
::
=/ lam |=([[a=knot item] out=(list path)] [(weld pax [a ~]) out])
:: ~& upd-new+(roll upd-new lam)
:: ~& upd-old+(roll upd-old lam)
:: ~& ins-new+(roll ins-new lam)
:: ~& del-old+(roll del-old lam)
::
=. ta-this |-
?~ upd-new
@ -725,10 +706,7 @@
?: =(nom.circ %c)
[our.bol %inbox]
(path-to-circle (scag (dec (lent pax)) pax))
:: ~& create+circ
:: ~& source+parent
%- ta-hall-actions
:: XX TODO make this depend on clay perms
:~ [%create nom.circ description %journal]
[%source nom.parent & (sy `source:hall`[circ ~] ~)]
==