mirror of
https://github.com/marty-oehme/scripts.git
synced 2025-12-10 22:12:45 +00:00
updated script
This commit is contained in:
parent
eb6e526fbc
commit
a715f6df90
5 changed files with 11 additions and 115 deletions
|
|
@ -9,7 +9,6 @@ import QtQml 2.0
|
|||
* https://github.com/2ion/pandoc-bbcode
|
||||
*/
|
||||
QtObject {
|
||||
property string panbbcodePath;
|
||||
property string pandocPath;
|
||||
|
||||
// register your settings variables so the user can set them in the script settings
|
||||
|
|
@ -21,15 +20,12 @@ QtObject {
|
|||
"type": "file",
|
||||
"default": "pandoc",
|
||||
},
|
||||
{
|
||||
"identifier": "panbbcodePath",
|
||||
"name": "panbbcode path",
|
||||
"description": "Please select the path to your <code>panbbcode.lua</code> executable:",
|
||||
"type": "file",
|
||||
"default": "/opt/scripts/panbbcode.lua",
|
||||
},
|
||||
];
|
||||
|
||||
// the path to the script's directory will be set here
|
||||
property string scriptDirPath;
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the custom action
|
||||
*/
|
||||
|
|
@ -51,6 +47,9 @@ QtObject {
|
|||
// get the selected text from the note text edit
|
||||
var text = script.noteTextEditSelectedText();
|
||||
|
||||
// get the path of the lua script
|
||||
var panbbcodePath = scriptDirPath + script.dirSeparator() + "panbbcode.lua";
|
||||
|
||||
// you need pandoc and the BBCode writer from https://github.com/2ion/pandoc-bbcode
|
||||
// to convert Markdown to BBCode
|
||||
var params = ["-t", panbbcodePath, "-f", "markdown"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue