-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularize? #2
Comments
This is a good idea. Using So are you suggesting that I do away with the Could you provide a more in-depth example for how this would work? Where are some place you would put Thanks for all your input! |
I've been thinking more about this and I think the concept of "meta" script would add needless complexity. What about the following?
|
The upside of using config files is that you can store them in music folders / libraries, thus making it easy to call Demlo with the right config (that is, script selection) contextually. |
I do admit that tag extraction should be in its own script; I just never got around to separating it. How do you propose to deal with the issue of fine-tuning how tags should be extracted? Currently it reads variable As for the other options you suggest... well, they seem kind of "hacky" to me. Although I do think demlo should have a Though this is basically doing what my 'profile' scripts were trying to do. Each profile script would set up the rest of the scripts to carry out execution for a specific use case. Why not combine those with your idea of metascripts—just putting in more boolean variables to control execution of later scripts? |
Doesn't it work with
Regarding the meta-scripts / profiles: I think sticking to "profiles" is simple enough and it works well as long as scripts are modular enough. |
Ah I forgot about How does taking the config file from the command line complicate the implementation? And ok good, let's stick with profiles. |
It's a bit stupid, actually: the config and the commandline parameters tweak the same variables. Now which one has precedence? https://golang.org/pkg/flag/#FlagSet Probably not very hard, but if the Regarding this issue: we can close it for now, but I'm still very interested to bring some of your stuff upstream. |
Many of the your scripts contain a lot useful stuff. But much of it is packed together in a way that makes it hard to re-arrange their composition from the commandline.
One of Demlo's strength is specifically to trigger which "component" to execute at runtime.
A simple
-s foo
or-r bar
is enough. When several features are within one scripts, that's much harder.With that, it's also possible to have "metascripts" that enable a set of scripts.
Take the following example:
Then the user can simply select the right metascript with all the normal scripts on and it will do the right thing.
This is similar to what you've done with the
globals
script, except that it is easier to tweak from commandline: auto-completion can list both the scripts and the metascripts. No need for extra variables nor extra documentation. No need for cumbersome-pre
scripts either.What do you think?
The text was updated successfully, but these errors were encountered: