mirror of
https://github.com/marty-oehme/scripts.git
synced 2024-12-22 16:08:09 +00:00
Small tweaks
This commit is contained in:
parent
ba259c6e2f
commit
8d95e5fa81
1 changed files with 15 additions and 11 deletions
|
@ -2,17 +2,22 @@ import QtQml 2.2
|
||||||
import QOwnNotesTypes 1.0
|
import QOwnNotesTypes 1.0
|
||||||
|
|
||||||
Script {
|
Script {
|
||||||
function checkPyCommand() {
|
function setDefaultPyCommand() {
|
||||||
if (script.startSynchronousProcess('pythonw', '-V', '').toString().indexOf('Python 3') != '-1') {return 'pythonw'}
|
|
||||||
if (script.startSynchronousProcess('python3', '-V', '').toString().indexOf('Python 3') != '-1') {return 'python3'}
|
if (script.getPersistentVariable('MdNT/pyCommand', '') == '') {
|
||||||
if (script.startSynchronousProcess('python', '-V', '').toString().indexOf('Python 3') != '-1') {return 'python'}
|
|
||||||
return ''
|
if (script.platformIsWindows()) {
|
||||||
|
var defaultPyCommand = 'pythonw'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var defaultPyCommand = 'python3'
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDefaultPyCommand() {
|
if (script.startSynchronousProcess(defaultPyCommand, '-V', '').toString().indexOf('Python 3') != '-1') {
|
||||||
if (script.getPersistentVariable('MdNT/pyCommand', '') == '') {
|
|
||||||
script.setPersistentVariable('MdNT/pyCommand', checkPyCommand())
|
script.setPersistentVariable('MdNT/pyCommand', checkPyCommand())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return script.getPersistentVariable('MdNT/pyCommand', '')
|
return script.getPersistentVariable('MdNT/pyCommand', '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +43,7 @@ Script {
|
||||||
{
|
{
|
||||||
'identifier': 'inboxFolder',
|
'identifier': 'inboxFolder',
|
||||||
'name': 'Inbox folder name',
|
'name': 'Inbox folder name',
|
||||||
'description': 'Name of inbox folder located in the root of note folder. It is single for all note folders.\n' +
|
'description': 'Name of inbox folder located in the root of note folder. An new inbox folder will be created if no exists.',
|
||||||
'An new inbox folder will be created if no exists.',
|
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'default': 'Inbox',
|
'default': 'Inbox',
|
||||||
},
|
},
|
||||||
|
@ -47,7 +51,7 @@ Script {
|
||||||
'identifier': 'scanFolder',
|
'identifier': 'scanFolder',
|
||||||
'name': 'Scan whole folder rather than only Inbox folder',
|
'name': 'Scan whole folder rather than only Inbox folder',
|
||||||
'description': 'If true the script will convert any non-".md" file in folder to note.\n' +
|
'description': 'If true the script will convert any non-".md" file in folder to note.\n' +
|
||||||
'"Sub-folder to single note" and modification times in note titles will still be only for Inbox.',
|
'"Sub-folder to single note" and modification times in note titles features will still work only for Inbox.',
|
||||||
'type': 'boolean',
|
'type': 'boolean',
|
||||||
'default': 'false',
|
'default': 'false',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue