A monorepo containing jupyter-blocks and jupyter-tidyblocks. Blockly extension for JupyterLab.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added examples and docs

Denisa f0debb17 44470a07

+305
+2
.eslintignore
··· 10 10 .github 11 11 binder 12 12 jupyterlab_blockly/labextension 13 + docs 14 + examples 13 15 .eslintignore 14 16 .eslintrc.js 15 17 .gitignore
+20
docs/Makefile
··· 1 + # Minimal makefile for Sphinx documentation 2 + # 3 + 4 + # You can set these variables from the command line, and also 5 + # from the environment for the first two. 6 + SPHINXOPTS ?= 7 + SPHINXBUILD ?= sphinx-build 8 + SOURCEDIR = . 9 + BUILDDIR = _build 10 + 11 + # Put it first so that "make" without argument is like "make help". 12 + help: 13 + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 + 15 + .PHONY: help Makefile 16 + 17 + # Catch-all target: route all unknown targets to Sphinx using the new 18 + # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 + %: Makefile 20 + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs/_static/BlocklyOverview.png

This is a binary file and will not be displayed.

docs/_static/OverviewBlockly.gif

This is a binary file and will not be displayed.

docs/_static/changeKernel.png

This is a binary file and will not be displayed.

docs/_static/openBlocklyEditor.png

This is a binary file and will not be displayed.

docs/_static/openFromLauncher.png

This is a binary file and will not be displayed.

docs/_static/selectKernel.png

This is a binary file and will not be displayed.

docs/_static/shortBlocklyDemo.gif

This is a binary file and will not be displayed.

docs/_static/toolboxSwitch.png

This is a binary file and will not be displayed.

docs/_static/toolboxView.gif

This is a binary file and will not be displayed.

