This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Script actions in Quanta+

Tags: quanta, scripts quanta, scripts quanta, scripts
(comma "," separated)
nico80
Registered Member
Posts
5
Karma
0
OS

Script actions in Quanta+

Sun Nov 21, 2010 3:14 pm
Hi everyone,

I am trying to use actions in Quanta+ and I cannot really understand how to go about it...

Essentially, what I would like to do is having Quanta automatically minify .js and .css files before uploading them to my webserver.

I though of writing two little shell scripts that I would execute before and after upload:

Script 1
1) checks if file is .js (or .css)
2) renames it to .js.tmp (or .css.tmp)
3) minifies it and output the file as .js (or .css)

UPLOAD FILE

Script 2
1) deletes minified file locally
2) renames file from .js.tmp to .js

Writing the scripts is easy, but how do I tell Quanta to execute them?

I added two new actions in Settings->Configure Actions and added them before and after document upload in the project properties. I am, however, puzzled at what should I put into the "detailed settings" of the actions and how do I interface them to a shell script...

Any ideas/suggestions will be appreciated :)

nico
nico80
Registered Member
Posts
5
Karma
0
OS

Re: Script actions in Quanta+

Tue Dec 07, 2010 7:26 am
bump... anyone has at least some clues about this?

thanks
nico
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Script actions in Quanta+

Wed Dec 08, 2010 7:03 am
Is this the KDE 3 version or the KDE 4 version?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nico80
Registered Member
Posts
5
Karma
0
OS

Re: Script actions in Quanta+

Wed Dec 08, 2010 7:54 am
KDE 3 (although I'm actually using it in Gnome).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Script actions in Quanta+

Wed Dec 08, 2010 8:32 am
Can you please provide a screenshot of the settings window?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nico80
Registered Member
Posts
5
Karma
0
OS

Re: Script actions in Quanta+

Wed Dec 08, 2010 9:41 am
Sure, here it is:

Image

The options I can choose are:

Input -> None, Current Document, Selected Text
Output and Error -> None, Insert in cursor position, Replace selection, Replace Current Document, Create New Document, Message Window
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Script actions in Quanta+

Thu Dec 09, 2010 4:34 am
It seems that these actions are meant for altering local content rather than affecting what is uploaded.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nico80
Registered Member
Posts
5
Karma
0
OS

Re: Script actions in Quanta+

Thu Dec 09, 2010 7:14 am
Sure, but you can run one of these actions before or after the upload (there's another dialog box in the project settings for that).

So what I wanted was to alter content locally, upload it and then alter it again. Anyhow, I since then resolved the issue in a different way server-side. Still it would be interesting to understand how to use those actions.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar