Skip to content

Commit

Permalink
fixes for JSON errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AGrillenberger committed Jun 9, 2022
1 parent f02892a commit d51fd3a
Showing 1 changed file with 72 additions and 9 deletions.
81 changes: 72 additions & 9 deletions snap/SnapTwitter/st2-blocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,61 @@
</script>
</block-definition>
<block-definition s="🐦 attribute %&apos;attrib&apos; from tweet %&apos;tw&apos;" type="reporter" category="twitter">
<header></header><code></code><translations>de:🐦Attribut _ von Tweet _&#xD;</translations><inputs><input type="%s"></input><input type="%obj"></input></inputs><script><block s="doDeclareVariables"><list><l>attribs</l><l>res</l></list></block><block s="doSetVar"><l>attribs</l><block s="reportTextSplit"><block var="attrib"/><l>.</l></block></block><block s="doSetVar"><l>res</l><custom-block s="🐦 tweet %obj as table"><block var="tw"/></custom-block></block><block s="doUntil"><block s="reportEquals"><block s="reportListLength"><block var="attribs"/></block><l>0</l></block><script><block s="doSetVar"><l>res</l><block s="reportListItem"><l>2</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><block var="attribs"/></block></block></autolambda><list></list></block><block var="res"/></block></block></block><block s="doDeleteFromList"><l>1</l><block var="attribs"/></block></script></block><block s="doReport"><block var="res"/></block></script>
<header></header><code></code><translations>de:🐦Attribut _ von Tweet _&#xD;</translations><inputs><input type="%s"></input><input type="%obj"></input></inputs><script>
<block s="doDeclareVariables">
<list>
<l>attribs</l>
<l>res</l>
</list>
</block>
<block s="doSetVar">
<l>attribs</l>
<block s="reportTextSplit"><block var="attrib"/>
<l>.</l>
</block>
</block>
<block s="doSetVar">
<l>res</l>
<custom-block s="🐦 tweet %obj as table"><block var="tw"/></custom-block>
</block>
<block s="doIf">
<block s="reportEquals"><block var="res"/>
<l></l>
</block>
<script>
<block s="doReport"><block var="res"/></block>
</script>
</block>
<block s="doUntil">
<block s="reportEquals">
<block s="reportListLength"><block var="attribs"/></block>
<l>0</l>
</block>
<script>
<block s="doSetVar">
<l>res</l>
<block s="reportListItem">
<l>2</l>
<block s="reportFindFirst">
<block s="reifyPredicate">
<autolambda>
<block s="reportEquals">
<block s="reportListItem">
<l>1</l><l/></block>
<block s="reportListItem">
<l>1</l><block var="attribs"/></block>
</block>
</autolambda>
<list></list>
</block><block var="res"/></block>
</block>
</block>
<block s="doDeleteFromList">
<l>1</l><block var="attribs"/></block>
</script>
</block>
<block s="doReport"><block var="res"/></block>
</script>
</block-definition>
<block-definition s="🐦 geo of tweet %&apos;tweet&apos;" type="reporter" category="twitter">
<header></header><code></code><translations>de:🐦Geodaten von Tweet _&#xD;</translations><inputs><input type="%obj"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportEquals"><custom-block s="🐦 attribute %s from tweet %obj"><l>geo</l><block var="tweet"/></custom-block><l></l></block></block><script><block s="doReport"><block s="reportCombine"><custom-block s="🐦 attribute %s from tweet %obj"><l>geo.coordinates</l><block var="tweet"/></custom-block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><block var="#1"/><l>;</l><block var="#2"/></list></block></autolambda><list><l>#1</l><l>#2</l></list></block></block></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><custom-block s="🐦 attribute %s from tweet %obj"><l>place</l><block var="tweet"/></custom-block><l></l></block></block><script><block s="doDeclareVariables"><list><l>corners</l></list></block><block s="doSetVar"><l>corners</l><block s="reportListItem"><l>1</l><custom-block s="🐦 attribute %s from tweet %obj"><l>place.bounding_box.coordinates</l><block var="tweet"/></custom-block></block></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportQuotient"><block s="reportSum"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="corners"/></block></block><block s="reportListItem"><l>2</l><block s="reportListItem"><l>3</l><block var="corners"/></block></block></block><l>2</l></block><l>;</l><block s="reportQuotient"><block s="reportSum"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="corners"/></block></block><block s="reportListItem"><l>1</l><block s="reportListItem"><l>3</l><block var="corners"/></block></block></block><l>2</l></block></list></block></block></script></block><block s="doReport"><l></l></block></script>
Expand All @@ -760,15 +814,24 @@
<input type="%obj"></input>
</inputs>
<script>
<block s="doWarp">
<block s="doWarp">
<script>
<block s="doIf">
<block s="reportGreaterThan">
<block s="reportStringSize"><block var="t"/></block>
<l>1</l>
</block>
<script>
<block s="doReport">
<custom-block s="listify %s">
<block var="t"/>
</custom-block>
</block>
<block s="doReport">
<custom-block s="listify %s"><block var="t"/></custom-block>
</block>
</script>
</block>
</block>
<block s="doReport">
<l></l>
</block>
</script>
</block>
</script>
</block-definition>
<block-definition s="🐦 for each %&apos;🐦 tweet&apos; %&apos;cmd&apos;" type="command" category="twitter">
Expand Down Expand Up @@ -1248,4 +1311,4 @@
<block-definition s="🐦tweet list %&apos;list&apos; as table" type="reporter" category="twitter">
<header></header><code></code><translations>de:🐦Tweetliste _ als Tabelle&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>attribs</l><l>return</l></list></block><block s="doSetVar"><l>attribs</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>tweet</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><l/></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="🐦 tweet %obj as table"><l/></custom-block></autolambda><list></list></block><block var="list"/></block></block><script><block s="doForEach"><l>attrib</l><block var="tweet"/><script><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block var="attribs"/><block var="attrib"/></block></block><script><block s="doAddToList"><block var="attrib"/><block var="attribs"/></block></script></block></script></block></script></block><block s="doSetVar"><l>return</l><block s="reportNewList"><list><block var="attribs"/></list></block></block><block s="doForEach"><l>tweet</l><block var="list"/><script><block s="doDeclareVariables"><list><l>tweetAsList</l></list></block><block s="doSetVar"><l>tweetAsList</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>attrib</l><block var="attribs"/><script><block s="doAddToList"><custom-block s="🐦 attribute %s from tweet %obj"><block var="attrib"/><block var="tweet"/></custom-block><block var="tweetAsList"/></block></script></block><block s="doAddToList"><block var="tweetAsList"/><block var="return"/></block></script></block><block s="doReport"><block var="return"/></block></script>
</block-definition>
</blocks>
</blocks>

0 comments on commit d51fd3a

Please sign in to comment.