Bug 163079

Summary: "autoscript" on a folder
Product: [Plasma] plasma4 Reporter: François Tissandier <francois.tissandier>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: h.klene
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description François Tissandier 2008-06-02 17:14:55 UTC
Version:            (using Devel)
Installed from:    Compiled sources

Nautilus on Gnome offers the possibility to run scripts manually for each file by right clicking on it. I don't know if it's possible with Dolphin/Konqueror/Plasma on KDE4, but I think it could be improved by giving the possibility to associate one particular script to a folder to make it
"autorunnable" for each new file in this folder, like the action folders on Mac.

Examples:

-you want to convert .odt documents in PDF. You create a directory called "PDF"
and you associate it with a script which converts any .odt or .doc document
into a PDF. Each time you copy a file in this folder, it's automatically
converted into a PDF document. 

-you want to convert some photos into JPG and with a width of 1280px. You
create a folder called "JPG_1280w" for instance, and associate it with a script
converting any image into a jpg with this specific width. Then you just have to
drag and drop files on this directory to have them converted.

-you want to convert songs into mp3. You create a "MP3" folder, with specific
settings for conversion, and that's it, you just have to copy files in this
folder to have them converted.

I find this feature to be extremely user friendly. It cannot really be simpler:
just drag and drop on the folder, and it will work in the background. You know
exactly where the result will be located, and that you will keep a copy of the
original. 

It's NOT meant to replace the scripts, but to work as some kind of user
friendly front-end for it. You can still keep a flexible script to convert
audio files for instance, and create 2 "autofolders" from it: one "ogg-128" to
create 128kbits/s files for your portable audio device, and one "ogg-256" for
your computer. 

It will easily look more user friendly than scripts, as you can put a specific
tag on each folder, and also use a specific icon for those folders (with a special color for instance, or a border).  

It could also be used for network shared folders: this way everybody can use a
script created on a server. For instance you can create a folder called
"sendFTP" on your server, have it visible for everybody, and when someone put a
new file in this folder, it's automatically sent by FTP to a server somewhere. 

The possibilities are really endless. It could work with Plasma/Konqueror/Dolphin. 

Of course there are security issues, but I think that if someone is able to modify the properties of a folder, he does not really need to use scripts to mess everything.
Comment 1 Mark Constable 2008-06-02 17:56:07 UTC
Absolutely brilliant idea, I hope it gets implemented. As for security, I can't see it being any worse than a user manually deleting every file in their homedir if they care to and downloading and installing a potenitally nasty trojan laden folder script is also no worse a possibility than an apt-get of a package from a unofficial third party repo.
Comment 2 Holger 2016-07-26 16:56:10 UTC
This really seems as easy, as ripping a CD. But there is a significant difference: The Audio-CD was there first and doesn't change during the course of actions.

So what's the point of having multiple scripted folders all over the place, if all you want to achieve is to convert files? As conversions are almost always lossy, I strongly recommend against leaving such an open trap lying around. Moreover the original suggestion involves two copy/move actions, because you would not want the converted results to stay in the conversion folder. So you have to select your current working set twice.

Reconsidering the Audio-CD example, what's really needed IMHO is a kind of filter overlay on the folder, to give an easy copy source, that's deactivated on leaving the folder, much like Ctrl-i works. Say, I'm in a folder of wavs and mp3 and activate a wav2ogg filter. All fileextensions of wav change to ogg (hiding mp3 and other unconvertible files), although no file has been converted jet. Now I select those I want and drag them over to another folder. Only after the drop, conversion starts.
Comment 3 Nate Graham 2018-06-08 20:10:04 UTC
Hello!

This feature request was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this feature request is already implemented in Plasma 5, or is no longer applicable.

Accordingly, we hope you understand why we must close this feature request. If the requested feature is still desired but not implemented in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham