Skip to content

Commit f3c42d2

Browse files
committed
ScriptingWorkflows
SQUASHED: AUTO-COMMIT-doc-journal-2020-09-08.md-index.md,AUTO-COMMIT-doc-journal-2020-09-08.md-scriptaugmented_interactive_workflows.png,
1 parent 54b3f6a commit f3c42d2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

doc/journal/2020-09-08.md/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,20 @@ Given, that the lively4 FileIndex contains bibliographies and PDF files, those a
4242

4343
![](literature_overview.png)
4444

45+
## Script Augmented Interactive Workflows #ScriptingWorkflows
46+
47+
Using Lively it is possible to hook into very manual workflows and start to script. This is similar to the capabilities of AppleScript, but with Halos it is much easier to actually get the elements that contain the interesting content.
48+
49+
```javascript
50+
import Strings from 'src/client/strings.js'
51+
52+
var input = document.querySelector("lively-dialog").get("input");
53+
54+
55+
var ignore = new Set(["A"]);
56+
57+
input.value = input.value.split(" ").filter(ea => ea.length > 0).map(ea => Strings.toUpperCaseFirst(ea.replace(/[,:;]/,""))).filter(ea => !ignore.has(ea)).join("")
58+
```
59+
60+
![](scriptaugmented_interactive_workflows.png)
4561

581 KB
Loading

0 commit comments

Comments
 (0)