mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
clay,kiln,/mar/kelvin,/lib/pill: some fixes for pills; not done
This commit is contained in:
parent
5986fe67f5
commit
9b968edf75
@ -1,5 +1,6 @@
|
||||
:: |pill: helper functions for making pills
|
||||
::
|
||||
/$ weft-to-mime %kelvin %mime
|
||||
^?
|
||||
|%
|
||||
::
|
||||
@ -77,7 +78,9 @@
|
||||
=? hav ?=(^ fil.lon)
|
||||
:: XX this whitelist needs to be reviewed
|
||||
::
|
||||
?. ?= ?(%css %hoon %html %js %json %md %png %txt %udon %umd)
|
||||
?. ?= $? %css %hoon %html %js %json %md %png %txt
|
||||
%udon %umd %kelvin %bill %woff2
|
||||
==
|
||||
-.tyl
|
||||
::
|
||||
:: install only files with whitelisted marks
|
||||
@ -97,6 +100,15 @@
|
||||
[?(%md %txt) *]
|
||||
=/ dat .^(wain %cx pax)
|
||||
(as-octs:mimes:html (of-wain:format dat))
|
||||
::
|
||||
[%kelvin *]
|
||||
=/ weft ,[lal=@tas num=@ud] :: TODO remove after merge
|
||||
=/ dat .^(weft %cx pax)
|
||||
q:(weft-to-mime dat)
|
||||
::
|
||||
[%woff2 *]
|
||||
=/ dat .^(octs %cx pax)
|
||||
dat
|
||||
::
|
||||
*
|
||||
=/ dat .^(@t %cx pax)
|
||||
|
@ -1,20 +1,18 @@
|
||||
=> |%
|
||||
+$ kelvin [lal=@tas num=@ud]
|
||||
--
|
||||
|_ kel=kelvin
|
||||
=/ weft ,[lal=@tas num=@ud] :: TODO remove after merge
|
||||
|_ kel=weft
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/text/x-kelvin (as-octs:mimes:html hoon)]
|
||||
++ mime `^mime`[/text/x-kelvin (as-octs:mimes:html hoon)]
|
||||
++ noun kel
|
||||
++ hoon (crip "{<[lal num]:kel>}\0a")
|
||||
++ txt (to-wain:format hoon)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun kelvin
|
||||
++ noun weft
|
||||
++ mime
|
||||
|= [=mite len=@ud tex=@]
|
||||
!<(kelvin (slap !>(~) (ream tex)))
|
||||
!<(weft (slap !>(~) (ream tex)))
|
||||
--
|
||||
++ grad %noun
|
||||
--
|
||||
|
@ -1492,7 +1492,7 @@
|
||||
==
|
||||
:: find desk kelvin
|
||||
::
|
||||
=/ kel=[@tas @ud] (get-kelvin yoki)
|
||||
=/ kel=weft (get-kelvin yoki)
|
||||
?. |(=(%base syd) =(kel [%zuse zuse]))
|
||||
~>(%mean.|.(leaf/"clay: bad-kelvin, {<[need=zuse/zuse have=kel]>}") !!)
|
||||
::
|
||||
@ -1570,10 +1570,10 @@
|
||||
::
|
||||
++ get-kelvin
|
||||
|= =yoki
|
||||
;; weft
|
||||
^- weft
|
||||
|^ ?- -.yoki
|
||||
%|
|
||||
%- lobe-to-noun
|
||||
%- lobe-to-weft
|
||||
~> %mean.'clay: missing /sys/kelvin'
|
||||
(~(got by q.p.yoki) /sys/kelvin)
|
||||
::
|
||||
@ -1582,16 +1582,28 @@
|
||||
~> %mean.'clay: missing /sys/kelvin'
|
||||
(~(got by q.p.yoki) /sys/kelvin)
|
||||
?- -.fil
|
||||
%& q.p.fil
|
||||
%| (lobe-to-noun p.fil)
|
||||
%& (page-to-weft p.fil)
|
||||
%| (lobe-to-weft p.fil)
|
||||
==
|
||||
==
|
||||
++ lobe-to-noun
|
||||
++ lobe-to-weft
|
||||
|= =lobe
|
||||
=/ bob (lobe-to-blob:ze lobe)
|
||||
?- -.bob
|
||||
%direct q.q.bob
|
||||
%delta q.r.bob
|
||||
^- weft
|
||||
=/ =blob (lobe-to-blob:ze lobe)
|
||||
=/ =page
|
||||
?- -.blob
|
||||
%direct q.blob
|
||||
%delta r.blob
|
||||
==
|
||||
(page-to-weft page)
|
||||
++ page-to-weft
|
||||
|= =page
|
||||
^- weft
|
||||
?+ p.page ~|(clay-bad-kelvin-mark/p.page !!)
|
||||
%kelvin ;;(weft q.page)
|
||||
%mime
|
||||
=+ ;;(=mime q.page)
|
||||
!<(weft (slap !>(~) (ream q.q.mime)))
|
||||
==
|
||||
--
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user