You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
R 441835c2a2 web interface boilerplate 11 months ago
dtask web interface boilerplate 11 months ago
.gitignore vim files in gitignore 11 months ago
LICENSE init 1 year ago
MANIFEST.in init 1 year ago
README.md Location of dtask.conf 1 year ago
example.conf Colors! 1 year ago
requirements.txt web interface boilerplate 11 months ago
setup.py add gitea to the setup.py 1 year ago

README.md

dtask

Task tracking based on ical TODOs.

Basic Usage

To use dtask, you have to have a configuration file and then start the dtask server like this:

$ dtask server

Configuration

The configuration file is usually expected at ~/.config/dtask.conf, but you can choose a different location with the -c parameter to dtask.

$ dtask -c /etc/dtask.conf server

There is an example configuration file available in the source repository with a lot of documentation. A configuration usually looks something like this:

[General]
minworktime = 5m
tracking = source1
timezone = GMT

[Server]
socket = localhost:12345

[Shell]
due_icons = "!@+ "

[source1]
name = My Calendar
type = folder
path = ~/.calendars/private/default

[source2]
type = gitlab
token = your_magic_gitlab_token
url = https://gitlab.com

[source3]
type = gitea
token = your_other_magic_token
url = https://gitea.example.org

The configuration file consists of sections of which two are fixed: General, Server, and Shell.
Every additional section is a source of tasks.

Aside from their special options, every source has these options:

  • type: the type of the source.
  • name (optional): a human-readable name to distinguish the source from others If it’s not provided, the section’s name is taken for the name.
  • enabled (optional): whether or not the source is enabled. Use 'yes', 'y', 'on', 'true', or '1' to indicate that it is enabled. Any other value is understood as 'no'. By default a source is enabled, so unless you want to disable a source, you don’t have to provide this option.
  • tags (optional): comma separated list of tags that are added to each task from this source

These types of sources are supported:

  • folder, which is a folder of ics files (calendar files)
  • gitlab, which is a GitLab server where you have an account
  • gitea, for a Gitea server where you have an account

folder source

A folder source expects the option path. It should be the path to a folder containing your ics files. Subfolders in that path are not supported!

All VTODO objects of that folder are then considered as tasks for the purpose of tracking.

gitlab source

With the gitlab source you can use all issues that are assigned to you to track your work.

A gitlab source expects two options:

  • url: the base URL to your gitlab server (e.g. https://gitlab.com )
  • token: your API access token at that gitlab server

There are two more option, which are enabled by default:

  • repository_as_tag: have the repository name as a tag for each task
  • include_unassigned: also include tasks that have not been assigned to anyone yet

gitea source

With the gitea source you can use all issues in all repositories that are assigned to you to track your work.

The following options are expected by you:

There are two more option, which are enabled by default:

  • repository_as_tag: have the repository name as a tag for each task
  • include_unassigned: also include tasks that have not been assigned to anyone yet

Architecture

dtask has a server/client architecture.

The server understands a simple language (ABNF):

PHRASE = WORD (SP PHRASE / LF)
WORD = *(ALPHA / DIGIT)

Commands

The server understands the following commands:

  • TASKS: send a base64 encoded JSON list of all tasks
  • START (task id|base64(json)): start tracking of task with that task id. Stops tracking of any other running task. Task ID is optional.
  • STOP [extra]: stops tracking of the active task. extra may be base64 encoded json dict overriding task's properties (eg. title, tags)
  • ACTIVE: report the active task
  • CANCEL: cancel the active task, i.e. any tracked time is lost
  • REPLACE (task id|base64(json)): change the active task to be task id instead of whatever it is actually
  • REPORT timespec: Give a list of tracks that were tracked during these base64 encoded timespecs (timespans, dates)
  • RELOAD: Reload all tasks from the sources
  • KILL: stop the server