Giter VIP home page Giter VIP logo

Comments (8)

Maboroshy avatar Maboroshy commented on July 17, 2024

I guess you mean adding features the existing "Taskwarrior" script at this repo by @fmakowski.
The task doesn't look very complex, but the script is. So it depends on your ability to understand script's logic and find that very place to insert few lines making it work for you.

First you need to define a detailed specification of what you want to archive. For me, not being a user of a Taskwarrior script and the app itself, it's not clear enough from your issue.

from scripts.

bepolymathe avatar bepolymathe commented on July 17, 2024

Yes... and sorry, I got the wrong contributor 😲... used to other exchanges on scripts.

Actually, the script recovers:

  • task two +test

To transform it into :

task add task two tags:"test"

And I would like him to recover:

  • task two +test due:2d

To transform it into :

task add task -test due:2d

But I fear that the difficulty comes from the variety of possible formats for the dates in Taskwarrior....

from scripts.

Maboroshy avatar Maboroshy commented on July 17, 2024

What if you'll feed it task two +test due:2d or task two due:2d +test now? Where will due:2d go?

from scripts.

bepolymathe avatar bepolymathe commented on July 17, 2024

If I put

task two +test due:2d

I get a task with the tag "test due:2d"

If I put

task two due:2d +test

I get a task with the title "task two due:2d" but the right tag

from scripts.

bepolymathe avatar bepolymathe commented on July 17, 2024

I'm gonna start getting inspired by things from that side:

if (isTask) {
                        var tags = [];
                        taskDescription = isTask[1];
                        logIfVerbose("Detected task: " + taskDescription);
                        var fetchTag;
                        var tagExp = /^(.+)?[\s*]?\+(.+)$/; 
                        var currentTaskDescription = taskDescription;
                        do {
                            logIfVerbose("Fetching tags...");
                            fetchTag = tagExp.exec(currentTaskDescription);
                            if (fetchTag) {
                                logIfVerbose("Tag " + fetchTag[2] + " found!");
                                tags.push(fetchTag[2]);
                                currentTaskDescription = fetchTag[1];
                                var re = new RegExp("\\+" + fetchTag[2].replace(/ /g, ''), "i");
                                taskDescription = taskDescription.replace(re,'');
                            } else
                                break;
} while(currentTaskDescription);

from scripts.

bepolymathe avatar bepolymathe commented on July 17, 2024

Grrr... Hard to adapt it.

from scripts.

bepolymathe avatar bepolymathe commented on July 17, 2024

@fmakowski any suggestion ?

from scripts.

pbek avatar pbek commented on July 17, 2024

I will close this issue until there is more information.

from scripts.

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.