mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 14:58:10 +03:00
Merge pull request #415 from joemfb/twit
some changes to get :twit working
This commit is contained in:
commit
8e75cbbf33
@ -195,11 +195,11 @@
|
||||
|= {usr/(unit user:eyre) req/(unit user:eyre)}
|
||||
?~(req & =(usr req))
|
||||
::
|
||||
:: .^(twit-feed %gx /=twit=/~/home/urbit_test)
|
||||
:: .^(twit-stat %gx /=twit=/~./post/0vv0old.0post.hash0.0000)
|
||||
++ peek
|
||||
|= {ren/care:clay pax/path} ^- (unit (unit gilt))
|
||||
?> ?=($x ren) :: others unsupported
|
||||
:: /+ twitter
|
||||
:: .^((list post:twitter) %gx /=twit=/home/urbit_test/twit-feed)
|
||||
:: .^(post:twitter %gx /=twit=/post/0vv0old.0post.hash0.0000/twit-feed)
|
||||
++ peek-x
|
||||
|= pax/path ^- (unit (unit gilt))
|
||||
=+ usr=`~. :: =^ usr pax (user-from-path pax)
|
||||
?. ?=(twit-path pax)
|
||||
~|([%missed-path pax] !!)
|
||||
@ -213,7 +213,7 @@
|
||||
++ peer-scry-x
|
||||
|= pax/path ^+ done
|
||||
:_ +>
|
||||
=+ pek=(peek %x pax)
|
||||
=+ pek=(peek-x pax)
|
||||
?^ pek
|
||||
?~ u.pek ~|(bad-scry+x+pax !!)
|
||||
~[[ost %diff u.u.pek] [ost %quit ~]]
|
||||
|
@ -11,4 +11,4 @@
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/knot msg/cord $~} $~}
|
||||
==
|
||||
[%twit-do [who %post eny msg]]
|
||||
[%twit-do [who %post `@uvI`(rsh 8 1 eny) msg]]
|
||||
|
@ -13,7 +13,7 @@
|
||||
|= $: {now/@da eny/@uvJ bek/beak}
|
||||
{{who/iden $~} typ/?($user $home)}
|
||||
==
|
||||
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]
|
||||
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]/twit-feed
|
||||
:- %tang
|
||||
%+ turn (flop .^((list post:twitter) %gx pax))
|
||||
|= post:twitter ^- tank
|
||||
|
@ -55,7 +55,7 @@
|
||||
|= {a/purl b/quay} ^- hiss
|
||||
=. b (quay:hep-to-cab b)
|
||||
=- [a %post - ?~(b ~ (some (as-octt +:(tail:en-purl:html b))))]
|
||||
(my content-type+['application/x-www-form-en-urlt:htmlncoded']~ ~)
|
||||
(my content-type+['application/x-www-form-urlencoded']~ ~)
|
||||
::
|
||||
::
|
||||
++ mean-wall !.
|
||||
|
@ -20,7 +20,7 @@
|
||||
|= {a/char b/(list @t)} ^- @t
|
||||
%+ rap 3
|
||||
?~ b ~
|
||||
|-(?~(t.b b [i.b a $(b t.b)]))
|
||||
|-(?~(t.b b [i.b a $(b t.b)]))
|
||||
::
|
||||
++ valve :: produce request
|
||||
|= {med/?($get $post) pax/path quy/quay}
|
||||
@ -87,9 +87,10 @@
|
||||
:~ id+ni
|
||||
user+(ot (fasp screen-name+(su user)) ~)
|
||||
(fasp created-at+(cu year (ci stud so)))
|
||||
text+(cu crip (su (star escp:de-xml))) :: parse html escapes
|
||||
:: parse html escapes and newlines
|
||||
text+(cu crip (su (star ;~(pose (just `@`10) escp:de-xml))))
|
||||
==
|
||||
++ usel
|
||||
++ usel
|
||||
=, ^?(dejs)
|
||||
%+ ce (list who/@ta)
|
||||
=- (ot users+(ar -) ~)
|
||||
@ -119,12 +120,12 @@
|
||||
(valve med (cowl pax +.a b))
|
||||
::
|
||||
++ lutt |=(@u `@t`(rsh 3 2 (scot %ui +<)))
|
||||
++ llsc
|
||||
++ llsc
|
||||
:: => args:reqs
|
||||
|= a/$@(scr (list scr)) ^- @t
|
||||
?@(a `@t`a (join ',' a))
|
||||
::
|
||||
++ llst
|
||||
++ llst
|
||||
|= a/$@(@t (list @t)) ^- @t
|
||||
?@(a `@t`a (join ',' a))
|
||||
::
|
||||
@ -135,7 +136,7 @@
|
||||
?@(a (lutt a) (join ',' (turn `(list tid)`a lutt)))
|
||||
::
|
||||
++ cowl :: handle parameters
|
||||
|= $: pax/path
|
||||
|= $: pax/path
|
||||
ban/(list param)
|
||||
quy/quay
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user