Commits

Lynn Rees  committed 4a8cc55

- MIA

  • Participants
  • Parent commits 458bdf5

Comments (0)

Files changed (13)

File scripts/joinChars.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().joinPlainText(ui.showInputDialog(
+	node.delegate, 'Enter characters to join nodes with...', ''
+))

File scripts/joinComma.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().joinPlainText(', ')

File scripts/joinPeriod.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().joinPlainText('. ')

File scripts/joinSpace.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().joinPlainText(' ')

File scripts/splitAfterChars.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import java.util.regex.Pattern
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+def mark = ui.showInputDialog(
+	node.delegate, 'Enter characters to split node text after...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText('(?<=' + Pattern.quote(mark ? mark : '') + ')')
+}

File scripts/splitAfterRegex.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+def mark = ui.showInputDialog(
+	node.delegate, 'Enter regular expression to split node text after...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText('(?<=' + (mark ? mark : '') + ')')
+}

File scripts/splitBeforeChars.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import java.util.regex.Pattern
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+def mark = ui.showInputDialog(
+	node.delegate, 'Enter characters to split node text before...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText('(?=' + Pattern.quote(mark ? mark : '') + ')')
+}

File scripts/splitBeforeRegex.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+ui.showInputDialog(
+	node.delegate, 'Enter regular expression to split node text before...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText('(?=' + (mark ? mark : '') + ')')
+}

File scripts/splitChars.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import java.util.regex.Pattern
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+def mark = ui.showInputDialog(
+	node.delegate, 'Enter characters to split node text on...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText(Pattern.quote(mark ? mark : ''))
+}

File scripts/splitComma.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().splitPlainText(',')

File scripts/splitPeriod.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().splitPlainText('\\.')

File scripts/splitRegex.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+def mark = ui.showInputDialog(
+	node.delegate, 'Enter regular expression to split node text on...', ''
+)
+
+if (mark) {
+	new WikdNode().splitPlainText((mark ? mark : ''))
+}

File scripts/splitSpace.groovy

+// @CacheScriptContent(true)
+// @ExecutionModes({ON_SINGLE_NODE})
+
+import org.hardknots.wikd.wikdnode.WikdNode
+
+new WikdNode().splitPlainText(' ')