Open ndbroadbent opened 12 years ago
I think this is a nice idea. I can give you a typical use-case:
Some topics to debate:
Yep, that's a great use-case. I was also wondering about the macro name being in the title, and I think that might be useful. Perhaps both title and description could be supported, somehow?
I was thinking that macros could be stored in a ~/.gcalcron2/macros
directory, and the settings could be moved to ~/.gcalcron2/settings.json
.
Only supporting macros would definitely improve security, but it would also reduce flexibility. It means that you would always need to create a new macro on the server, even for 1 line tasks that happen only once. So I'm not too sure about that.
I've just implemented simple macro support on my macros branch. It includes the changes to ~/.gcalcron2
that I mentioned above, but I'm not sure about that. Maybe macros could be stored in the GCalCron2 directory, in a macros directory? That directory could be added to .gitignore
.
Here's an idea for a feature that I think would be really useful. It's also something that I would be very happy to write, but I wanted to first hear your thoughts. I currently have a task that shuts down my desktop computer at 10:30pm on workdays, otherwise I tend to stay up all night working on projects like this... So in the description of the event, I have the following lines:
I would like to replace this with something like:
This would cause the script to search a
macros
folder in the application directory, or maybe the users HOME directory, for a file calledshutdown
. It would then simply replace that line in the description with the contents of the macro file, and parse the final result. This means that macros could be combined with commands, or even other macros, to create complex tasks.What do you think?