kcmerrill / alfred

(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
MIT License
63 stars 14 forks source link

feedback: Awesome tool #40

Closed iilyak closed 7 years ago

iilyak commented 7 years ago

Alfred is an awesome. Thank you for developing it.

I am very excited about opportunities which the tool provides and looking forward to use it for various things. I hope it is ok to share my scenarios with you just in case you find it helpful for yourself and implement something similar eventually. I am sorry for the long post and list of features. I clearly understand that it is an open source project and most of the features wouldn't be implemented due to lack of time. However I wanted to share just to brainstorm some ideas.

There are so many tools which do something very similar. Finally I think I found the one which I could use for my tasks (Alfred). The list of somewhat similar tools:

I was looking for a tool which

kcmerrill commented 7 years ago

@iilyak,

Thanks for the feedback! I appreciate it.

I am always looking on github for other similiar projects(robo was actually the inspiration for alfred, it just didn't have the featureset I wanted). I will check out the other tools and see if there are any fun ideas in there I can add to alfred as I'm always looking to improve it's functionality and featureset.

I will try to go in order regarding some of the features. Some I think are out of the scope of Alfred, but others I believe should be trivial to implement via the shell with how Alfred is currently constructed.

Regarding event listeners: Most of these can be accomplished by polling data on the cli.

Data Extraction: This is a good one. I've been thinking about this for a while now. I really love the idea behind https://github.com/marianogappa/sql but was thinking about doing something more generic for data extraction. Regarding this, I've created two feature cards for json/csv data manipulation. This might be a feature, or this might be a standalone app that alfred can interact with. Not sure yet ...

Trigger different actions: There isn't anything built in ... however because you can extend alfred using modules sending an im, http request, slack message is pretty trivial and that functionality already exists(so long you can do it from the shell). Take a peek at this module: https://github.com/kcmerrill/alfred/blob/master/modules/notify/alfred.yml along with it's usage. Just set it up to an ok/fail task and you're all set.

Ability to skip steps: I've been thinking about this too and I like this idea. I was thinking about adding checkpoints, and if the checkpoint exists then simply skip the task. I added an issue to keep track of this too.

Managing credentials: I can see the value add here, I'm just not sure if this would/should fit in alfred

Persistent keystore: I like this idea. When setting/retrieving vars see if the value already exists somewhere(could be a yaml file, flat text file, json, boltdb etc ..). This would be incredibly useful for storing and incrementing build numbers as an example. I created a issue to keep track of this one.

Templating engine: Alfred utilizes the golang template, so you get the full power of go templates. So in your commands/tasks etc you can easily add if statements, checks, for loops etc! You can read more about the templating here: https://golang.org/pkg/text/template/. Having said that, I should probably put that in the manual, so I've added an issue for that as well.

Stdin/Stdout: Not sure if this is what you were thinking, but I've always wanted to add something like echo "hello world" | alfred taskname and have the task be able to do something with it. I think it works for stdin but i'm not 100% certain. Would need some testing/validation. An issue was created for this as well.

Anywho ... I think that about covers it. Again, thanks for the feedback. I appreciate it!

khia commented 7 years ago

however because you can extend alfred using modules sending an im, http request, slack message is pretty trivial and that functionality already exists(so long you can do it from the shell). Take a peek at this module: https://github.com/kcmerrill/alfred/blob/master/modules/notify/alfred.yml along with it's usage. Just set it up to an ok/fail task and you're all set.

This approach is subject to system limit getconf ARG_MAX. On linux the max length of a command is about 2Mb. So you have to save into a file in /tmp and pass the name of the file to mail command. However I do agree it would work.

Regarding event listeners: Most of these can be accomplished by polling data on the cli.

I was thinking that alfread could run a plugin which would be a process which always run. The job of the process is to implement the subscription and send the data back to alfred over stdout when there is new event. This would assume that alfred is running as a daemon. I can clearly see how it would complicate things though.

iilyak commented 5 years ago

Somewhat related: Today I came across converge. Which does something similar to alfred. The Converge engine first checks your system and calculates the differences that need to be applied. Once changes are applied, another check is run to ensure that the system has reached the desired state.

good

bad