Code Monkey home page Code Monkey logo

Comments (4)

Nukesor avatar Nukesor commented on June 12, 2024 4

I already assumed that this request would pop up :D

Yep, this is definitely a missing feature and should also be fairly easy to do :)

from pueue.

Nukesor avatar Nukesor commented on June 12, 2024 1

Here's a thought.
What do you think about making the editing process a bit more accessible and less cumbersome.

I'm currently thinking about exposing all editable properties of a task into temporary well-formatted file (probably YAML, since we're already heavily using this).
One would then just go ahead and call pueue edit $TASK_IDS and a single editor instance would be spawned from which the whole task could be edited in a single view.

from pueue.

Nukesor avatar Nukesor commented on June 12, 2024

On a second thought, this would go hand-in-hand with issues due to YAML's reserved characters and multiline formatting.

I would really like to have a single screen where users can edit all properties of a task, but I'm not sure how this could be achieved without being too hacky...

The current approach via flags just feels a bit clunky. Having multiple editors popping up to edit a single task really isn't convenient at all.

from pueue.

JP-Ellis avatar JP-Ellis commented on June 12, 2024

I think there's merits to both methods.

To have a single screen where users can edit all properties of a task sounds great for situations when I want to interactively edit everything. As to achieving this, I think a method similar to sudoedit might be good. That is, use a temporary file and open up the user's favourite editor to make edits. The temporary file in this case would contain a JSON or YAML representation of the tasks. You would need to handle a bit of logic to validate the input, and decide how much you just want to trust end users or not. I do suspect this might be a bit more involved to implement.

The alternative of using flags lends itself nicely to edit a single property easily, and more automated workflows (e.g., xargs). I do agree that it runs the risk of adding a lot of flags though. Two things I can think of:

  • Be a bit selective as to which flags you want to support. For example, editing the priority seems like a bit of a no-brainer to me. Editing the task itself however seems prone to error and might be better suited to just deleting the task and adding a new one.
  • Hiding a lot of the flags behind an --help-all or similar flag. This way, the help text isn't overloaded with hundreds of flags, but these can still be discovered relatively easily and access very easily.
  • Using a two-argument flag of the form pueue edit X --property foo val1 --property bar val2. This avoids having too many flags, but also provides a lot of flexibility.

from pueue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.