From 1545a4c8a6dc9ed161034d696ccfbf5ebefff647 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 16 May 2017 15:52:33 +0200 Subject: [PATCH] added an example scrip --- example-script/info.json | 7 +++++++ example-script/paste-latex-image.qml | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 example-script/info.json create mode 100644 example-script/paste-latex-image.qml diff --git a/example-script/info.json b/example-script/info.json new file mode 100644 index 0000000..dd3549e --- /dev/null +++ b/example-script/info.json @@ -0,0 +1,7 @@ +{ + "name": "Example script", + "identifier": "example-script", + "script": "example-script.qml", + "version": "0.0.1", + "description" : "Use this script to start a new script you want to submit to the script repository.\\n\\nJust copy the whole 'example-script' folder and rename it and also the 'example-script.qml'" +} diff --git a/example-script/paste-latex-image.qml b/example-script/paste-latex-image.qml new file mode 100644 index 0000000..f16a265 --- /dev/null +++ b/example-script/paste-latex-image.qml @@ -0,0 +1,15 @@ +import QtQml 2.0 + +/** + * This script is just an example of how to use scripts + * Visit http://docs.qownnotes.org/ for more information about scripting + */ +QtObject { + /** + * Just show some log entries when the script is initialized + */ + function init() { + script.log("This is just an example script."); + script.log("Visit http://docs.qownnotes.org/ for more information about scripting."); + } +}