bare-script 5.1.2__tar.gz → 5.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bare_script-5.1.2/src/bare_script.egg-info → bare_script-5.1.3}/PKG-INFO +24 -9
- {bare_script-5.1.2 → bare_script-5.1.3}/README.md +23 -8
- {bare_script-5.1.2 → bare_script-5.1.3}/pyproject.toml +1 -1
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/include_source.py +1289 -1283
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/library.py +130 -32
- {bare_script-5.1.2 → bare_script-5.1.3/src/bare_script.egg-info}/PKG-INFO +24 -9
- {bare_script-5.1.2 → bare_script-5.1.3}/LICENSE +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/setup.cfg +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/setup.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/__init__.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/__main__.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/bare.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/include.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/options.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/runtime.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/runtime_c.c +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script/value.py +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script.egg-info/SOURCES.txt +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script.egg-info/dependency_links.txt +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script.egg-info/entry_points.txt +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script.egg-info/requires.txt +0 -0
- {bare_script-5.1.2 → bare_script-5.1.3}/src/bare_script.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bare-script
|
|
3
|
-
Version: 5.1.
|
|
3
|
+
Version: 5.1.3
|
|
4
4
|
Summary: BareScript; a lightweight scripting and expression language
|
|
5
5
|
Author-email: "Craig A. Hobbs" <craigahobbs@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -54,6 +54,15 @@ confident that BareScript will execute the same regardless of the underlying run
|
|
|
54
54
|
- [Source code](https://github.com/craigahobbs/bare-script-py)
|
|
55
55
|
|
|
56
56
|
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
Install the bare-script package with pip — it includes the `bare` command-line interface:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
pip install bare-script
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
57
66
|
## Executing BareScript Scripts
|
|
58
67
|
|
|
59
68
|
To execute a BareScript script, parse the script using the
|
|
@@ -62,7 +71,7 @@ function. Then execute the script using the
|
|
|
62
71
|
[execute_script](https://craigahobbs.github.io/bare-script-py/scripts.html#execute-script)
|
|
63
72
|
function. For example:
|
|
64
73
|
|
|
65
|
-
```
|
|
74
|
+
```python
|
|
66
75
|
from bare_script import barescript_parse_script, execute_script
|
|
67
76
|
|
|
68
77
|
# Parse the script
|
|
@@ -98,7 +107,7 @@ of the
|
|
|
98
107
|
[arrayLength](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='array'&arraylength)
|
|
99
108
|
functions.
|
|
100
109
|
|
|
101
|
-
```
|
|
110
|
+
```python
|
|
102
111
|
import urllib.request
|
|
103
112
|
|
|
104
113
|
from bare_script import barescript_parse_script, execute_script, fetch_http
|
|
@@ -119,7 +128,7 @@ print(execute_script(script, {'fetchFn': fetch_http}))
|
|
|
119
128
|
This outputs:
|
|
120
129
|
|
|
121
130
|
```
|
|
122
|
-
The BareScript Library has
|
|
131
|
+
The BareScript Library has 100 builtin functions
|
|
123
132
|
```
|
|
124
133
|
|
|
125
134
|
|
|
@@ -139,7 +148,7 @@ a set of built-in, spreadsheet-like functions.
|
|
|
139
148
|
|
|
140
149
|
For example:
|
|
141
150
|
|
|
142
|
-
```
|
|
151
|
+
```python
|
|
143
152
|
from bare_script import barescript_parse_expression, evaluate_expression
|
|
144
153
|
|
|
145
154
|
# Parse the expression
|
|
@@ -171,7 +180,7 @@ exported by the
|
|
|
171
180
|
Each stub function executes its corresponding include library function using the BareScript
|
|
172
181
|
runtime. For example:
|
|
173
182
|
|
|
174
|
-
```
|
|
183
|
+
```python
|
|
175
184
|
from bare_script.include import markdown_parse, markdown_title
|
|
176
185
|
|
|
177
186
|
# Parse the Markdown text
|
|
@@ -201,7 +210,7 @@ files use the ".bare" file extension.
|
|
|
201
210
|
bare script.bare
|
|
202
211
|
```
|
|
203
212
|
|
|
204
|
-
**Note:** In the BareScript CLI,
|
|
213
|
+
**Note:** In the BareScript CLI, include statements and the
|
|
205
214
|
[systemFetch](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='system'&systemfetch)
|
|
206
215
|
function read non-URL paths from the local file system.
|
|
207
216
|
[systemFetch](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='system'&systemfetch)
|
|
@@ -219,7 +228,7 @@ dynamically rendering Markdown text, drawing SVG images, etc. For example:
|
|
|
219
228
|
|
|
220
229
|
This is a Markdown document with embedded BareScript:
|
|
221
230
|
|
|
222
|
-
```
|
|
231
|
+
```markdown-script
|
|
223
232
|
markdownPrint('Hello, Markdown!')
|
|
224
233
|
```
|
|
225
234
|
~~~
|
|
@@ -302,11 +311,17 @@ pip install markdown-up
|
|
|
302
311
|
markdown-up ticTacToe.md
|
|
303
312
|
```
|
|
304
313
|
|
|
305
|
-
The BareScript
|
|
314
|
+
The BareScript documentation is also published as plain Markdown, which can be fetched directly
|
|
306
315
|
into an assistant's context alongside `SKILL.md`:
|
|
307
316
|
|
|
317
|
+
- [The BareScript Language](https://craigahobbs.github.io/bare-script-py/language/README.md)
|
|
308
318
|
- [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/barescript-library.md)
|
|
309
319
|
- [The BareScript Library Models](https://craigahobbs.github.io/bare-script-py/library/barescript-library-model.md)
|
|
320
|
+
- [The BareScript Expression Library](https://craigahobbs.github.io/bare-script-py/library/barescript-expression-library.md)
|
|
321
|
+
- [The BareScript Runtime Model](https://craigahobbs.github.io/bare-script-py/model/barescript-model.md)
|
|
322
|
+
|
|
323
|
+
`SKILL.md` itself is published at <https://craigahobbs.github.io/bare-script-py/SKILL.md>, and
|
|
324
|
+
<https://craigahobbs.github.io/bare-script-py/llms.txt> indexes all of the fetchable documentation.
|
|
310
325
|
|
|
311
326
|
|
|
312
327
|
## Development
|
|
@@ -28,6 +28,15 @@ confident that BareScript will execute the same regardless of the underlying run
|
|
|
28
28
|
- [Source code](https://github.com/craigahobbs/bare-script-py)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Install the bare-script package with pip — it includes the `bare` command-line interface:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
pip install bare-script
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
31
40
|
## Executing BareScript Scripts
|
|
32
41
|
|
|
33
42
|
To execute a BareScript script, parse the script using the
|
|
@@ -36,7 +45,7 @@ function. Then execute the script using the
|
|
|
36
45
|
[execute_script](https://craigahobbs.github.io/bare-script-py/scripts.html#execute-script)
|
|
37
46
|
function. For example:
|
|
38
47
|
|
|
39
|
-
```
|
|
48
|
+
```python
|
|
40
49
|
from bare_script import barescript_parse_script, execute_script
|
|
41
50
|
|
|
42
51
|
# Parse the script
|
|
@@ -72,7 +81,7 @@ of the
|
|
|
72
81
|
[arrayLength](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='array'&arraylength)
|
|
73
82
|
functions.
|
|
74
83
|
|
|
75
|
-
```
|
|
84
|
+
```python
|
|
76
85
|
import urllib.request
|
|
77
86
|
|
|
78
87
|
from bare_script import barescript_parse_script, execute_script, fetch_http
|
|
@@ -93,7 +102,7 @@ print(execute_script(script, {'fetchFn': fetch_http}))
|
|
|
93
102
|
This outputs:
|
|
94
103
|
|
|
95
104
|
```
|
|
96
|
-
The BareScript Library has
|
|
105
|
+
The BareScript Library has 100 builtin functions
|
|
97
106
|
```
|
|
98
107
|
|
|
99
108
|
|
|
@@ -113,7 +122,7 @@ a set of built-in, spreadsheet-like functions.
|
|
|
113
122
|
|
|
114
123
|
For example:
|
|
115
124
|
|
|
116
|
-
```
|
|
125
|
+
```python
|
|
117
126
|
from bare_script import barescript_parse_expression, evaluate_expression
|
|
118
127
|
|
|
119
128
|
# Parse the expression
|
|
@@ -145,7 +154,7 @@ exported by the
|
|
|
145
154
|
Each stub function executes its corresponding include library function using the BareScript
|
|
146
155
|
runtime. For example:
|
|
147
156
|
|
|
148
|
-
```
|
|
157
|
+
```python
|
|
149
158
|
from bare_script.include import markdown_parse, markdown_title
|
|
150
159
|
|
|
151
160
|
# Parse the Markdown text
|
|
@@ -175,7 +184,7 @@ files use the ".bare" file extension.
|
|
|
175
184
|
bare script.bare
|
|
176
185
|
```
|
|
177
186
|
|
|
178
|
-
**Note:** In the BareScript CLI,
|
|
187
|
+
**Note:** In the BareScript CLI, include statements and the
|
|
179
188
|
[systemFetch](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='system'&systemfetch)
|
|
180
189
|
function read non-URL paths from the local file system.
|
|
181
190
|
[systemFetch](https://craigahobbs.github.io/bare-script-py/library/#var.vGroup='system'&systemfetch)
|
|
@@ -193,7 +202,7 @@ dynamically rendering Markdown text, drawing SVG images, etc. For example:
|
|
|
193
202
|
|
|
194
203
|
This is a Markdown document with embedded BareScript:
|
|
195
204
|
|
|
196
|
-
```
|
|
205
|
+
```markdown-script
|
|
197
206
|
markdownPrint('Hello, Markdown!')
|
|
198
207
|
```
|
|
199
208
|
~~~
|
|
@@ -276,11 +285,17 @@ pip install markdown-up
|
|
|
276
285
|
markdown-up ticTacToe.md
|
|
277
286
|
```
|
|
278
287
|
|
|
279
|
-
The BareScript
|
|
288
|
+
The BareScript documentation is also published as plain Markdown, which can be fetched directly
|
|
280
289
|
into an assistant's context alongside `SKILL.md`:
|
|
281
290
|
|
|
291
|
+
- [The BareScript Language](https://craigahobbs.github.io/bare-script-py/language/README.md)
|
|
282
292
|
- [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/barescript-library.md)
|
|
283
293
|
- [The BareScript Library Models](https://craigahobbs.github.io/bare-script-py/library/barescript-library-model.md)
|
|
294
|
+
- [The BareScript Expression Library](https://craigahobbs.github.io/bare-script-py/library/barescript-expression-library.md)
|
|
295
|
+
- [The BareScript Runtime Model](https://craigahobbs.github.io/bare-script-py/model/barescript-model.md)
|
|
296
|
+
|
|
297
|
+
`SKILL.md` itself is published at <https://craigahobbs.github.io/bare-script-py/SKILL.md>, and
|
|
298
|
+
<https://craigahobbs.github.io/bare-script-py/llms.txt> indexes all of the fetchable documentation.
|
|
284
299
|
|
|
285
300
|
|
|
286
301
|
## Development
|