Skip to content

Commit e9e1434

Browse files
Merge pull request #246 from Bubobubobubobubo/sardine-web-plugin
Sardine web plugin
2 parents 826a1e8 + e1fcca8 commit e9e1434

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+51
-12184
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,3 @@ poetry.lock
6262
.vim
6363
.vscode
6464
.idea
65-
66-
# Svelte
67-
!sardine/client/src/lib

MANIFEST.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
prune **/.svelte-kit
21
prune **/__pycache__
3-
prune **/build
4-
prune **/node_modules
-317 KB
Loading

docs/sardine_doc/src/editors/fishery.md

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,26 @@
22

33
![img](fishery_web.png)
44

5-
You don't need a text editor to play with **Sardine**.
6-
Just start **Sardine** with its own text editor by typing
7-
`sardine web`. You can optionally the `--port` and `--host`
8-
arguments for fine-tuning your local server:
9-
10-
sardine web
11-
sardine web --port 12345
12-
sardine web --host 0.0.0.0 --port 8000
13-
14-
Your web browser will open as a result of typing the command.
15-
Our text editor is a web application living in your web browser,
16-
generally at `https://localhost:8000`. The text editor is simple
17-
but has a few nice features:
18-
19-
- multi-pane / multi-buffer editing.
20-
- access to the Sardine documentation.
21-
- normal editing mode or [Vim](https://en.wikipedia.org/wiki/Vim_(text_editor)) mode.
22-
- quick access to play/pause, etc.
23-
- console for logging.
24-
- **Shift + enter** to eval code
25-
- **note:** you need to select code before running it)
26-
27-
The text editor also handles its own set of text files automatically.
28-
You can retrieve them inside the **Sardine** folder (see the appropriate section).
29-
30-
## Building the web application yourself
31-
32-
For now, the application must be built manually in able to be used. In the `/sardine/client` directory,
33-
run `yarn install` and `yarn run build` to build the text editor. As you might guess, you need to
34-
install [Yarn](https://yarnpkg.com/) and also [npm](https://www.npmjs.com/). These are tools used by
35-
Javascript developers to build their applications. These commands should only be runned once everytime
36-
you install **Sardine**.
5+
6+
Sardine also comes with its own text editor named **Sardine Web**. If you have it installed on your computer, you will be able to start it simply by typing `sardine web` in your terminal!
7+
8+
Typing the command will automatically open your web browser on the editor page. Our text editor is a web application living in your browser. All your code files will also be stored on your web browser!
9+
10+
## Installation
11+
12+
1) Install [NodeJS](https://nodejs.org/en) for your OS/platform.
13+
2) Install [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable), a package manager for NodeJS.
14+
3) With **NodeJS** and **Yarn** installed as per the guide, you can then install this package:
15+
16+
```bash
17+
# From remote:
18+
pip install git+https://github.com/sardine-system/sardine-web
19+
# Or from local clone in current working directory:
20+
pip install -e .[dev]
21+
```
22+
23+
4) Type `sardine web` in your terminal and enjoy.
24+
25+
## Instructions
26+
27+
Everything you need to learn how to use the editor is already included. You will also find many **Sardine** tutorials directly included with the editor.
468 KB
Loading

docs/sardine_doc/src/getting_started.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
![img](baby_steps.png)
44

5-
This section is covering the absolute basics of Sardine usage.

