Input Attributes in Shell Scripts

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Input Attributes in Shell Scripts Thu Jan 10, 2019 5:40 am • by Robert
I am a total noob with scripting – but learned a lot in the last three weeks since I got Hazel: and I really love how it works with Hazel and what it can do. Just for my understanding: is there a reason why you cannot inputAttributes in shell scripts like $1, $2, $3?
In some cases that would be really lovely to have. For example in adding different metadata to files with shell script.
"Behind all the inhuman aspects of automation (...) its real possibilities appear: the genesis of a technological world in which man can finally withdraw from (...) the apparatus of his labor – in order to experiment freely with it." /Marcuse
Robert
 
Posts: 35
Joined: Sun Dec 16, 2018 8:05 am

Re: Input Attributes in Shell Scripts Thu Jan 10, 2019 11:33 am • by Mr_Noodle
That would work for textual attributes but not for date ones, I would need to standardize on a specific date format which might be tedious to parse as I'd need to include everything about the date including timezone. I guess I could let the user specify that but then that's extra UI.

Output attributes are the real problem as shellscripts do not have a good channel to transmit that back (they can only return a numerical code). So I'd would probably have to do a whole different UI for input attributes for shellscript than AppleScripts.
Mr_Noodle
Site Admin
 
Posts: 7706
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Input Attributes in Shell Scripts Mon Jan 14, 2019 8:46 pm • by Robert
Mr_Noodle wrote:That would work for textual attributes but not for date ones, I would need to standardize on a specific date format which might be tedious to parse as I'd need to include everything about the date including timezone. I guess I could let the user specify that but then that's extra UI.

Output attributes are the real problem as shellscripts do not have a good channel to transmit that back (they can only return a numerical code). So I'd would probably have to do a whole different UI for input attributes for shellscript than AppleScripts.


Thank you for the clarification and the great support on this forum (and of course for Hazel, which is amazing!).
"Behind all the inhuman aspects of automation (...) its real possibilities appear: the genesis of a technological world in which man can finally withdraw from (...) the apparatus of his labor – in order to experiment freely with it." /Marcuse
Robert
 
Posts: 35
Joined: Sun Dec 16, 2018 8:05 am


Return to Open Discussion