You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
An **unofficial** Python interpreter for compiled [Yarn Spinner](https://yarnspinner.dev/) programs. _Documentation incomplete._
4
4
5
-
This library currently supports the compiled story format from Yarn Spinner 1.0. Yarn Spinner 2.0 support is planned, but not currently in place.
5
+
This library currently supports the compiled story format from Yarn Spinner 1.0. Yarn Spinner 2.0 support is in progress.
6
6
7
7
## Installation
8
8
@@ -60,10 +60,11 @@ A few gotchas to look out for:
60
60
- Make sure to open the compiled story file as a binary file (see the above example, use `open(filename, 'rb')`) in order for it to be properly parsed by the compiled protobuf library.
61
61
- Unless you pass `autostart=False` to the runner when creating it, it will automatically start and run to the next choice point.
62
62
63
-
As of version 2.0, all Yarn Spinner opcodes are currently implemented, as well as Yarn's internal standard library of functions and operators. This may certainly change over time, if new opcodes, functions, or operators are added to the language. The current missing features are:
63
+
As of version v0.0.2, all Yarn Spinner 1 opcodes are currently implemented, as well as Yarn Spinner 1's internal standard library of functions and operators. This may certainly change over time, if new opcodes, functions, or operators are added to the language. The current missing features are:
- Localisation tags and Format functions [(see Yarn syntax reference)](https://yarnspinner.dev/docs/syntax/#localisation-tags)
67
+
- Full Yarn Spinner 2.0 functionality
67
68
68
69
## Development
69
70
@@ -83,10 +84,45 @@ To make a release:
83
84
84
85
The source code of the examples are located inside `*.yarn` files. `*.csv` and `*.yarnc` files are generated via the Yarn Spinner compiler. To compile these files, follow the below steps:
85
86
86
-
1. Install the [Yarn Spinner Console](https://github.com/YarnSpinnerTool/YarnSpinner-Console) program `ysc`. Basic binaries are available on [their releases page](https://github.com/YarnSpinnerTool/YarnSpinner-Console/releases).
87
-
2. From the `examples/` directory, run `ysc compile [filename].yarn`. For example, to compile the basic example used in `tests/test_basic.py`, use `ysc compile basic.yarn`.
87
+
<details><summary>Yarn Spinner 1</summary>
88
+
89
+
1. Install the version v0.0.1 of the [Yarn Spinner Console](https://github.com/YarnSpinnerTool/YarnSpinner-Console) program `ysc`. Basic binaries are available on [their releases page](https://github.com/YarnSpinnerTool/YarnSpinner-Console/releases/tag/v0.0.1).
90
+
2. From the `examples/yarn1/` directory, compile the examples. For each example, run:
91
+
92
+
```
93
+
ysc compile [filename].yarn
94
+
```
95
+
96
+
- For example, to compile the basic example used in `tests/test_basic.py`, use:
97
+
98
+
```
99
+
ysc compile basic.yarn
100
+
```
101
+
102
+
- This will output `*.csv` and `*.yarnc` files in the current directory, overwriting any files already present with the same name.
103
+
104
+
</details>
105
+
<detailsopen><summary>Yarn Spinner 2</summary>
106
+
107
+
1. Install the latest version of the [Yarn Spinner Console](https://github.com/YarnSpinnerTool/YarnSpinner-Console) program `ysc`. Basic binaries are available on [their releases page](https://github.com/YarnSpinnerTool/YarnSpinner-Console/releases).
108
+
2. From the `examples/yarn2/` directory, compile the examples. For each example, run:
- This will output `*.csv` and `*.yarnc` files in the current directory, overwriting any files already present with the same name.
89
121
122
+
(The long form with multiple CLI arguments used to compile these files is less than ideal. See [YarnSpinnerTool/YarnSpinner-Console#8](https://github.com/YarnSpinnerTool/YarnSpinner-Console/issues/8).)
123
+
124
+
</details>
125
+
90
126
Currently `*.csv` and `*.yarnc` files are committed to version control to make it easier to run our test suite. They will likely be gitignored later once we have a better build process for these files.
0 commit comments