+7
docs/blockly_editor.md
··· 1 + # Blockly Editor 2 + 3 + The Blockly editor is mainly composed of two elements: the **toolbox**, situated on the left side of the screen and composed of all the available blocks organised in categories, and the **workspace**, a canvas where you can drag and drop the the chosen blocks for your code. 4 + 5 + ![Blockly Demo](_static/shortBlocklyDemo.gif) 6 + 7 + Once you think your code is ready you can press the **Run** button, found in the upper-left corner. The generated code in the chosen programming language will appear at the bottom of the screen in a Juypter code cell, along with the output.
+13
docs/blockly_files.md
··· 1 + # Blockly Files 2 + 3 + ## Open from Launcher 4 + 5 + You can easily open a new Blockly editor directly from the launcher. 6 + 7 + ![Open editor from Laucnher](_static/openFromLauncher.png) 8 + 9 + ## Open a .jpblockly file 10 + 11 + To open a file you have previously worked in the Blockly editor you can easily right click on the file and select "Open With" > "Blockly Editor". 12 + 13 + ![Right click open editor](_static/openBlocklyEditor.png)
+59
docs/conf.py
··· 1 + # Configuration file for the Sphinx documentation builder. 2 + # 3 + # This file only contains a selection of the most common options. For a full 4 + # list see the documentation: 5 + # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 + 7 + # -- Path setup -------------------------------------------------------------- 8 + 9 + # If extensions (or modules to document with autodoc) are in another directory, 10 + # add these directories to sys.path here. If the directory is relative to the 11 + # documentation root, use os.path.abspath to make it absolute, like shown here. 12 + # 13 + # import os 14 + # import sys 15 + # sys.path.insert(0, os.path.abspath('.')) 16 + 17 + import sphinx_rtd_theme 18 + 19 + # -- Project information ----------------------------------------------------- 20 + 21 + project = 'jupyterlab-blockly' 22 + copyright = '2022, Denisa Checiu' 23 + author = 'Denisa Checiu' 24 + 25 + # The full version, including alpha/beta/rc tags 26 + release = '0.1.0' 27 + 28 + 29 + # -- General configuration --------------------------------------------------- 30 + 31 + # Add any Sphinx extension module names here, as strings. They can be 32 + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 33 + # ones. 34 + extensions = [ 35 + 'myst_parser', 36 + 'sphinx.ext.autodoc', 37 + 'sphinx.ext.napoleon', 38 + ] 39 + 40 + # Add any paths that contain templates here, relative to this directory. 41 + templates_path = ['_templates'] 42 + 43 + # List of patterns, relative to source directory, that match files and 44 + # directories to ignore when looking for source files. 45 + # This pattern also affects html_static_path and html_extra_path. 46 + exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 47 + 48 + 49 + # -- Options for HTML output ------------------------------------------------- 50 + 51 + # The theme to use for HTML and HTML Help pages. See the documentation for 52 + # a list of builtin themes. 53 + html_theme = 'sphinx_rtd_theme' 54 + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 55 + 56 + # Add any paths that contain custom static files (such as style sheets) here, 57 + # relative to this directory. They are copied after the builtin static files, 58 + # so a file named "default.css" will overwrite the builtin "default.css". 59 + # html_static_path = ['_static']
+7
docs/examples.md
··· 1 + # Examples 2 + 3 + - logic 4 + - loops 5 + - lists_texts 6 + - variables 7 + - functions
+35
docs/index.rst
··· 1 + .. jupyterlab-blockly documentation master file, created by 2 + sphinx-quickstart on Tue Jul 12 16:36:37 2022. 3 + You can adapt this file completely to your liking, but it should at least 4 + contain the root `toctree` directive. 5 + 6 + Welcome to jupyterlab-blockly's documentation! 7 + ================================================= 8 + 9 + This JupyterLab extension brings block-based programming directly to your web browser. You can easily use the JupyterLab-Blockly editor and choose from a wide selections of blocks to start coding, see the output of your code and, most importantly, visualize the code transformed in the chosen classical programming language. 10 + 11 + .. image:: _static/OverviewBlockly.gif 12 + :alt: Functionality of extension 13 + 14 + .. toctree:: 15 + :maxdepth: 2 16 + :caption: Contents: 17 + 18 + installation 19 + 20 + .. toctree:: 21 + :maxdepth: 2 22 + :caption: Usage: 23 + 24 + blockly_files 25 + blockly_editor 26 + kernels 27 + toolbox 28 + examples 29 + 30 + Indices and tables 31 + ================== 32 + 33 + * :ref:`genindex` 34 + * :ref:`modindex` 35 + * :ref:`search`
+81
docs/installation.md
··· 1 + # Installation 2 + 3 + ## Requirements 4 + 5 + - JupyterLab == 3.4 6 + 7 + ## Install 8 + 9 + To install the extension, execute: 10 + 11 + ```bash 12 + micromamba create -n blockly -c conda-forge python jupyterlab==3.4 ipykernel xeus-python xeus-lua jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR 13 + micromamba activate blockly 14 + pip install jupyterlab_blockly 15 + ``` 16 + 17 + ### Kernels 18 + 19 + - ipykernel 20 + - xeus-python 21 + - xeus-lua 22 + - [JavaScript](https://github.com/n-riesco/ijavascript#installation) 23 + - [JavaScript](https://github.com/yunabe/tslab) 24 + 25 + ## Uninstall 26 + 27 + To remove the extension, execute: 28 + 29 + ```bash 30 + pip uninstall jupyterlab_blockly 31 + ``` 32 + 33 + ## Development install 34 + 35 + **Note:** You will need NodeJS to build the extension package. 36 + 37 + The `jlpm` command is JupyterLab's pinned version of 38 + [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use 39 + `yarn` or `npm` in lieu of `jlpm` below. 40 + 41 + ```bash 42 + micromamba create -n blockly -c conda-forge python nodejs pre-commit yarn jupyterlab==3.4 jupyter-packaging jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua 43 + micromamba activate blockly 44 + # Clone the repo to your local environment 45 + # Change directory to the jupyterlab_blockly directory 46 + # Install package in development mode 47 + pip install -e . 48 + # Installing pre-commit to run command when adding commits 49 + pre-commit install 50 + # Link your development version of the extension with JupyterLab 51 + jupyter labextension develop . --overwrite 52 + # Rebuild extension Typescript source after making changes 53 + jlpm run build 54 + ``` 55 + 56 + You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension. 57 + 58 + ```bash 59 + # Watch the source directory in one terminal, automatically rebuilding when needed 60 + jlpm watch 61 + # Run JupyterLab in another terminal 62 + jupyter lab 63 + ``` 64 + 65 + With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt). 66 + 67 + By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command: 68 + 69 + ```bash 70 + jupyter lab build --minimize=False 71 + ``` 72 + 73 + ## Development uninstall 74 + 75 + ```bash 76 + pip uninstall jupyterlab_blockly 77 + ``` 78 + 79 + In development mode, you will also need to remove the symlink created by `jupyter labextension develop` 80 + command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions` 81 + folder is located. Then you can remove the symlink named `jupyterlab-blockly` within that folder.
+27
docs/kernels.md
··· 1 + # Kernels 2 + 3 + The JuypterLab-Blockly extension uses Jupyter kernels for the execution of the generated code. 4 + 5 + ## Kernel Selection 6 + 7 + When you open a file in the Blockly editor, you will be propted to choose your preferred kernel. At the moment, you can choose between : 8 + 9 + - ipykernel 10 + - xeus-python 11 + - xeus-lua 12 + - [JavaScript](https://github.com/n-riesco/ijavascript#installation) 13 + - [JavaScript](https://github.com/yunabe/tslab) 14 + 15 + <p align="center"> 16 + <img src="_static/selectKernel.png" alt="Kernel Selection"/> 17 + </p> 18 + 19 + This will only be your initial kernel selection, as you can always change it to another one after you open the file. 20 + 21 + ## Changing Kernels 22 + 23 + If you wish to switch to another kernel, you have the freedom to do it at any point, by clicking on the drop down menu situated at the upper-right corner of the Blockly editor. 24 + 25 + ![Change Kernels](_static/changeKernel.png) 26 + 27 + Once you have made your new selection, your code will automatically be executed using the new kernel, as such also rendering the code in its respective programming langauage.
+35
docs/make.bat
··· 1 + @ECHO OFF 2 + 3 + pushd %~dp0 4 + 5 + REM Command file for Sphinx documentation 6 + 7 + if "%SPHINXBUILD%" == "" ( 8 + set SPHINXBUILD=sphinx-build 9 + ) 10 + set SOURCEDIR=. 11 + set BUILDDIR=_build 12 + 13 + %SPHINXBUILD% >NUL 2>NUL 14 + if errorlevel 9009 ( 15 + echo. 16 + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 + echo.installed, then set the SPHINXBUILD environment variable to point 18 + echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 + echo.may add the Sphinx directory to PATH. 20 + echo. 21 + echo.If you don't have Sphinx installed, grab it from 22 + echo.https://www.sphinx-doc.org/ 23 + exit /b 1 24 + ) 25 + 26 + if "%1" == "" goto help 27 + 28 + %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 + goto end 30 + 31 + :help 32 + %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 + 34 + :end 35 + popd
+1
docs/requirements.txt
··· 1 + myst_parser==0.18.0
+13
docs/toolbox.md
··· 1 + # Toolbox 2 + 3 + The toolbox, a main element of the Blockly editor, is situated on the left side of the screen. It encompasses all available blocks, organized in categories for easier access. 4 + 5 + <p align="center"> 6 + <img src="_static/toolboxView.gif" alt="Toolbox View"/> 7 + </p> 8 + 9 + ## Switching to another toolbox 10 + 11 + If you have installed or created another extension, on top of the JupyterLab-Blockly extension, which includes a new tooolbox, you can switch to it by simply pressing the drop down menu on the upper-right corner. 12 + 13 + ![Switch Toolbox](_static/toolboxSwitch.png)
+1
examples/example.jpblockly
··· 1 + {"blocks":{"languageVersion":0,"blocks":[{"type":"controls_for","id":"DbxC|~,E8c.ptwuz7.Jw","x":156,"y":130,"fields":{"VAR":{"id":"Vx{g)Xk3{GqsyX3!t[?I"}},"inputs":{"FROM":{"shadow":{"type":"math_number","id":"V~$2*{r+ZGT^hLlOj-^H","fields":{"NUM":1}}},"TO":{"shadow":{"type":"math_number","id":"igFD.X}32j~cjd:.m1yl","fields":{"NUM":10}}},"BY":{"shadow":{"type":"math_number","id":"cR$r^7`0LvUkd{mz6l49","fields":{"NUM":1}}},"DO":{"block":{"type":"text_print","id":"oj$4U8.E6.EK{U!t2hz-","inputs":{"TEXT":{"shadow":{"type":"text","id":"$GkN.o@,4h}tOz3`F74r","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"O.,VE3jo`f2bM9`ec9Q{","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"rC-Q@8Bl7Le$tp8=G|-4","fields":{"VAR":{"id":"Vx{g)Xk3{GqsyX3!t[?I"}}}},"ADD1":{"block":{"type":"text","id":"Qr(|YW,uR`O0X94MH]6n","fields":{"TEXT":" Hello, Blockly!"}}}}}}}}}}}]},"variables":[{"name":"i","id":"Vx{g)Xk3{GqsyX3!t[?I"},{"name":"j","id":"[#Z+}_Jp2dw?T6O8G{Cc"}]}
+1
examples/functions.jpblockly
··· 1 + {"blocks":{"languageVersion":0,"blocks":[{"type":"procedures_defreturn","id":"%8PNf28db!8zx+dd?%ji","x":675,"y":61,"extraState":{"params":[{"name":"x","id":"q0cacp9:z4~OoAPJD;,C"},{"name":"y","id":"CW(vE:rK%t[x6D3u2o^E"}]},"icons":{"comment":{"text":"Given two colors blend them together and return the new color.","pinned":false,"height":80,"width":160}},"fields":{"NAME":"blend colors"},"inputs":{"STACK":{"block":{"type":"variables_set","id":"yhtLWu1UAK8q6UnM42:*","fields":{"VAR":{"id":"^g2Uj9MfJG$l7y429CXC"}},"inputs":{"VALUE":{"block":{"type":"colour_blend","id":"Z[NU~CekM,dcy6s5g`jT","inputs":{"COLOUR1":{"shadow":{"type":"colour_picker","id":"MJcF7laq2[($byO:zY!z","fields":{"COLOUR":"#ff0000"}},"block":{"type":"variables_get","id":"IEN9YD}{-#M]pHAlxx.$","fields":{"VAR":{"id":"q0cacp9:z4~OoAPJD;,C"}}}},"COLOUR2":{"shadow":{"type":"colour_picker","id":"8qEW3`30@u!4gVyBaLDX","fields":{"COLOUR":"#ffffff"}},"block":{"type":"variables_get","id":"~K:*1w)X0sk*I0VLYQHr","fields":{"VAR":{"id":"CW(vE:rK%t[x6D3u2o^E"}}}},"RATIO":{"shadow":{"type":"math_number","id":"N?$vgO28idfY^ot|B2Gf","fields":{"NUM":0.5}}}}}}}}},"RETURN":{"block":{"type":"variables_get","id":"U_JpRYt5d|/CIoPllP1g","fields":{"VAR":{"id":"^g2Uj9MfJG$l7y429CXC"}}}}}},{"type":"variables_set","id":",kwuc=NJCZ@[bAACvz*|","x":-3,"y":76,"fields":{"VAR":{"id":"Hfm;!%[BIJL%q3lMPG+C"}},"inputs":{"VALUE":{"block":{"type":"colour_random","id":"CbbTVSYni`e*:?x?rmlV"}}},"next":{"block":{"type":"variables_set","id":"#jL#GO%p{@PE}!AjShPo","fields":{"VAR":{"id":"Ha!q|23ni|13^3=2}4!q"}},"inputs":{"VALUE":{"block":{"type":"colour_random","id":"7DV=;7eTBYT[:gu-LjE7"}}},"next":{"block":{"type":"text_print","id":"y-JhP(a9@pY?WfnS@F!q","inputs":{"TEXT":{"shadow":{"type":"text","id":"+ENEt4:6#@7zoKnQWfi`","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"i_u9:RFgY`,HeN!2[NXt","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"!q/c.uj`^4rimA,zLirP","fields":{"TEXT":"Initial colors: "}}},"ADD1":{"block":{"type":"text_join","id":"m3UhYbtgIc3q,vsAs4Mp","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"vChfBN5W]+gN1bF5m{{D","fields":{"VAR":{"id":"Hfm;!%[BIJL%q3lMPG+C"}}}},"ADD1":{"block":{"type":"text_join","id":"GIwKm=BD=H;uFtL0kpN/","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"lx{9H+ej.BL)_,nno[se","fields":{"TEXT":" and "}}},"ADD1":{"block":{"type":"variables_get","id":"|3!]gyVuu,SWNg-Ej2UQ","fields":{"VAR":{"id":"Ha!q|23ni|13^3=2}4!q"}}}}}}}}}}}}}},"next":{"block":{"type":"text_print","id":"!9GpxWxAuFu}RXlKwwKU","inputs":{"TEXT":{"shadow":{"type":"text","id":"+ENEt4:6#@7zoKnQWfi`","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"^O7k|#/QVw64tkQzE,jL","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"g8*hkX]y2W1DtmOG{YDt","fields":{"TEXT":"Blended color: "}}},"ADD1":{"block":{"type":"procedures_callreturn","id":"a=?]IhVl5[)h`)efB^2K","extraState":{"name":"blend colors","params":["x","y"]},"inputs":{"ARG0":{"block":{"type":"variables_get","id":";lny}q%LI*45*$Vwu/7a","fields":{"VAR":{"id":"Hfm;!%[BIJL%q3lMPG+C"}}}},"ARG1":{"block":{"type":"variables_get","id":"HaW6U=VZzQLn-:}KbLB[","fields":{"VAR":{"id":"Ha!q|23ni|13^3=2}4!q"}}}}}}}}}}}}}}}}}}]},"variables":[{"name":"color_1","id":"Hfm;!%[BIJL%q3lMPG+C"},{"name":"x","id":"q0cacp9:z4~OoAPJD;,C"},{"name":"y","id":"CW(vE:rK%t[x6D3u2o^E"},{"name":"color_2","id":"Ha!q|23ni|13^3=2}4!q"},{"name":"blend","id":"^g2Uj9MfJG$l7y429CXC"}]}
+1
examples/logic.jpblockly
··· 1 + {"blocks":{"languageVersion":0,"blocks":[{"type":"variables_set","id":"wDLmZpk=o.zPiheeW[p`","x":246,"y":12,"fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}},"inputs":{"VALUE":{"block":{"type":"math_random_int","id":"h9xU-=1(!g=]rwgqMn#g","inputs":{"FROM":{"shadow":{"type":"math_number","id":"VuFp,ptuc^ZKIJV5.a#J","fields":{"NUM":1}}},"TO":{"shadow":{"type":"math_number","id":"nm+[7uotKw@wESwLa_PB","fields":{"NUM":100}}}}}}},"next":{"block":{"type":"controls_if","id":"BUoR?nPdN5KvbCsNW7r]","extraState":{"elseIfCount":2},"inputs":{"IF0":{"block":{"type":"logic_operation","id":"wU`@*8#A77U%yb^3@*1o","fields":{"OP":"AND"},"inputs":{"A":{"block":{"type":"math_number_property","id":"6|uDk}y4bZ;ky|`!Z*h2","extraState":"<mutation divisor_input=\"true\"></mutation>","fields":{"PROPERTY":"DIVISIBLE_BY"},"inputs":{"NUMBER_TO_CHECK":{"shadow":{"type":"math_number","id":"T%phq7+)5q4NO#f/Q7^[","fields":{"NUM":0}},"block":{"type":"variables_get","id":"u61nU9OHh](LVKNU?;pL","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"DIVISOR":{"block":{"type":"math_number","id":";@=zet9NPcKL6s4i5OHc","fields":{"NUM":3}}}}}},"B":{"block":{"type":"logic_compare","id":"vnQaU|jp=su?GX,a}XZm","fields":{"OP":"GTE"},"inputs":{"A":{"block":{"type":"variables_get","id":"+cm..%C08[jAT^q$6Kgx","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"B":{"block":{"type":"math_number","id":"6KXM:**e-D?boq8]p%G7","fields":{"NUM":25}}}}}}}}},"DO0":{"block":{"type":"text_print","id":"7%$a|?E0MFm)+$}%S@;6","inputs":{"TEXT":{"shadow":{"type":"text","id":"(hKNR`Ut.Ni:6Xi)K|6j","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"A0[HOk0`yA}L(6/W~Z2O","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"{q%^Q0[ZZLOO{zdlBFKk","fields":{"TEXT":"Congrats! "}}},"ADD1":{"block":{"type":"text_join","id":"(.A_5nemR[]Cy}@L9QzP","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"M)nWaxDP7{Awc7#70V%S","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"ADD1":{"block":{"type":"text","id":"c)nhVdu.[+Y,od}~!b(*","fields":{"TEXT":" is divisible by 3 and larger than 25!"}}}}}}}}}}}},"IF1":{"block":{"type":"logic_negate","id":")GNHsUgX.~D|[-2e6ayP","inputs":{"BOOL":{"block":{"type":"math_number_property","id":"IB+Gx0//uVHMqK@0Pr.3","extraState":"<mutation divisor_input=\"true\"></mutation>","fields":{"PROPERTY":"DIVISIBLE_BY"},"inputs":{"NUMBER_TO_CHECK":{"shadow":{"type":"math_number","id":"T%phq7+)5q4NO#f/Q7^[","fields":{"NUM":0}},"block":{"type":"variables_get","id":"Yaqjjy2V64wULW1Ql?F@","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"DIVISOR":{"block":{"type":"math_number","id":"@Qy}b#{,b7(FpNUEPj!f","fields":{"NUM":3}}}}}}}}},"DO1":{"block":{"type":"text_print","id":"tBqlk~n6y=P1jY|Ky%)e","inputs":{"TEXT":{"shadow":{"type":"text","id":"(hKNR`Ut.Ni:6Xi)K|6j","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"hR6`10j=^F~d[5Re:@VP","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"W{1P:D0w(9J4o75MMuR1","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"ADD1":{"block":{"type":"text","id":"oHLR7GkhA?=Kb8a!oLXo","fields":{"TEXT":" is NOT divisible by 3!"}}}}}}}}},"IF2":{"block":{"type":"logic_negate","id":"#!o}dag`)0npQ?^!hDqM","inputs":{"BOOL":{"block":{"type":"logic_compare","id":"Zm,Iy,a*/lO6Ri9f08e+","fields":{"OP":"GTE"},"inputs":{"A":{"block":{"type":"variables_get","id":"OsY^w7s,giMYG$EVB4,]","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"B":{"block":{"type":"math_number","id":"6M{9^031@Kjm[K@zSt{h","fields":{"NUM":25}}}}}}}}},"DO2":{"block":{"type":"text_print","id":"2PLiBax9l(}8:7:_Mlu@","inputs":{"TEXT":{"shadow":{"type":"text","id":"(hKNR`Ut.Ni:6Xi)K|6j","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"X~K[+1MRVl,h}-M/~.19","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"V*@NXJKek)%fY{S1%=ut","fields":{"VAR":{"id":"$25ybDrwjy+Oe;{@Sv.F"}}}},"ADD1":{"block":{"type":"text","id":"/OO{:XeT?)UX1Wl2i?`C","fields":{"TEXT":" is NOT larger than 25!"}}}}}}}}}}}}}]},"variables":[{"name":"x","id":"$25ybDrwjy+Oe;{@Sv.F"}]}
+1
examples/loops.jpblockly
··· 1 + {"blocks":{"languageVersion":0,"blocks":[{"type":"variables_set","id":"XrV2M7Z$Mul?H1E[=Z;U","x":107,"y":71,"fields":{"VAR":{"id":"6Lj2^~DW_!1~Lk|la/}n"}},"inputs":{"VALUE":{"block":{"type":"math_number","id":"|tqjrQ4sdrb%*LHZUmYI","fields":{"NUM":1}}}},"next":{"block":{"type":"controls_whileUntil","id":"]{?ut?`N2Fv{/7jB7L;T","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"block":{"type":"logic_compare","id":"9[l/!-G]IDHvbRK:Wb+H","fields":{"OP":"LTE"},"inputs":{"A":{"block":{"type":"variables_get","id":"Fl]-*}$lkF,pBI}SIpk^","fields":{"VAR":{"id":"6Lj2^~DW_!1~Lk|la/}n"}}}},"B":{"block":{"type":"math_number","id":"OCZ68YPg:sJ!JW0i@*v9","fields":{"NUM":15}}}}}},"DO":{"block":{"type":"text_print","id":"xXP{Yy8k[V6^,)d:}OX^","inputs":{"TEXT":{"shadow":{"type":"text","id":"-[XPGd429R`CfJq-Tu0O","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"nyXL6a|b4!6@o8W7#87~","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"c_RieiuZKB3k5W0F%=j~","fields":{"VAR":{"id":"6Lj2^~DW_!1~Lk|la/}n"}}}},"ADD1":{"block":{"type":"text","id":"v+mxCi~$}}|xVyrgrsxX","fields":{"TEXT":" time!"}}}}}}},"next":{"block":{"type":"math_change","id":"/y8|k~RY+RvrcN:87`N:","fields":{"VAR":{"id":"6Lj2^~DW_!1~Lk|la/}n"}},"inputs":{"DELTA":{"shadow":{"type":"math_number","id":"EN4(n2)/Q)@4G69P}rfi","fields":{"NUM":1}}}}}}}}},"next":{"block":{"type":"text_print","id":"a9VP0~S6Yn}W+o}Rr1R/","inputs":{"TEXT":{"shadow":{"type":"text","id":"2JO?Er`8xLlwYX?9J;C?","fields":{"TEXT":"abc"}},"block":{"type":"text","id":"nj~3f|bsGP{5a.jyFPT^","fields":{"TEXT":"Done!"}}}}}}}}}]},"variables":[{"name":"count","id":"6Lj2^~DW_!1~Lk|la/}n"}]}
+1
examples/text_and_lists.jpblockly
··· 1 + {"blocks":{"languageVersion":0,"blocks":[{"type":"variables_set","id":"+KR|!G[wern+Aej3X]G7","x":624,"y":-28,"fields":{"VAR":{"id":"BzS^)f3qbnFu;Pq{XN!D"}},"inputs":{"VALUE":{"block":{"type":"text_changeCase","id":"F%:|CuDY1?PY*}pkm,fH","fields":{"CASE":"UPPERCASE"},"inputs":{"TEXT":{"shadow":{"type":"text","id":"Fad%2p7jK[^3^}~IsP/l","fields":{"TEXT":"abc"}},"block":{"type":"variables_get","id":"{6Egvt2*eTWS*WlKnBu+","fields":{"VAR":{"id":"V:f*+2R^d5p!P~.-XJmi"}}}}}}}},"next":{"block":{"type":"text_print","id":"](XCtQShq2)N#P:IEe[7","inputs":{"TEXT":{"shadow":{"type":"text","id":"^y.9,OK)Q/gLi;GLA^Qo","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"R77]h0Qo!7EIg5?2+PxK","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"m^MdunVnn}zN1ihO?.Ax","fields":{"TEXT":"Transformed uppercase sentence: "}}},"ADD1":{"block":{"type":"variables_get","id":"gWA.Zt`!NF^WABnKx}$t","fields":{"VAR":{"id":"BzS^)f3qbnFu;Pq{XN!D"}}}}}}}},"next":{"block":{"type":"text_print","id":"}hsPUXj`x-6l;o?2^eT+","inputs":{"TEXT":{"shadow":{"type":"text","id":"2~cA0FA$G{tdY[=!N~pc","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"0%j~(f_d9En|7t2:K6},","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"5Ku^f92N_)Y}:0)(N1*E","fields":{"TEXT":"Length of sentance: "}}},"ADD1":{"block":{"type":"text_length","id":"z:$X`6EVdUW~g4kSJ7?:","inputs":{"VALUE":{"shadow":{"type":"text","id":"#WrSlw/llw{HC@}0QZxf","fields":{"TEXT":"abc"}},"block":{"type":"variables_get","id":"#4Rs^8nhf7vq-)Yny`:=","fields":{"VAR":{"id":"V:f*+2R^d5p!P~.-XJmi"}}}}}}}}}}}}}}}},{"type":"variables_set","id":"@6bOsnAF6FWHwo`yi5;C","x":22,"y":-1,"fields":{"VAR":{"id":"V:f*+2R^d5p!P~.-XJmi"}},"inputs":{"VALUE":{"block":{"type":"text","id":";v8E)uPK:lqCw(,)zR/?","fields":{"TEXT":"Once upon a time ..."}}}},"next":{"block":{"type":"text_print","id":"/gT2MTek6QH~ua2-0czl","inputs":{"TEXT":{"shadow":{"type":"text","id":"?g?-Pl;#V(Vl(0NSqLVr","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"7sT2NcTPHR(OLZ[J88}}","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"nd9OFN/C_GhqLT2pEXf?","fields":{"TEXT":"Original sentence: "}}},"ADD1":{"block":{"type":"variables_get","id":"%:B}-XPZAZ[,mSh^Vm+}","fields":{"VAR":{"id":"V:f*+2R^d5p!P~.-XJmi"}}}}}}}}}}},{"type":"variables_set","id":"|hD/}dxWW$?UiAnaO)9C","x":16,"y":127,"fields":{"VAR":{"id":"tv`[Sk_Bvvyi!}_bR$j5"}},"inputs":{"VALUE":{"block":{"type":"lists_split","id":"DjwBl@RWoKfbG0,t]A(v","extraState":"<mutation mode=\"SPLIT\"></mutation>","fields":{"MODE":"SPLIT"},"inputs":{"INPUT":{"block":{"type":"variables_get","id":"%6@{V25?ndZ0ud7/DQaA","fields":{"VAR":{"id":"V:f*+2R^d5p!P~.-XJmi"}}}},"DELIM":{"shadow":{"type":"text","id":":ME8%54|4hMt68h([u#2","fields":{"TEXT":" "}}}}}}},"next":{"block":{"type":"text_print","id":"lkj-tVS`}]2/axzF~9Ij","inputs":{"TEXT":{"shadow":{"type":"text","id":"w(jRCxfPVT]MCM_%,FiP","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"IjfIh4sqa0(^7eaiT~[Q","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"T(VSa+[mFak%prC/:/]Z","fields":{"TEXT":"Words in the sentence: "}}},"ADD1":{"block":{"type":"variables_get","id":"TXu67|5m8,/SIMO;9ya`","fields":{"VAR":{"id":"tv`[Sk_Bvvyi!}_bR$j5"}}}}}}}},"next":{"block":{"type":"text_print","id":"0p|xNgUCAtwG(MfCs#~~","inputs":{"TEXT":{"shadow":{"type":"text","id":"7|{?vxG4S8/GCS;(d#G,","fields":{"TEXT":"abc"}},"block":{"type":"text_join","id":"$37G3KJ]j:[_Vz[;29-6","extraState":{"itemCount":2},"inputs":{"ADD0":{"block":{"type":"text","id":"P5Vyx3Nq|nMG;$`Q6!xD","fields":{"TEXT":"Excluding the first word: "}}},"ADD1":{"block":{"type":"lists_getSublist","id":"zH$J#9G,Hy0lU`Y?(xRX","extraState":"<mutation at1=\"true\" at2=\"true\"></mutation>","fields":{"WHERE1":"FROM_START","WHERE2":"FROM_START"},"inputs":{"LIST":{"block":{"type":"variables_get","id":"+zP~}5ROGSp!]e$))DeV","fields":{"VAR":{"id":"tv`[Sk_Bvvyi!}_bR$j5"}}}},"AT1":{"block":{"type":"math_number","id":"B;9tKAtOh+5,sN(h1hi@","fields":{"NUM":2}}},"AT2":{"block":{"type":"math_number","id":"Y[-TZFb@{8oA[II_cKKz","fields":{"NUM":5}}}}}}}}}}}}}}}]},"variables":[{"name":"words","id":"tv`[Sk_Bvvyi!}_bR$j5"},{"name":"sentence","id":"V:f*+2R^d5p!P~.-XJmi"},{"name":"upper_text","id":"BzS^)f3qbnFu;Pq{XN!D"},{"name":"item","id":"EYy;.RET%/i$A9EM.4Uj"},{"name":"list","id":"c88RA,LyjWvn*M8SU1I+"}]}