bare-script 4.2.0__tar.gz → 4.2.2__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.
Files changed (44) hide show
  1. {bare_script-4.2.0/src/bare_script.egg-info → bare_script-4.2.2}/PKG-INFO +15 -1
  2. {bare_script-4.2.0 → bare_script-4.2.2}/README.md +14 -0
  3. {bare_script-4.2.0 → bare_script-4.2.2}/setup.cfg +1 -1
  4. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/data.bare +5 -2
  5. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/markdownUp.bare +42 -0
  6. {bare_script-4.2.0 → bare_script-4.2.2/src/bare_script.egg-info}/PKG-INFO +15 -1
  7. {bare_script-4.2.0 → bare_script-4.2.2}/LICENSE +0 -0
  8. {bare_script-4.2.0 → bare_script-4.2.2}/pyproject.toml +0 -0
  9. {bare_script-4.2.0 → bare_script-4.2.2}/setup.py +0 -0
  10. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/__init__.py +0 -0
  11. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/__main__.py +0 -0
  12. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/bare.py +0 -0
  13. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/__init__.py +0 -0
  14. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/args.bare +0 -0
  15. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/baredoc.bare +0 -0
  16. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/baredocCLI.bare +0 -0
  17. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/dataLineChart.bare +0 -0
  18. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/dataTable.bare +0 -0
  19. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/dataUtil.bare +0 -0
  20. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/diff.bare +0 -0
  21. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/draw.bare +0 -0
  22. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/elementModel.bare +0 -0
  23. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/forms.bare +0 -0
  24. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/markdown.bare +0 -0
  25. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/markdownElements.bare +0 -0
  26. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/markdownHighlight.bare +0 -0
  27. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/markdownParser.bare +0 -0
  28. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/pager.bare +0 -0
  29. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/qrcode.bare +0 -0
  30. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/schemaDoc.bare +0 -0
  31. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/unittest.bare +0 -0
  32. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/include/unittestMock.bare +0 -0
  33. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/library.py +0 -0
  34. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/model.py +0 -0
  35. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/options.py +0 -0
  36. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/parser.py +0 -0
  37. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/runtime.py +0 -0
  38. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/runtime_c.c +0 -0
  39. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script/value.py +0 -0
  40. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script.egg-info/SOURCES.txt +0 -0
  41. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script.egg-info/dependency_links.txt +0 -0
  42. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script.egg-info/entry_points.txt +0 -0
  43. {bare_script-4.2.0 → bare_script-4.2.2}/src/bare_script.egg-info/requires.txt +0 -0
  44. {bare_script-4.2.0 → bare_script-4.2.2}/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: 4.2.0
3
+ Version: 4.2.2
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
@@ -224,6 +224,20 @@ Once installed, you can prompt the assistant with tasks like:
224
224
  > Build a MarkdownUp application that plays tic-tac-toe against the user, with a reset button
225
225
  > and a running win/loss/draw tally rendered as a bar chart.
226
226
 