docs/sardine_doc/src/installation/linux.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ used by the application. You will also have to install some tools that will allo
2424
- Press **Shift + Enter** and wait for the installation to be done! Close **SuperCollider** when done.
2525
- **Optional:** You can also install [sc3plugins](https://github.com/supercollider/sc3-plugins) to get more audio effects and synthesizers!
2626

27-
3) Install [NodeJS](https://nodejs.org/en) and [Yarn](https://yarnpkg.com/) to build the integrated web editor.
28-
- If you are installing the package from GitHub, the build process for the text editor will start automatically.
29-
3027
## Installing Sardine
3128

3229
We will now proceed to the installation of Sardine. Sardine is a Python library which is composed of two modules:
@@ -37,17 +34,11 @@ We will now proceed to the installation of Sardine. Sardine is a Python library
3734
Install the development version (**recommanded**).
3835
```python
3936
git clone https://github.com/Bubobubobubobubo/sardine
40-
cd sardine && python -m pip install --find-links https://thegamecracks.github.io/python-rtmidi-wheels/ --editable .
37+
cd sardine && python -m pip install .
4138
```
42-
- **Optional**: You can install the outdated [Pypi package](https://pypi.org/project/sardine-system/) but it is older and lagging behind:
43-
```python
44-
python -m pip install --find-links https://thegamecracks.github.io/python-rtmidi-wheels/ --editable sardine-system
45-
```
4639

4740
**Note**: the `--editable` flag is optional. You can remove it if you are not planning to modify **Sardine**!
4841

49-
- If you get an error when trying to install `python-rtmidi` because of `#include "longintrepr.h"`, you can try one of the following install commands:
42+
**Note 2:** If you get an error when trying to install `python-rtmidi`, you can get it from these sources:
5043
- `python -m pip install git+https://github.com/SpotlightKid/python-rtmidi.git@eb16ab3268b29b94cd2baa6bfc777f5cf5f908ba#egg=python-rtmidi`
5144
- `python -m pip install git+https://github.com/SpotlightKid/python-rtmidi.git#eb16ab3268b29b94cd2baa6bfc777f5cf5f908ba`
52-
53-
**Note**: the `python-rtmidi` project is now undergoing a maintainer transition. The situation should resolve quite soon! :)

docs/sardine_doc/src/installation/macos.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ used by the application. You will also have to install some tools that will allo
2626
- You might have to add `sclang` to your path. To do so, copy `alias sclang="/Applications/SuperCollider.app/Contents/MacOS/sclang"`
2727
into your `.bashrc` or `.zshrc` in the `$HOME` directory.
2828

29-
3) Install [NodeJS](https://nodejs.org/en) and [Yarn](https://yarnpkg.com/) to build the integrated web editor.
30-
- If you are installing the package from GitHub, the build process for the text editor will start automatically.
31-
3229
## Installing Sardine
3330

3431
We will now proceed to the installation of Sardine. Sardine is a Python library which is composed of two modules:
@@ -39,17 +36,11 @@ We will now proceed to the installation of Sardine. Sardine is a Python library
3936
Install the development version (**recommanded**).
4037
```python
4138
git clone https://github.com/Bubobubobubobubo/sardine
42-
cd sardine && python -m pip install --find-links https://thegamecracks.github.io/python-rtmidi-wheels/ --editable .
39+
cd sardine && python -m pip install --editable .
4340
```
44-
- **Optional**: You can install the outdated [Pypi package](https://pypi.org/project/sardine-system/) but it is older and lagging behind:
45-
```python
46-
python -m pip install --find-links https://thegamecracks.github.io/python-rtmidi-wheels/ --editable sardine-system
47-
```
4841

4942
**Note**: the `--editable` flag is optional. You can remove it if you are not planning to modify **Sardine**!
5043

51-
- If you get an error when trying to install `python-rtmidi` because of `#include "longintrepr.h"`, you can try one of the following install commands:
44+
**Note 2:** If you get an error when trying to install `python-rtmidi`, you can get it from these sources:
5245
- `python -m pip install git+https://github.com/SpotlightKid/python-rtmidi.git@eb16ab3268b29b94cd2baa6bfc777f5cf5f908ba#egg=python-rtmidi`
5346
- `python -m pip install git+https://github.com/SpotlightKid/python-rtmidi.git#eb16ab3268b29b94cd2baa6bfc777f5cf5f908ba`
54-
55-
**Note**: the `python-rtmidi` project is now undergoing a maintainer transition. The situation should resolve quite soon! :)

docs/sardine_doc/src/installation/post_install_checkup.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ The source of this error is currently unknown and is not Sardine related. Hopefu
2828
## Can you run sardine and sardine web?
2929

3030
- in your terminal, run `sardine` first! If you see a splashscreen, everything is fine! :)
31-
- in your terminal, run `sardine web`! Does your web browser magically open? You are good to go.
32-
- Windows users: you will sometimes have to run this twice. Run the app. Quit it and launch again.
3331

3432
## Can you run sardine config?
3533

@@ -43,3 +41,7 @@ The source of this error is currently unknown and is not Sardine related. Hopefu
4341
[configuration](../configuration/configuration_tool.md) section. Head to the `SuperCollider`
4442
section and turn everything on!
4543

44+
## You need a code editor now!
45+
46+
- Check out the Editor section to choose your favorite editor!
47+

docs/sardine_doc/src/installation/preliminary_words.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,17 @@ Now, **kill your command line** and restart a fresh terminal. The output of `pyt
2626
Python 3.11.3
2727
```
2828

29-
## 2) Installing some Web Tools
3029

31-
**Sardine** also requires you to install some tools needed for web development in order to install properly. This is because of **Sardine Web**, our very cool web editor that will be available once everything is ready.
32-
33-
- Install [NodeJS](https://nodejs.org/en/download): this is the base stack for web development in JavaScript.
34-
- Once done, run the following command in your terminal: `npm install yarn -g`
35-
36-
37-
## 3) Other versions of Sardine
30+
## 2) Other versions of Sardine
3831

3932
- As funny as it may sound, I am not the owner of the `sardine` package on Pypi. **Sardine** is named `sardine-system`. Some people sometimes end up installing a totally unrelated tool!
4033
- `sardine-system` is very outdated. Please install from source.
4134

42-
## 4) The modular architecture of Sardine
35+
## 3) The modular architecture of Sardine
4336

4437
- Sardine is a **very** flexible software. It can be hard to install for that reason.
4538
- You probably don't need everything but you need to understand the architecture:
46-
- **Sardine web** is an optional text editor for **Sardine** written with JavaScript.
39+
- **Sardine web** is an optional text editor for **Sardine** written in TypeScript.
4740
- **Sardine** is an asynchronous Python interpreter firing up the **Sardine** library.
4841
- **Sardine Core** is the Python library that is responsible for all that livecoding.
4942
- it defines a temporal engine allowing you to live code in Python.

0 commit comments

Comments
 (0)