Giter Club home page Giter Club logo

Comments (9)

linuxcaffe avatar linuxcaffe commented on July 18, 2024

some icing on this non-existent cake might be to adopt (piggy-back on) the taskwarrior column formats, so that the above example would be

g:taskwiki_fields = '%desc.truncated [%project.parent] | (%recur.indicator %due) %tags

which might look like;

* [ ] call Sue about bagpipe lessons...[music] (R 2015-03-20) :skills:weekly:txn:

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

Now this is quite complex. You need to keep in mind that the sync goes both ways, so for each field defined, taskwiki needs to learn:

a) How to parse it from the line
b) How to convert it to a string

Currently we solve a) by using a regexp that matches a line with a task, and b) is hardcoded to the format the regexp recognizes.

To make this generic, we would have to users enter regexps in the configuration, and b) would need to be solved too.

This probably could be done if we defined a clear set of building blocks, and for each of them define how to parse them in the core, however, this is a overkill for our currently quite small userbase.

If anybody steps in wanting this with PRs, I'll gladly collaborate.

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

Some more thoughts:

Having a global template for all the tasks does not make sense. For example, consider the template you proposed:

 g:taskwiki_fields = '%desc.truncated [%project.parent] | (%recur.indicator %due) %tags

This works very well for the ViewPort that looks like this:

== Today's tasks | due.before: today ==
* [ ] Important work task [Work]
* [ ] Some home chore [Home]

where the projects are diverse and the showing up of the projects makes sense.

However, with a ViewPort like this one:

== Work tasks | pro:Work ==
* [ ] Work task 1 [Work]
* [ ] Work task 2 [Work]
...

So we can see one global format will not work. This will have to be a per-ViewPort configurable setting, and since the definition is quite long, mutliple styles would have to be stored in the .vimrc and the ViewPort would only specify which style to use.

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

Clearing this one out of backlog right now. It's not going to happen unless somebody steps in anytime soon.

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

I am going to reconsider this one.

from taskwiki.

linuxcaffe avatar linuxcaffe commented on July 18, 2024

my "working" copy of this is https://github.com/linuxcaffe/taskwiki-template/tree/dev.
In the dev branch I removed non-taskwiki-related templates. This is significant because in master (vim-template with added taskwiki templates) templating would occur on creating almost any type of file,, but with all but taskwiki-related stripped out, it's actually usable for me.

I still need to

  • clean up the templates (they're too verbose, user-specific and inconsistent)
  • pull changes from vim-template, merge dev to master
  • better document the default locations and file-naming conventions.
  • improve gen-index script (https://github.com/linuxcaffe/taskwiki-utils)

before it could be considered usable

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

Correct me if I'm wrong, but you're talking about file templates, while the issue talks about per-task templates (i.e. templates for representation of the tasks in the buffer), right?

from taskwiki.

linuxcaffe avatar linuxcaffe commented on July 18, 2024

OMG you're absolutely right, when this issue was filed (a year and a half ago) it was in reference to in buffer representation, and since then I have been working on file templates.

So the comments I made above would relate to file-templates, which is a different (if potentially related) and I should start a separate issue for that.

from taskwiki.

tbabej avatar tbabej commented on July 18, 2024

Closing unless some brave soul volunteers to implement this.

from taskwiki.

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.