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.

Merge pull request #34 from DenisaCG/documentation

Added examples and docs

authored by

Wolf Vollprecht and committed by
GitHub
550c9d59 5181e91e

+397 -4
+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
+13
MANIFEST.in
··· 23 23 global-exclude *.pyo 24 24 global-exclude .git 25 25 global-exclude .ipynb_checkpoints 26 + 27 + # Documentation 28 + recursive-include docs *.bat 29 + recursive-include docs *.gif 30 + recursive-include docs *.md 31 + recursive-include docs *.png 32 + recursive-include docs *.rst 33 + recursive-include docs *.txt 34 + recursive-include docs Makefile 35 + recursive-include docs *.py 36 + 37 + # Examples 38 + recursive-include examples *.jpblockly
+2 -4
README.md
··· 20 20 To install the extension, execute: 21 21 22 22 ```bash 23 - 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 24 - micromamba activate blockly 25 - pip install jupyterlab_blockly 23 + conda install -c conda-forge jupyterlab-blockly 26 24 ``` 27 25 28 26 #### Kernels ··· 38 36 To remove the extension, execute: 39 37 40 38 ```bash 41 - pip uninstall jupyterlab_blockly 39 + conda uninstall -c conda-forge jupyterlab-blockly 42 40 ``` 43 41 44 42 ## Contributing
+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/commentBlock.png

This is a binary file and will not be displayed.

docs/_static/creatingVariable.gif

This is a binary file and will not be displayed.

docs/_static/darkBlockly.png

This is a binary file and will not be displayed.

docs/_static/ifBlock.gif

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.

+17
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 + ## Executing your code 8 + 9 + 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. 10 + 11 + ## Modifying your code 12 + 13 + You have full freedom to change the position of any blocks in the workspace, as well as remove the ones you don't want to use anymore, by dragging them to the trash bin positioned at the bottom-right corner. 14 + 15 + You can also organize your code in multiple sets of blocks. The generated code will be rendered in the order they are placed on the screen. 16 + 17 + **NOTE** : By right clicking anywhere on the workspace you can get a set of possible commands, such as _Undo_, _Redo_ or _Delete # Blocks_. This gives you more freedom to edit of your canvas.
+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']
+41
docs/examples.md
··· 1 + # Examples 2 + 3 + To help gain a better understanding of the JupyterLab-Blockly, we created some examples you can easily access and experiment with. They can be accessed from the folder `examples` in the Github repository. 4 + 5 + The examples give you a chance to be introduced to the most important blocks and their functionalities. The extension is a great tool for introducing the most relevant concepts of coding by also letting you see the rendered code. Once you have gotten a good grasp on it, you can easily use the familiar Jupyter enviroment to move to another classical programming language, such as Python. 6 + 7 + ## Logic Blocks Example 8 + 9 + The example in `logic.jpblockly` takes a random integer and checks if it respects certain conditions, through a series of `if-else` statements, and returns appropiate messages. 10 + 11 + **NOTE** : Any block that has the settings icon in the upper-left corner offers the possibility of adding extra fields, thus you can modify the `if` standard block to adapt to your code by adding the needed `else if` or `else` clauses. 12 + 13 + <p align="center"> 14 + <img src="_static/ifBlock.gif" alt="Modifying if block"/> 15 + </p> 16 + 17 + ## Loop Blocks Example 18 + 19 + In `loops.jpblockly`, we use a standard loop with initial condition to iterate from 1 to 15 and print a message at each step and one to mark the exit from the loop. 20 + 21 + In order to iterate through the loop, we created a variable `count`. You can create variables by simply accessing the **Variables** category from the toolbox and pressing the button _Create variable..._. Once you have named and created your variable, a new selection of blocks will appear for it in the category. 22 + 23 + <p align="center"> 24 + <img src="_static/creatingVariable.gif" alt="Creating a variable"/> 25 + </p> 26 + 27 + ## Texts and Lists Blocks Example 28 + 29 + In the `text_and_lists.jpblockly` example, we are using several of the offered blocks from the two categories, to modify or offer information from a string saved in the variable `sentence`. 30 + 31 + ## Function and Color Blocks Example 32 + 33 + In `functions.jpblockly`, we are creating a function `blend colors` which takes two randomly chosen colors and returns a new color, formed by blending the inputs, using a `color` block. 34 + 35 + When creating a function, you can choose a name for it, the number of inputs (by pressing the settings icon), whether it has an output or not and write a comment for it to explain its functionality (by pressing the question mark icon). 36 + 37 + <p align="center"> 38 + <img src="_static/commentBlock.png" alt="Function block with comment"/> 39 + </p> 40 + 41 + **NOTE** : You can add a comment to any icon by right clicking on it and choosing `Add comment`. The added text will appear in the generated code, above the selected block as a comment.
+44
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 + The extension uses `Blockly <https://developers.google.com/blockly>`_, an open source library designed by Google. 12 + 13 + .. image:: _static/OverviewBlockly.gif 14 + :alt: Functionality of extension 15 + 16 + .. toctree:: 17 + :maxdepth: 2 18 + :caption: Contents: 19 + 20 + installation 21 + 22 + .. toctree:: 23 + :maxdepth: 2 24 + :caption: Usage: 25 + 26 + blockly_files 27 + blockly_editor 28 + kernels 29 + toolbox 30 + jupyterlab_integration 31 + examples 32 + 33 + .. toctree:: 34 + :maxdepth: 2 35 + :caption: Expanding: 36 + 37 + other_extensions 38 + 39 + Indices and tables 40 + ================== 41 + 42 + * :ref:`genindex` 43 + * :ref:`modindex` 44 + * :ref:`search`
+79
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 + conda install -c conda-forge jupyterlab-blockly 13 + ``` 14 + 15 + ### Kernels 16 + 17 + - ipykernel 18 + - xeus-python 19 + - xeus-lua 20 + - [JavaScript](https://github.com/n-riesco/ijavascript#installation) 21 + - [JavaScript](https://github.com/yunabe/tslab) 22 + 23 + ## Uninstall 24 + 25 + To remove the extension, execute: 26 + 27 + ```bash 28 + conda uninstall -c conda-forge jupyterlab-blockly 29 + ``` 30 + 31 + ## Development install 32 + 33 + **Note:** You will need NodeJS to build the extension package. 34 + 35 + The `jlpm` command is JupyterLab's pinned version of 36 + [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use 37 + `yarn` or `npm` in lieu of `jlpm` below. 38 + 39 + ```bash 40 + 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 41 + micromamba activate blockly 42 + # Clone the repo to your local environment 43 + # Change directory to the jupyterlab_blockly directory 44 + # Install package in development mode 45 + pip install -e . 46 + # Installing pre-commit to run command when adding commits 47 + pre-commit install 48 + # Link your development version of the extension with JupyterLab 49 + jupyter labextension develop . --overwrite 50 + # Rebuild extension Typescript source after making changes 51 + jlpm run build 52 + ``` 53 + 54 + 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. 55 + 56 + ```bash 57 + # Watch the source directory in one terminal, automatically rebuilding when needed 58 + jlpm watch 59 + # Run JupyterLab in another terminal 60 + jupyter lab 61 + ``` 62 + 63 + 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). 64 + 65 + 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: 66 + 67 + ```bash 68 + jupyter lab build --minimize=False 69 + ``` 70 + 71 + ## Development uninstall 72 + 73 + ```bash 74 + pip uninstall jupyterlab_blockly 75 + ``` 76 + 77 + In development mode, you will also need to remove the symlink created by `jupyter labextension develop` 78 + command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions` 79 + folder is located. Then you can remove the symlink named `jupyterlab-blockly` within that folder.
+21
docs/jupyterlab_integration.md
··· 1 + # JupyterLab Integration 2 + 3 + The JupyterLab-Blockly extension is fully integrated in the Jupyter enviroment to offer a seamless experience to the user. Thus, the Blockly editor automatically adapts to any modyfication you make to JupyterLab's appearance. 4 + 5 + ## Theme 6 + 7 + The Blockly editor changes its theme in accordance to the JupyterLab one, whether it's the standard light or dark ones or a personalized one. 8 + 9 + Below is an example of how the Blockly editor looks with the dark theme. 10 + 11 + ![Blockly with the dark theme](_static/darkBlockly.png) 12 + 13 + You can experiment with this by pressing "Settings" > "Theme", from the JupyterLab toolbar. 14 + 15 + ## Internalization 16 + 17 + If you prefer using JupyterLab in another language, the Blockly editor can also render its blocks and additional messages (visible by right clicking on any block or in the workspace) in the selected language. 18 + 19 + The extension can be rendered in all the languages available in JupyterLab. A complete list can be seen [here](https://github.com/jupyterlab/language-packs/tree/master/language-packs). 20 + 21 + **NOTE** : This feature is a work in progress, so the names of the categories from the toolbox are only offered in English so far.
+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
+3
docs/other_extensions.md
··· 1 + # Other extensions 2 + 3 + ... instructions on how to built on top of the JupyterLab-Blockly extension
+1
docs/requirements.txt
··· 1 + myst_parser==0.18.0
+15
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) 14 + 15 + **NOTE** : The toolbox `niryo` from the image above is part of the JupyterLab-Niryo-One extension, which is built on top of the JupyterLab-Blockly extesnion and is meant to offer blocks which can control the Niryo One robot. You can read more about it on its [Github repository](https://github.com/QuantStack/jupyterlab-niryo-one).
+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":3},"inputs":{"ADD0":{"block":{"type":"variables_get","id":"vChfBN5W]+gN1bF5m{{D","fields":{"VAR":{"id":"Hfm;!%[BIJL%q3lMPG+C"}}}},"ADD1":{"block":{"type":"text","id":"lx{9H+ej.BL)_,nno[se","fields":{"TEXT":" and "}}},"ADD2":{"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":469,"y":80,"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":4},"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"}}}},"ADD2":{"block":{"type":"text","id":"5Ku^f92N_)Y}:0)(N1*E","fields":{"TEXT":"Length of sentance: "}}},"ADD3":{"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":21,"y":276,"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+"}]}
examples/untitled.jpblockly

This is a binary file and will not be displayed.