Skip to content
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

table view #69

Open
korbal opened this issue Oct 22, 2024 · 6 comments
Open

table view #69

korbal opened this issue Oct 22, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@korbal
Copy link

korbal commented Oct 22, 2024

Hey, I just wanted to thank you for this awesome tool, this is exactly what I needed. So very happy with it and it's been working stable for weeks now. :)

I only have one suggestion: to make it easier to parse a large list, maybe include a config option to use a table layout? (something like what otodo does: https://github.com/onovy/otodo )

Anyway, thank you for the tool! :)

@vonshednob
Copy link
Owner

vonshednob commented Oct 23, 2024

Hi there! Thank you for the kind words; I'm really glad to hear that pter is serving you well :)

I had not considered a table-like view before, it's a good idea.

All the better yet, it's actually already possible! Maybe I should provide example configurations to cover these kinds of cases.

In order to get a table-like view, you have to mess with the task-format configuration option in the [General] section of the configuration file (usually expected at $HOME/.config/pter/pter.conf), like this:

[General]
task-format = {selection: >} {nr: >} {done: >} {tracking: >} {due: >} {pri: >} {description}

What this does is, that every field (except description) is right-aligned. In order to do any sort of alignment, pter will have to leave enough room per field, resulting in a table-like view. Instead of the spaces you could also use the vertical bar UTF-8 characters to create columns like this:

[General]
task-format = {selection: >} │ {nr: >} │ {done: >} │ {tracking: >} │ {due: >} │ {pri: >} │ {description}

(note: these are not the pipe symbol, | but box-drawing characters)

image

Have a look at the Task Format section of the help or the pter.config man page for more details on the task-format option and its properties.

Let me know if you think this is enough to cover this idea or whether you feel that the columns should receive headers!

Have fun!

@korbal
Copy link
Author

korbal commented Oct 24, 2024

Thanks a lot @vonshednob !!

I've played around with it and got most of the fields sorted but I guess

Currently, the task-format option doesn't seem to allow for separating different components of a task into distinct columns.

What I'd like to achieve:

  1. Display tasks in a table-like format with separate columns for:

    • Task number
    • Priority
    • Description (main task text)
    • Project(s)
    • Context(s)
    • Note
    • Time spent
    • Pomodoros
  2. The ability to customize the width and alignment of each column.

  3. Optionally, the ability to specify which components should be extracted from the description into their own columns.

Current behavior:
When trying to separate components using the task-format option, all elements still appear in a single line without clear separation. For example:

task-format = {nr: >2} {pri: <2} {description:50.50} {project:15.15} {context:15.15} {note:20.20} {spent}

This doesn't separate the elements of the description as intended. I tried regexes as well, but that didn't work either.

Desired behavior:
A table-like display where each component of the task is in its own column, clearly separated from others. Something like:

image

Is this kind of display possible with the current pter architecture? Again, thank you! :)

@vonshednob
Copy link
Owner

Sounds good to me! Especially the various different columns. But the description column would still contain all project and context tags; the context and project columns would merely repeat the context(s) and project(s) again. Right?

What's the pomodoros column? How's that reflected in a task?

I think the biggest challenge will be the addition of the column width hints; so that might take a bit longer.

@vonshednob vonshednob added the enhancement New feature or request label Oct 24, 2024
@vonshednob vonshednob self-assigned this Oct 24, 2024
@korbal
Copy link
Author

korbal commented Oct 25, 2024

Sounds good to me! Especially the various different columns. But the description column would still contain all project and context tags; the context and project columns would merely repeat the context(s) and project(s) again. Right?

  • That sounds redundant I think. The extra columns would just make it a bit more structured (and adhering to the simplicity credo of todo.txt).

Ah, sorry, I though Pter supported pm: (pomodoros), I've been using pm:1, pm:2 etc anyway :) (like Sleek, pm:1 is recognized as a task needing 1 pomodoro to complete)
image

Is there any way I can help? This is awesome. :)

@vonshednob
Copy link
Owner

vonshednob commented Oct 26, 2024

I had not heard of tomatos in the context of task estimation, but I guess it makes a lot of sense for people that go with pomodoro.

Other people seem to use estimate: in a similar fashion. My proposal is to support both, pm: and estimate: in tasks as well as columns. There would be a configuration option how long a tomato is (default 25m) and the estimate column would sum up both estimate: tags and pm: tags?

Is there any way I can help?

Usually I develop using my personal gitolite repo, but I don’t mind having a development branch on a public repo, too. I just don’t push my code to github anymore, but you can clone the repo from codeberg without having to login. Testing the code as it’s being written is a huge help!
If you want to contribute code or documentation (or maybe a sample configuration file for the table-view configuration) it’s highly appreciate, too! Pull request on codeberg, patches via email, or links to patches on here --- whichever floats your boat 😁

Thanks a lot for offering to help!

Edit: on codeberg use the dev/tableview branch to preview the current development state!

@korbal
Copy link
Author

korbal commented Oct 28, 2024

Sure thing, I'll get to the testing soon! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants