1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-12-22 16:08:09 +00:00

added a name replacement

This commit is contained in:
Patrizio Bekerle 2017-10-10 11:08:53 +02:00
parent d8bb538e12
commit 4c690d59f5
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
"identifier": "selected-markdown-to-jira", "identifier": "selected-markdown-to-jira",
"script": "selected-markdown-to-jira.qml", "script": "selected-markdown-to-jira.qml",
"authors": ["@pbek"], "authors": ["@pbek"],
"version": "0.0.3", "version": "0.0.4",
"minAppVersion": "17.05.7", "minAppVersion": "17.05.7",
"description" : "With this script you can right click the selected text and convert it to <a href='https://www.atlassian.com/software/jira'>Jira</a> Code in the clipboard.\n\n<b>Dependencies</b>\n<a href=\"https://nodejs.org/en/download/\">Node.js</a>\n<a href=\"https://github.com/kylefarris/J2M\">jira2md</a> (installed via <code>npm</code>)\n\n<b>Installation</b>\nAfter you have installed <i>Node.js</i> you can install <i>jira2md</i> by typing:\n<code>sudo npm install -g jira2md</code>\n\nYou might also need to set your <code>NODE_PATH</code> to the path where the module did get installed with for example:\n<code>export NODE_PATH=/usr/local/lib/node_modules</code>" "description" : "With this script you can right click the selected text and convert it to <a href='https://www.atlassian.com/software/jira'>Jira</a> Code in the clipboard.\n\n<b>Dependencies</b>\n<a href=\"https://nodejs.org/en/download/\">Node.js</a>\n<a href=\"https://github.com/kylefarris/J2M\">jira2md</a> (installed via <code>npm</code>)\n\n<b>Installation</b>\nAfter you have installed <i>Node.js</i> you can install <i>jira2md</i> by typing:\n<code>sudo npm install -g jira2md</code>\n\nYou might also need to set your <code>NODE_PATH</code> to the path where the module did get installed with for example:\n<code>export NODE_PATH=/usr/local/lib/node_modules</code>"
} }

View file

@ -55,7 +55,7 @@ QtObject {
var result = script.startSynchronousProcess(nodejsExecutablePath, params, text); var result = script.startSynchronousProcess(nodejsExecutablePath, params, text);
// replace some names // replace some names
result = String(result).replace(/\@Georg/ig, "[~g.franz]").replace(/\@Jacob/ig, "[~j.ester]").replace(/\@Gandalf/ig, "[~g.sievers]").replace(/\@Dominik/ig, "[~d.jansen]"); result = String(result).replace(/\@Georg/ig, "[~g.franz]").replace(/\@Jacob/ig, "[~j.ester]").replace(/\@Gandalf/ig, "[~g.sievers]").replace(/\@Dominik/ig, "[~d.jansen]").replace(/\@Adrian/ig, "[~a.lawley]");
// put the result into the clipboard // put the result into the clipboard
script.setClipboardText(result); script.setClipboardText(result);