227
+ To run the resulting MarkdownUp application locally, install the
228
+ [markdown-up](https://pypi.org/project/markdown-up/) viewer and point it at the Markdown file:
229
+
230
+ ```
231
+ pip install markdown-up
232
+ markdown-up yourApp.md
233
+ ```
234
+
235
+ The BareScript library is also documented as single-page Markdown, which can be fetched directly
236
+ into an assistant's context alongside `SKILL.md`:
237
+
238
+ - [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/barescript-library.md)
239
+ - [The BareScript Library Models](https://craigahobbs.github.io/bare-script-py/library/barescript-library-model.md)
240
+
227
241
 
228
242
  ## Development
229
243
 
@@ -199,6 +199,20 @@ Once installed, you can prompt the assistant with tasks like:
199
199
  > Build a MarkdownUp application that plays tic-tac-toe against the user, with a reset button
200
200
  > and a running win/loss/draw tally rendered as a bar chart.
201
201
 
202
+ To run the resulting MarkdownUp application locally, install the
203
+ [markdown-up](https://pypi.org/project/markdown-up/) viewer and point it at the Markdown file:
204
+
205
+ ```
206
+ pip install markdown-up
207
+ markdown-up yourApp.md
208
+ ```
209
+
210
+ The BareScript library is also documented as single-page Markdown, which can be fetched directly
211
+ into an assistant's context alongside `SKILL.md`:
212
+
213
+ - [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/barescript-library.md)
214
+ - [The BareScript Library Models](https://craigahobbs.github.io/bare-script-py/library/barescript-library-model.md)
215
+
202
216
 
203
217
  ## Development
204
218
 
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = bare-script
3
- version = 4.2.0
3
+ version = 4.2.2
4
4
  url = https://github.com/craigahobbs/bare-script
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -549,7 +549,10 @@ dataAggregationTypes = schemaParse( \
549
549
  # $group: data.bare
550
550
  # $doc: Sort a data array
551
551
  # $arg data: The data array
552
- # $arg sorts: The sort field-name/descending-sort tuples
552
+ # $arg sorts: The array of sort tuples. Each tuple is a one- or two-element array, \[field\] or
553
+ # $arg sorts: \[field, descending\]. "field" is the field name to sort by. "descending" is an
554
+ # $arg sorts: optional boolean - if true, the field is sorted in descending order (default is
555
+ # $arg sorts: ascending).
553
556
  # $return: The sorted data array
554
557
  function dataSort(data, sorts):
555
558
  return arraySort(data, systemPartial(dataSortCompare, sorts))
@@ -561,7 +564,7 @@ function dataSortCompare(sorts, row1, row2):
561
564
  result = 0
562
565
  for sort in sorts:
563
566
  field = arrayGet(sort, 0)
564
- result = if(arrayGet(sort, 1), \
567
+ result = if(arrayLength(sort) >= 2 && arrayGet(sort, 1), \
565
568
  systemCompare(objectGet(row2, field), objectGet(row1, field)), \
566
569
  systemCompare(objectGet(row1, field), objectGet(row2, field)))
567
570
  if result != 0:
@@ -332,6 +332,48 @@ function windowHeight():
332
332
  endfunction
333
333
 
334
334
 
335
+ # $function: windowKeyState
336
+ # $group: markdownUp.bare
337
+ # $doc: Test whether a key combination is currently held down. Unlike `documentSetKeyDown`, which
338
+ # $doc: fires a callback once per key press, this polls the live keyboard state and is intended for
339
+ # $doc: game loops and animations. The modifier-key states must match exactly, so by default the key
340
+ # $doc: must be pressed with no modifier keys held. For example:
341
+ # $doc:
342
+ # $doc: ```barescript
343
+ # $doc: if windowKeyState('ArrowLeft'):
344
+ # $doc: playerX = playerX - playerSpeed
345
+ # $doc: endif
346
+ # $doc: if windowKeyState('ArrowRight'):
347
+ # $doc: playerX = playerX + playerSpeed
348
+ # $doc: endif
349
+ # $doc: ```
350
+ # $doc:
351
+ # $doc: The key is matched against the physical key code (e.g., "ArrowUp", "KeyW", "Space", "Enter").
352
+ # $arg key: The physical key code (e.g., "ArrowUp", "ArrowDown", "KeyA", "KeyW", "Space")
353
+ # $arg ctrl: If true, the control key must be down; if false (the default), it must be up
354
+ # $arg shift: If true, the shift key must be down; if false (the default), it must be up
355
+ # $arg alt: If true, the alt key must be down; if false (the default), it must be up
356
+ # $arg meta: If true, the meta (command) key must be down; if false (the default), it must be up
357
+ # $return: true if the key is down and all modifier-key states match, false otherwise
358
+ function windowKeyState():
359
+ endfunction
360
+
361
+
362
+ # $function: windowPlaySound
363
+ # $group: markdownUp.bare
364
+ # $doc: Play a generated sound effect. Unknown sounds are ignored. The sound name is one of:
365
+ # $doc:
366
+ # $doc: - **UI** - "beep", "click", "error", "success", "warning"
367
+ # $doc: - **Arcade** - "coin", "jump", "laser", "explosion", "powerup", "powerdown", "hit", "blip", "gameover"
368
+ # $doc: - **Notes** - "noteC4", "noteCs4", "noteD4", "noteDs4", "noteE4", "noteF4", "noteFs4", "noteG4",
369
+ # $doc: "noteGs4", "noteA4", "noteAs4", "noteB4", "noteC5"
370
+ # $doc: - **Drums** - "drumKick", "drumSnare", "drumHihat", "drumOpenhat", "drumTomLow", "drumTomMid",
371
+ # $doc: "drumTomHigh", "drumClap", "drumCrash", "drumRide"
372
+ # $arg sound: The sound name
373
+ function windowPlaySound():
374
+ endfunction
375
+
376
+
335
377
  # $function: windowSetLocation
336
378
  # $group: markdownUp.bare
337
379
  # $doc: Navigate the browser window to a location URL
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bare-script
3
- Version: 4.2.0
3
+ Version: 4.2.2
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
@@ -224,6 +224,20 @@ Once installed, you can prompt the assistant with tasks like:
224
224
  > Build a MarkdownUp application that plays tic-tac-toe against the user, with a reset button
225
225
  > and a running win/loss/draw tally rendered as a bar chart.
226
226
 
227
+ To run the resulting MarkdownUp application locally, install the
228
+ [markdown-up](https://pypi.org/project/markdown-up/) viewer and point it at the Markdown file:
229
+
230
+ ```
231
+ pip install markdown-up
232
+ markdown-up yourApp.md
233
+ ```
234
+
235
+ The BareScript library is also documented as single-page Markdown, which can be fetched directly
236
+ into an assistant's context alongside `SKILL.md`:
237
+
238
+ - [The BareScript Library](https://craigahobbs.github.io/bare-script-py/library/barescript-library.md)
239
+ - [The BareScript Library Models](https://craigahobbs.github.io/bare-script-py/library/barescript-library-model.md)
240
+
227
241
 
228
242
  ## Development
229
243
 
File without changes
File without changes
File without changes