mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Extensions
- Clarification in the extensions document.
This commit is contained in:
parent
86ef048cb0
commit
a7c3858729
3 changed files with 22 additions and 3 deletions
|
@ -35,6 +35,8 @@
|
|||
+ Added feature #714, including Belarus holidays (thanks to Alexei Romanoff).
|
||||
|
||||
# Tracked Bugs, sorted by ID.
|
||||
+ Fixed bug #594, which broke the 'all' report with a combination of bad regex
|
||||
handling and a formatting bug (thanks to Steve Rader).
|
||||
+ Fixed bug #605, which gave misleading project completion percentages under
|
||||
certain circumstances (thanks to Steve Rader).
|
||||
+ Fixed bug #703, where global substitutions didn't make all expected
|
||||
|
|
|
@ -7,8 +7,8 @@ invoked have access to taskwarrior internals through a Lua API.
|
|||
There are several types of extension. Each type has different requirements, and
|
||||
is called in different ways.
|
||||
|
||||
All extensions must be installed, which means they must implement the 'install'
|
||||
function, which provides:
|
||||
All extensions must be installed using the 'install' command, which means they
|
||||
must implement the 'install' function, which returns a set of string values for:
|
||||
|
||||
- Type One of: program, task, uda, command, format, dom
|
||||
- Name Single word name
|
||||
|
@ -19,6 +19,11 @@ function, which provides:
|
|||
- License Distribution License
|
||||
- Copyright Copyright notice
|
||||
|
||||
All extensions, on installation, will be copied into ~/.task/extensions, and the
|
||||
corresponding configuration entry will be created:
|
||||
|
||||
extension.<uuid>=<JSON description block>
|
||||
|
||||
|
||||
Program Hooks
|
||||
-------------
|
||||
|
@ -63,6 +68,7 @@ extensions must provide:
|
|||
- Custom types must implement a compare function for sorting
|
||||
- Default format rendering
|
||||
- Allowed value checking
|
||||
- Urgency calculation term
|
||||
|
||||
|
||||
Command
|
||||
|
@ -75,7 +81,7 @@ provide:
|
|||
- Declaration as read-only or write command, which allows taskwarrior to
|
||||
allow this command when the database is read-only
|
||||
- Declaration of whether the command displays ID values, which instructs
|
||||
taskwarrior to run a GC beforehan
|
||||
taskwarrior to run a GC beforehand
|
||||
|
||||
|
||||
Format
|
||||
|
|
|
@ -59,3 +59,14 @@ function format (value)
|
|||
return value
|
||||
end
|
||||
|
||||
-- Arguments: Value
|
||||
-- Returns: Urgency Term
|
||||
-- Note: Should reference rc.urgency.<field>.coefficient
|
||||
function urgency (value)
|
||||
coefficient = task_get ('urgency.<field>.coefficient')
|
||||
|
||||
-- TODO Urgency calculation here
|
||||
|
||||
return coefficient * 1.0
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue