Comments (14)
A default cache folder might be useful to add to the API. I see what I can get done next week.
from scripts.
Can you please mention the authors of the script.
from scripts.
Calling @r00tr4v3n!
from scripts.
Although @pbek, I naively put in a:
script.startSynchronousProcess('/usr/bin/touch', ['/tmp/hi']);
and it didn't seem to work. Do startDetachedProcess
and startSynchronousProcess
work on Mac?
from scripts.
and it didn't seem to work. Do
startDetachedProcess
andstartSynchronousProcess
work on Mac?
Maybe I broke those for Mac on the last PR? I'll have a look later.
from scripts.
Do startDetachedProcess and startSynchronousProcess work on Mac?
Yes, they should work.
e.g. startDetachedProcess
works like that:
https://github.com/pbek/QOwnNotes/blob/da7c23f11062f91c53578c94836cee1b69b18d5d/src/utils/misc.cpp#L401-L437
from scripts.
Warning: QQmlComponent: Component is not ready ((null):0, (null))
Warning: script errors: (file:///Users/jeff/Library/Application Support/PBE/QOwnNotes/scripts/latex-math/latex-math.qml:1:1: module "QtQml" version 2.14 is not installed
import QtQml 2.14
^) ((null):0, (null))
This shouldn't happen in the first place independently from other script API calls.
Maybe a problem with the Qt version on Mac?
from scripts.
Hi @r00tr4v3n , why do you think this shouldn't happen, and why do you suggest it's a problem with the Qt version?
Also, what do you think of my comment on theexecBashDetached(rm ${workDir}/*)
, which I think is very risky?
from scripts.
Since he is complaining about the imports and doesn't even reach the function calls, I suspected it to not be the scripts fault.
Good hint on the rm command. At least directories should be fine though. I could add a file suffix like rm ${workDir}/*.lat
?
from scripts.
@r00tr4v3n I don't have that problem with the @pbek 's script paste-latex-image.qml
, which does import QtQml 2.0
rather than import QtQml 2.14
.
It seems that all example scripts in the scripting/examples
use import QtQml 2.0
.
QOwnNotes seems to be packaged with Qt 5.13.2. According to the QML documentation for QT 5.13.2, you should use import QtQml 2.13
if you must use the latest features. 2.14 seems to be an invalid version of QtQml for Qt 5.13.2.
Are you sure you are only using the QtQml version packaged with the QOwnNotes binary, and you aren't using your own QOwnNotes binary with a different version of QtQml, or didn't otherwise alter the import path used by your script during development?
As for the rm
command, I think it would be best to just store the files by default in ~/.cache/latex-math
. If you want to allow a user to specify a different folder, then I think the script should still create a latex-math
subfolder which you can delete without worry. If you don't like that solution, I think it would still be better to simply warn the user that all of the contents of the given directory will be deleted (and should not be set to ~/Desktop
!
from scripts.
I might have copied the import version from another script, I can just change it to 2.0.
The default folder would cause problems with Windows users, I'd have to set the defaults according to the operating system.
from scripts.
Yes, I should have said, [user cache folder]/latex-math
. I think you can get the platform-dependent path via the QStandardPaths Class.
My main point was that, if you allow the user to specify the directory, you should either warn the user that its contents will be deleted, or create your own latex-math
subfolder at the given location.
from scripts.
Please have a look at the update, see if it works for you.
from scripts.
I will close this issue until there is more information.
from scripts.
Related Issues (20)
- [SUPPORT] Stuck trying to get Backlinks script to work HOT 4
- [SUPPORT] Mermaid diagrams script: theme configuration for sequenceDiagram HOT 6
- [BUG] Latex Math v0.0.6 script doesn't update pictures when color style is changed HOT 7
- [BUG] Toggle checkbox - checkbox where added in wrong place when autocreated from list HOT 5
- [FEATURE] Add video display support HOT 3
- [BUG] The "YAML nested tags" script breaks formatting and causing text lost in preview HOT 4
- [BUG] "exportFolder is not defined" in export-notes-as-website HOT 7
- [BUG] A Wiki Link to a note under notes sub-folder gives pop up "Note was not found" even if it exists HOT 4
- [SUPPORT] HOT 11
- [SUPPORT] HOT 2
- [SUPPORT] LateX Math results in very aliased images HOT 8
- adding favorite note script results with error " Expected a qualified name id"[BUG] HOT 10
- [SUPPORT] HOT 7
- [BUG] can't follow [[wiki linked]] file links that have spaces HOT 2
- [BUG] Scripts "export note as website" not working properly on Windows HOT 7
- [BUG] export note using pandoc not working on windows HOT 2
- [BUG] Backlinks doesn't support setext headers for title HOT 6
- [BUG] LaTeX math script generates empty icons instead of images HOT 3
- [BUG] Backlinks on Windows HOT 8
- [BUG] meeting-note filename when headline prefix is empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scripts.