Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saturngod/pywebtest-gitbook
run python code editor for gitbook
https://github.com/saturngod/pywebtest-gitbook
Last synced: 26 days ago
JSON representation
run python code editor for gitbook
- Host: GitHub
- URL: https://github.com/saturngod/pywebtest-gitbook
- Owner: saturngod
- License: mit
- Created: 2014-07-13T14:57:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-14T15:23:47.000Z (over 10 years ago)
- Last Synced: 2024-04-26T10:05:28.711Z (8 months ago)
- Language: Python
- Size: 2.16 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pywebtest-gitbook is a plugin for [gitbook](http://www.gitbook.io) that allow to run python code in the gitbook with python editor.
For Editor , using [ace](http://ace.c9.io) and [brython](www.brython.info) to run python code on browser. Running brython code are inspired from [Pierre Quentel](https://groups.google.com/d/msg/brython/xLv55qq-L1s/mcwmI6-pEhcJ)'s answer from google group discussion.
## Install
```
npm install pywebtest-gitbook
```In your gitbook book.json
```
"plugin" : [
"pywebtest-gitbook"
],
"pluginsConfig" : {
"bookPath" : "http://www.mybook.com/"
}
```
You need to point the **bookPath** url because brython.js need to load from gitbook home path.## Screenshot
![image](https://i.cloudup.com/2Bbk19AXT9.png)
## How to add python code
You can add python code like following
```
Hello World[[[helloworld.py]]]
Bubbler Sort
[[[bubble.py]]]
```You need to put your python file path between **[[[** and **]]]**
Example:
- file.md
- code
- helloworld.pyIn file.md , you can call like
```
This is file.md[[[code/helloworld.py]]
```