Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

aaschmid/taskwarrior-java-client

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codebeat badge License Issues

taskwarrior-java-client

Table of Contents

What is it

A Java client to communicate with a taskwarrior server (= taskd).

Motivation and distinction

The current taskwarrior Android app does not satisfy may requirements. Therefore I created this client library to integrate it into my prefered task app. And I also want to share it with everybody who will love to use it.

Requirements

  • JDK 8

Download

Currently there is no released version available but feel free to clone / fork and build it yourself. If you would love to see this on Maven Central feel free to create an issue.

Usage example

For example using it with Java:

import static de.aaschmid.taskwarrior.message.TaskwarriorMessage.*;

import java.net.URL;
import java.util.HashMap;
import java.util.Map;

import de.aaschmid.taskwarrior.config.*;
import de.aaschmid.taskwarrior.internal.ManifestHelper;
import de.aaschmid.taskwarrior.message.TaskwarriorMessage;

public class Taskwarrior {

    private static final URL PROPERTIES_TASKWARRIOR = Taskwarrior.class.getResource("/taskwarrior.properties");

    public static void main(String[] args) throws Exception {
        if (PROPERTIES_TASKWARRIOR == null) {
            throw new IllegalStateException(
                    "No 'taskwarrior.properties' found on Classpath. Create it by copy and rename 'taskwarrior.properties.template'. Also fill in proper values.");
        }
        TaskwarriorConfiguration config = new TaskwarriorPropertiesConfiguration(PROPERTIES_TASKWARRIOR);

        TaskwarriorClient client = new TaskwarriorClient(config);

        Map<String, String> headers = new HashMap<>();
        headers.put(HEADER_TYPE, "statistics");
        headers.put(HEADER_PROTOCOL, "v1");
        headers.put(HEADER_CLIENT, "taskwarrior-java-client " + ManifestHelper.getImplementationVersionFromManifest("local-dev"));

        TaskwarriorMessage response = client.sendAndReceive(new TaskwarriorMessage(headers));
        System.out.println(response);
    }
}

Used taskwarrior.properties can be created by copying and adjusting src/main/resources/taskwarrior.properties.template.

Release notes

Currently there are no releases available, see Release Notes

About

A Java client to communicate with a taskwarrior server (= taskd).

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.