-
Notifications
You must be signed in to change notification settings - Fork 135
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
Enhance pueue edit
UX
#553
Comments
Thanks for the detailed feature request :) I already thought about this some time ago, over here. I would like to take some time to re-evaluate on which approach is the most user-friendly, but this'll have to wait for a bit :) |
pueue edit
UX
So, I thought about this for quite some time and this problem is pretty tricky. As users can theoretically start any valid shell syntax in any shell they like (as the shell is configurable), we have practically no guarantees on how the input will look like. To keep this convenient, we must allow multi-line editing. Strings with "\n" inside of it aren't an option. So, after some discussions with friends and other people, we came up with the idea to instead of creating a temporary file, to rather create a temporary directory with a file for each property to add. All modern editors have directory/file tree support, so users can simply select the files they're interested in and edit without any file format constraints. I really like this solution as it is very simple and outsources the UI issue to the user's editor, which is a highly specialized tool for editing multiple files. |
This could then be expanded for multiple tasks, where we create subdirectories for each task to edit with the ID being the name of the subdirectory. |
Hi thanks for the new feature! Here is my naive thoughts: Maybe we can let user edit a YAML file. For example,
Or in TOML:
Pros:
Extension:
If we want to allow multiline edit without "\n" in it: YAML has nice multiline string support https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines. TOML also have https://toml.io/en/. |
Using yaml or toml was one of the very first ideas. I actually like yamls Regardless of that, there're multiple pros and cons for both sides. File based structurePros
Cons
Structured DataPros
Cons
A friend of mine proposed to make this configurable and allow both solutions. I tend to go towards that approach as I see that the structured data solution is nicer for some users and is easier to use when your editor doesn't have a file tree. |
Thanks for the reply! I personally love the structured data approach, so my thought below are opinionated :)
Thus curious whether TOML has one for that
I guess it is intuitive enough that it is not hard for users to realize the format.
https://toml.io/en/ seems to support "literal string" like below. Thus, seems there are zero reserved characters (except for three consequtive quotes
Looking forward to it! |
I'm going to build this, but I just want to drive home my point of view.
Pueue is being used by quite a few people in the science sector, specifically machine learning. Those aren't necessarily ver tech savy.
For this, users need to know about As I said, I plan to support both approaches, I just want to make clear that it isn't that easy. |
I see, good point! Btw, people in machine learning are often using python nowadays (I am also doing machine learning). But yes, often they do not work with TOML (maybe pyproject.toml is often the only toml they will see?).
For this, not sure whether we can generate toml with comments like:
|
I'm open to contributions on this one :) If anyone wants to work on this, feel free to go ahead. I currently have quite a bit on my plate and don't know when I'll get to it :) |
Hello, and thank you for this very useful program!
I often forget to pass some options when adding new tasks,
and find myself needing to edit those, often in batch.
The current
edit
sub-command opens an editor for each value to edit,which is quite cumbersome when just wanting to replace a value,
especially for multiple tasks at once.
Therefore, I think it would be nice for the
edit
sub-command to:to be applied to all the specified tasks at once.
Current help text of the
edit
sub-command:Target help text with the suggested additions:
When no replacement option is supplied on the CLI,
the default EDITOR can be used to edit the properties.
But instead of opening the EDITOR for each value for each task individually,
this could be done in a combined way in a single YAML or TOML file.
For example, running
pueue edit 0 1
would open an EDITOR with:Since the current
edit
sub-command is quite interactive,these modificatinos shouldn't break existing automated user scripts.
The text was updated successfully, but these errors were encountered: