GithubHelp home page GithubHelp logo

eulores / siyuan-brython-run Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 76 KB

run Python inside SiYuan code blocks

License: MIT License

Python 82.68% HTML 17.32%
brython python siyuan siyuan-note siyuan-widget widget

siyuan-brython-run's Introduction

brython-run - a widget for SiYuan

Inspired by the widgets brython-editor and brython-console, here's brython-run

Python code is written inside code sections in SiYuan, and executed at the press of a button.

Installation

The widget can be installed from within SiYuan. Go to settings (Alt+P), select Bazaar on the left column, switch to the Widget tab and find brython-run.

Usage

Inside SiYuan, on a new line, insert the brython-run widget. Once you click on the Initialize button, there will be a python code section with sample code created just above. Also, the label on the button now changes to Run Python code.

Details

The label of the button and the link to the code section are stored as custom attributes attached to the widget block.

codeID and widgetID are now available to the executing code.

  • codeID is the SiYuan ID pointing to the Python code block.
  • widgetID is the SiYuan ID pointing to the block containing this widget instance.

Screenshot

brython-run

siyuan-brython-run's People

Contributors

eulores avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.