mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Merge branch '2.3.0' into 2.4.0
Conflicts: AUTHORS CMakeLists.txt NEWS src/A3.cpp src/CMakeLists.txt src/Config.cpp src/Duration.cpp src/Duration.h src/Nibbler.cpp src/Nibbler.h src/RX.cpp src/RX.h src/columns/ColDate.cpp src/columns/ColScheduled.cpp src/commands/Command.cpp src/legacy.cpp src/utf8.cpp src/utf8.h test/CMakeLists.txt test/bug.mergedeps.t.postponed test/duration.t.cpp test/merge.duplicates.t test/merge.simple_duplication.t test/merge.t test/nibbler.t.cpp test/roundtrip.t test/rx.t.cpp test/utf8.t.cpp
This commit is contained in:
commit
98f740e9d1
550 changed files with 6129 additions and 2976 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@ install_manifest.txt
|
|||
_CPack_Packages
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
patches
|
||||
*.exe
|
||||
|
|
16
AUTHORS
16
AUTHORS
|
@ -86,6 +86,15 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
|||
Russell Steicke
|
||||
YBSAR
|
||||
Ben Armstrong
|
||||
Tullio Facchinetti
|
||||
Thomas Sullivan
|
||||
Martin Natano
|
||||
kili
|
||||
jasper
|
||||
Aaron Bieber
|
||||
John West
|
||||
Jeroen Budts
|
||||
Zed Jorarard
|
||||
|
||||
Thanks to the following, who submitted detailed bug reports and excellent
|
||||
suggestions:
|
||||
|
@ -176,3 +185,10 @@ suggestions:
|
|||
alparo
|
||||
Roy Zuo
|
||||
Friedrich Heusler
|
||||
Ben Armstrong
|
||||
XTaran
|
||||
John West
|
||||
Dmitriy Matrosov
|
||||
Michele Santullo
|
||||
Scott Kroll
|
||||
Kosta H
|
||||
|
|
|
@ -34,6 +34,17 @@ else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||
set (UNKNOWN true)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
if (FREEBSD)
|
||||
SET (TASK_MAN1DIR man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
SET (TASK_MAN5DIR man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
else (FREEBSD)
|
||||
SET (TASK_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
SET (TASK_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
endif (FREEBSD)
|
||||
SET (TASK_DOCDIR share/doc/task CACHE STRING "Installation directory for doc files")
|
||||
SET (TASK_RCDIR "${TASK_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files")
|
||||
SET (TASK_BINDIR bin CACHE STRING "Installation directory for the binary")
|
||||
|
||||
message ("-- Looking for SHA1 references")
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
|
||||
set (HAVE_COMMIT true)
|
||||
|
@ -83,8 +94,6 @@ if (READLINE_FOUND)
|
|||
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${READLINE_LIBRARIES})
|
||||
endif (READLINE_FOUND)
|
||||
|
||||
check_function_exists (random HAVE_RANDOM)
|
||||
check_function_exists (srandom HAVE_SRANDOM)
|
||||
check_function_exists (timegm HAVE_TIMEGM)
|
||||
check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME)
|
||||
|
||||
|
@ -92,31 +101,29 @@ check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
|
|||
check_struct_has_member ("struct stat" st_birthtime "sys/types.h;sys/stat.h" HAVE_ST_BIRTHTIME)
|
||||
|
||||
message ("-- Looking for libuuid")
|
||||
if (DARWIN)
|
||||
# Apple includes the uuid functions in their libc, rather than libuuid
|
||||
set (HAVE_UUID true)
|
||||
if (DARWIN OR FREEBSD)
|
||||
# Apple and FreeBSD include the uuid functions in their libc, rather than libuuid
|
||||
check_function_exists (uuid_unparse_lower HAVE_UUID_UNPARSE_LOWER)
|
||||
else (DARWIN)
|
||||
else (DARWIN OR FREEBSD)
|
||||
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
|
||||
find_library (UUID_LIBRARY NAMES uuid)
|
||||
if (UUID_INCLUDE_DIR AND UUID_LIBRARY)
|
||||
set (HAVE_UUID true)
|
||||
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${UUID_INCLUDE_DIR})
|
||||
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${UUID_LIBRARY})
|
||||
# Look for uuid_unparse_lower
|
||||
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${UUID_INCLUDE_DIR})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${UUID_LIBRARY})
|
||||
check_function_exists (uuid_unparse_lower HAVE_UUID_UNPARSE_LOWER)
|
||||
else (UUID_INCLUDE_DIR AND UUID_LIBRARY)
|
||||
message (FATAL_ERROR "-- libuuid not found.")
|
||||
endif (UUID_INCLUDE_DIR AND UUID_LIBRARY)
|
||||
endif (DARWIN)
|
||||
endif (DARWIN OR FREEBSD)
|
||||
|
||||
if (HAVE_UUID AND HAVE_UUID_UNPARSE_LOWER)
|
||||
if (HAVE_UUID_UNPARSE_LOWER)
|
||||
message ("-- Found libuuid")
|
||||
elseif (HAVE_UUID AND NOT HAVE_UUID_UNPARSE_LOWER)
|
||||
else (HAVE_UUID_UNPARSE_LOWER)
|
||||
message ("-- Found libuuid, using internal uuid_unparse_lower")
|
||||
else (HAVE_UUID AND HAVE_UUID_UNPARSE_LOWER)
|
||||
message ("-- libuuid not found, using internal uuid")
|
||||
endif (HAVE_UUID AND HAVE_UUID_UNPARSE_LOWER)
|
||||
endif (HAVE_UUID_UNPARSE_LOWER)
|
||||
|
||||
# Set the package language.
|
||||
if (LANGUAGE)
|
||||
|
@ -129,6 +136,7 @@ set (LANGUAGE_EN_US 1)
|
|||
set (LANGUAGE_ES_ES 2)
|
||||
set (LANGUAGE_DE_DE 3)
|
||||
set (LANGUAGE_FR_FR 4)
|
||||
set (LANGUAGE_IT_IT 5)
|
||||
|
||||
message ("-- Configuring cmake.h")
|
||||
configure_file (
|
||||
|
@ -162,5 +170,5 @@ set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSo
|
|||
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
|
||||
"test" "package-config" "misc/*" "src/task$" "src/libtask.a"
|
||||
"src/columns/libcolumns.a" "src/commands/libcommands.a"
|
||||
"src/shell/tasksh$" "auto.h$" "/\\.gitignore""/\\.git/" "swp$")
|
||||
"src/shell/tasksh$" "auto.h$" "/\\.gitignore" "/\\.git/" "swp$")
|
||||
include (CPack)
|
||||
|
|
2
COPYING
2
COPYING
|
@ -1,6 +1,6 @@
|
|||
taskwarrior - a command line task list manager.
|
||||
|
||||
Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
81
ChangeLog
81
ChangeLog
|
@ -17,20 +17,57 @@ Bugs
|
|||
Features
|
||||
+ #328 Replaced the 'shell' command with a standalone 'tasksh' binary, which
|
||||
includes GNU readline support (thanks to Haitham Gad).
|
||||
+ #934 support for 'reserved.lines' to accomodate multi-line
|
||||
+ #934 support for 'reserved.lines' to accommodate multi-line
|
||||
shell prompts when used in conjunction with 'limit:page' (thanks to Robert
|
||||
Gill).
|
||||
+ #1227 A new 'verify_l10n' utility ensures the localizations are in sync (thanks to
|
||||
Wim Schuermann).
|
||||
+ #1226 A new French translation has begun, and will continue to be a work in
|
||||
progress for a while (thanks to YBSA R).
|
||||
+ #1227 A new 'verify_l10n' utility ensures the localizations are in sync
|
||||
(thanks to Wim Schuermann).
|
||||
+ #1250 Support out-of-tree test runs (thanks to Jakub Wilk).
|
||||
+ #1256 Supports default values for UDA fields (thanks to Thomas Sullivan).
|
||||
+ #1297 The task₋sync(5) man pages is rewritten with examples.
|
||||
+ #1339 The configuration file now supports JSON encoding of Unicode
|
||||
characters, by specifying \uNNNN.
|
||||
+ #1385 Need a way to configure the trust of self-signed certificates.
|
||||
+ #1423 sync vs. push, pull, merge collision avoidance.
|
||||
+ #1473 Make TASK_RCDIR customizable (thanks to Jakub Wilk).
|
||||
+ Stores un-synched transactions in <data.location>/backlog.data.
|
||||
+ Adds a new 'synchronize' command to sync data with a task server.
|
||||
+ Adds a new 'sync' verbosity token, which will reminds when a backlog builds
|
||||
+ Adds a new 'synchronize' command to sync data with a Taskserver.
|
||||
+ Adds a new 'initialize' synchronize command argument that uploads all pending
|
||||
tasks for first-time initialization.
|
||||
+ Adds a new 'sync' verbosity token, which will remind when a backlog builds
|
||||
up and needs a sync.
|
||||
+ Supports IPv4 and IPv6 server addresses.
|
||||
+ Began fr-FR localization.
|
||||
+ Complete it-IT localization.
|
||||
+ Merged three l10n utility scripts into one tools, scripts/utils/l10n, which
|
||||
will help the translation effort.
|
||||
+ The 'due' urgency component now uses seconds, not days, in the calculation.
|
||||
+ The 'debug.tls' configuration variable takes an integer which corresponds to
|
||||
the GnuTLS log level. For debugging.
|
||||
+ File format 2 (used in version 0.9.3 - 1.5.0) is no longer supported.
|
||||
+ Migrated column processing code into Task.cpp for future use within each
|
||||
individual column object. Legacy code left in Task.cpp for column objects
|
||||
that are not yet modified.
|
||||
+ ColPriority.cpp - Migration of column modification code out of Task.cpp and
|
||||
into the individual column object.
|
||||
+ Now requires libuuid (thanks to Martin Natano).
|
||||
+ New '_get' is a DOM accessor helper command.
|
||||
+ New virtual tags (WEEK, MONTH, YEAR, PARENT).
|
||||
+ Added the 'remaining' format for all date columns.
|
||||
+ Protects against interrupt during critical DB commit and sync operations.
|
||||
+ The 'push', 'pull' and 'merge' commands now generate a 'deprecated' message.
|
||||
+ Rewritten task-sync(5) man page, listing sync options and setup guidelines..
|
||||
+ Now properly uses the libc version of uuid_create and uuid_to_string for
|
||||
FreeBSD (thanks to Pietro Cerutti).
|
||||
+ Performance improvements:
|
||||
+ Optimizes indexing into pending.data for direct task access.
|
||||
+ Improved I/O performance with better defaults for buffer sizes.
|
||||
|
||||
Bugs
|
||||
+ #1195 Random seed not random enough - removed all random number code (thanks
|
||||
to Jakub Wilk).
|
||||
+ #1196 Now builds on Hurd (thanks to Jakub Wilk).
|
||||
+ #1197 Now 'tasksh' recognizes Ctrl-D to exit.
|
||||
+ #1200 Directory d_type==DT_UNKNOWN is now handled correctly (thanks to Jakub
|
||||
|
@ -39,9 +76,41 @@ Bugs
|
|||
'Y-M-D' (thanks to Robin Björklin).
|
||||
+ #1222 The 'summary' report now obeys the 'color.label' setting (thanks to
|
||||
Steve Rader).
|
||||
+ #1235 The 'shell' command can now start in non-interactive mode without a
|
||||
.taskrc file (thanks to Haitham Gad).
|
||||
+ #1247 Tests now create a local dir, rather than use the insecure /tmp dir
|
||||
(thanks to Jakub Wilk).
|
||||
+ #1248 Merge tests no longer connect to takwarrior.org (thank to Jakub Wilk).
|
||||
+ #1249 Build system now recognizes GNU/Hurd and GNU/kFreeBSD (thanks to Jakub
|
||||
Wilk).
|
||||
+ #1263 The 'waiting' report properly lists only pending tasks with a wait date
|
||||
(thanks to Fidel Mato).
|
||||
+ #1268 Edit doesn't accept changes, if task has completed dependency (thanks
|
||||
to Dmitriy Matrosov, Michele Santullo).
|
||||
+ #1270 The 'undo' command is now properly removing backlog entries.
|
||||
+ #1273 Query with negative relative date differs greatly from absolute date
|
||||
in past (thanks to John West).
|
||||
+ #1279 Assorted corrections to the task-ref.pdf document (thanks to Benjamin
|
||||
Weber).
|
||||
+ #1286 Cannot use "sow", "som", etc in "entry.after", "end.after" filters
|
||||
(thanks to Jake Bell).
|
||||
+ #1300 Encode/decode pairing is now properly balanced.
|
||||
+ #1305 Commit hash now available in tarball builds (thanks to Ben Boeckel).
|
||||
+ #1352 Terminal crashes when using taskwarrior's zsh completion (thanks to
|
||||
Ivan Freitas, XTaran).
|
||||
+ #1356 Command reference now mentions /from/to/g.
|
||||
+ #1381 Invalid JSON exported by Task 2.3.0-beta1 (thanks to Kosta H).
|
||||
+ #1387 ZSH Auto-Completion dates are not current (thanks to Benjamin Weber).
|
||||
+ #1388 Updated task(1) man pages with import/export script examples (thanks to
|
||||
Benjamin Weber).
|
||||
+ #1410 Incomplete Date Synonym List in man task (thanks to Benjamin Weber).
|
||||
+ #1414 Client does not verify SSL certificates (thanks to Scott Kroll).
|
||||
+ #1415 Client should not require a SSL certificate if the server has a trusted
|
||||
certificate (thanks to Scott Kroll).
|
||||
+ Fixed bug so that 'limit:page' now considers footnote messages.
|
||||
+ Fixed bug where specifying an ID of 0 yielded all completed/deleted tasks
|
||||
(thanks to greenskeleton).
|
||||
+ Fixed rc.nag documentation (thanks to Jeroen Budts).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
@ -74,7 +143,7 @@ Features
|
|||
+ Removed deprecated 'fg:' and 'bg:' attributes.
|
||||
+ The 'diagnostics' command now reports libuuid details.
|
||||
+ New characters for parsing and formating dates ('n', 's' and 'v').
|
||||
+ Virtual tags (BLOCKED, UNBLOCKED, BLOCKING, DUE, DUETODAY, TODAY, OVERDUE,
|
||||
+ Virtual tags (BLOCKED, UNBLOCKED, BLOCKING, DUE, DUETODAY, OVERDUE, TODAY,
|
||||
ACTIVE, SCHEDULED, CHILD, UNTIL, WAITING and ANNOTATED).
|
||||
+ New 'modified' attribute, which contains the most recent modification date,
|
||||
if a modification has occurred.
|
||||
|
|
|
@ -125,6 +125,7 @@ Unit Tests Needed
|
|||
code and run the test suite:
|
||||
git clone git://tasktools.org:task.git
|
||||
cd task.git
|
||||
git checkout 2.3.0
|
||||
cmake .
|
||||
make
|
||||
make test
|
||||
|
@ -187,7 +188,10 @@ Current Codebase Condition
|
|||
'2.3.0' branch:
|
||||
- Current development branch with sync features, and new tasksh.
|
||||
|
||||
'2.4.0' branch:
|
||||
- Command line parser rewrite.
|
||||
|
||||
---
|
||||
|
||||
2012-05-12 Added general statement about how to contribute.
|
||||
2013-03-31 Updated branch info.
|
||||
2013-09-09 Updated branch info.
|
||||
|
|
|
@ -90,7 +90,7 @@ Files
|
|||
'merge' command.
|
||||
|
||||
The backlog.data file contains an accumulated set of changes that have not
|
||||
been transmitted to the task server. It grows unbounded between 'synch'
|
||||
been transmitted to the Taskserver. It grows unbounded between 'synch'
|
||||
commands.
|
||||
|
||||
|
||||
|
@ -156,7 +156,7 @@ Test Suite
|
|||
many platforms. Code changes are automatically detected, propagated, built and
|
||||
tested on a variety of participating platforms. Grid testing results are here:
|
||||
|
||||
http://tasktools.org/tinderbox/taskwarrior.html
|
||||
http://tasktools.org/tinderbox/taskwarrior-2.3.0.html
|
||||
|
||||
When making code changes, it is important that the test suite be run to verify
|
||||
that functionality was not broken.
|
||||
|
|
2
INSTALL
2
INSTALL
|
@ -67,6 +67,7 @@ lists them and their defaults plus the CMAKE_INSTALL_PREFIX:
|
|||
CMAKE_INSTALL_PREFIX /usr/local
|
||||
TASK_BINDIR bin
|
||||
TASK_DOCDIR share/doc/task
|
||||
TASK_RCDIR share/doc/task/rc
|
||||
TASK_MAN1DIR share/man/man1
|
||||
TASK_MAN5DIR share/man/man5
|
||||
|
||||
|
@ -75,6 +76,7 @@ get absolute installation directories:
|
|||
|
||||
CMAKE_INSTALL_PREFIX/TASK_BINDIR /usr/local/bin
|
||||
CMAKE_INSTALL_PREFIX/TASK_DOCDIR /usr/local/share/doc/task
|
||||
CMAKE_INSTALL_PREFIX/TASK_RCDIR /usr/local/share/doc/task/rc
|
||||
CMAKE_INSTALL_PREFIX/TASK_MAN1DIR /usr/local/share/man/man1
|
||||
CMAKE_INSTALL_PREFIX/TASK_MAN5DIR /usr/local/share/man/man5
|
||||
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
taskwarrior - a command line task list manager.
|
||||
|
||||
Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
7
NEWS
7
NEWS
|
@ -1,7 +1,7 @@
|
|||
|
||||
New Features in taskwarrior 2.4.0
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
New commands in taskwarrior 2.4.0
|
||||
|
||||
|
@ -9,13 +9,14 @@ New commands in taskwarrior 2.4.0
|
|||
|
||||
New configuration options in taskwarrior 2.4.0
|
||||
|
||||
-
|
||||
|
||||
Newly deprecated features in taskwarrior 2.4.0
|
||||
|
||||
-
|
||||
|
||||
---
|
||||
Known Issues
|
||||
|
||||
-
|
||||
|
||||
Taskwarrior has been built and tested on the following configurations:
|
||||
|
||||
|
|
93
README_TASKD
Normal file
93
README_TASKD
Normal file
|
@ -0,0 +1,93 @@
|
|||
Welcome To Taskwarrior 2.3.0 Beta
|
||||
---------------------------------
|
||||
|
||||
The beta release of Taskwarrior 2.3.0 is for testing the Taskserver. There are
|
||||
several unaddressed bugs in this release, so proper precautions with your data
|
||||
are required.
|
||||
|
||||
|
||||
Building Taskwarrior
|
||||
--------------------
|
||||
|
||||
You will need the following dependencies:
|
||||
|
||||
cmake
|
||||
make
|
||||
g++/clang or equivalent
|
||||
libuuid
|
||||
libgnutls (devel copy, with certtools)
|
||||
libreadline
|
||||
|
||||
|
||||
Configuring Taskwarrior as a Taskserver Client
|
||||
----------------------------------------------
|
||||
|
||||
When a new user is added to the Taskserver, a UUID key is generated, along with
|
||||
an x.509 cert. See Taskserver operation document. Before proceeding, you will
|
||||
need the following items:
|
||||
|
||||
<server:port> Where Taskserver is running (Default: localhost:6544)
|
||||
<org> Name of organization (default: Public)
|
||||
<user> User name added to server
|
||||
<password> UUID generated by server
|
||||
<cert> Full path to client.cert.pem generated by server
|
||||
<key> Full path to client.key.pem generated by server
|
||||
|
||||
Set these configuration variables in your Taskwarrior configuration,
|
||||
substituting from above:
|
||||
|
||||
$ task config taskd.server <server:port>
|
||||
$ task config taskd.credentials <org>/<user>/<password>
|
||||
$ task config taskd.certificate <cert>
|
||||
$ task config taskd.key <key>
|
||||
|
||||
Here is an example:
|
||||
|
||||
$ task config taskd.server localhost:6544
|
||||
$ task config taskd.credentials 'Public/John Doe/8ad2e3db-914d-4832-b0e6-72fa04f6e331'
|
||||
$ task config taskd.certificate ~/.task/client.cert.pem
|
||||
$ task config taskd.key ~/.task/client.key.pem
|
||||
|
||||
|
||||
Using Self-Signed Certificates
|
||||
------------------------------
|
||||
|
||||
If you are using self-signed certificates, you will either need a Certificate
|
||||
Authority cert (CA), reference by hte configuration like this:
|
||||
|
||||
$ task config taskd.ca ~/.task/ca.cert.pem
|
||||
|
||||
Alternatively you can bypass the certificate validation, but this is not
|
||||
recommended:
|
||||
|
||||
$ task config taskd.trust yes
|
||||
|
||||
|
||||
First-Time Synchronizing
|
||||
------------------------
|
||||
|
||||
The first sync you do should be a full sync. Run this:
|
||||
|
||||
$ task sync initialize
|
||||
|
||||
This performs a full upload of your pending.data file to the server, creating
|
||||
the basis on which all subsequent sync commands are run, and transferring only
|
||||
deltas.
|
||||
|
||||
Do not run 'task sync initialize' again.
|
||||
|
||||
|
||||
General Synchronizing
|
||||
---------------------
|
||||
|
||||
After the first-time sync, all subsequent sync commands should be like this:
|
||||
|
||||
$ task sync
|
||||
|
||||
It is safe to run this command as often as you wish, whether or not there are
|
||||
any changes to sync.
|
||||
|
||||
You may wish to enable sync feedback with the 'sync' verbose token. See 'man
|
||||
taskrc' for details.
|
||||
|
||||
---
|
18
cmake.h.in
18
cmake.h.in
|
@ -1,5 +1,8 @@
|
|||
/* cmake.h.in. Creates cmake.h during a cmake run */
|
||||
|
||||
/* Product identification */
|
||||
#define PRODUCT_TASKWARRIOR 1
|
||||
|
||||
/* Package information */
|
||||
#define PACKAGE "${PACKAGE}"
|
||||
#define VERSION "${VERSION}"
|
||||
|
@ -10,7 +13,7 @@
|
|||
#define PACKAGE_STRING "${PACKAGE_STRING}"
|
||||
|
||||
/* Installation details */
|
||||
#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_DOCDIR}/rc"
|
||||
#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}"
|
||||
|
||||
/* Localization */
|
||||
#define PACKAGE_LANGUAGE ${PACKAGE_LANGUAGE}
|
||||
|
@ -18,6 +21,7 @@
|
|||
#define LANGUAGE_ES_ES ${LANGUAGE_ES_ES}
|
||||
#define LANGUAGE_FR_FR ${LANGUAGE_FR_FR}
|
||||
#define LANGUAGE_DE_DE ${LANGUAGE_DE_DE}
|
||||
#define LANGUAGE_IT_IT ${LANGUAGE_IT_IT}
|
||||
|
||||
/* git information */
|
||||
#cmakedefine HAVE_COMMIT
|
||||
|
@ -48,23 +52,19 @@
|
|||
/* Found the pthread library */
|
||||
#cmakedefine HAVE_LIBPTHREAD
|
||||
|
||||
/* Found random */
|
||||
#cmakedefine HAVE_RANDOM
|
||||
|
||||
/* Found srandom */
|
||||
#cmakedefine HAVE_SRANDOM
|
||||
|
||||
/* Found tm_gmtoff */
|
||||
#cmakedefine HAVE_TM_GMTOFF
|
||||
|
||||
/* Found timegm */
|
||||
#cmakedefine HAVE_TIMEGM
|
||||
|
||||
/* Found st.st_birthtime struct member */
|
||||
#cmakedefine HAVE_ST_BIRTHTIME
|
||||
|
||||
/* Found get_current_dir_name */
|
||||
#cmakedefine HAVE_GET_CURRENT_DIR_NAME
|
||||
|
||||
/* Found the uuid library */
|
||||
#cmakedefine HAVE_UUID
|
||||
/* Found uuid_unparse_lower in the uuid library */
|
||||
#cmakedefine HAVE_UUID_UNPARSE_LOWER
|
||||
|
||||
/* Undefine this to eliminate the execute command */
|
||||
|
|
|
@ -9,36 +9,37 @@
|
|||
|
||||
# Apple readline does not support readline hooks
|
||||
# So we look for another one by default
|
||||
IF (APPLE)
|
||||
IF (APPLE OR FREEBSD)
|
||||
FIND_PATH (READLINE_INCLUDE_DIR NAMES readline/readline.h PATHS
|
||||
/usr/include/
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/include
|
||||
/usr/local/include
|
||||
/usr/include/
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF (APPLE)
|
||||
ENDIF (APPLE OR FREEBSD)
|
||||
FIND_PATH (READLINE_INCLUDE_DIR NAMES readline/readline.h)
|
||||
|
||||
|
||||
# Apple readline does not support readline hooks
|
||||
# So we look for another one by default
|
||||
IF (APPLE)
|
||||
IF (APPLE OR FREEBSD)
|
||||
FIND_LIBRARY (READLINE_readline_LIBRARY NAMES readline PATHS
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF (APPLE)
|
||||
ENDIF (APPLE OR FREEBSD)
|
||||
FIND_LIBRARY (READLINE_readline_LIBRARY NAMES readline)
|
||||
|
||||
# Sometimes readline really needs ncurses
|
||||
IF (APPLE)
|
||||
IF (APPLE OR FREEBSD)
|
||||
FIND_LIBRARY (READLINE_ncurses_LIBRARY NAMES ncurses PATHS
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/lib
|
||||
|
@ -46,7 +47,7 @@ IF (APPLE)
|
|||
/usr/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF (APPLE)
|
||||
ENDIF (APPLE OR FREEBSD)
|
||||
FIND_LIBRARY (READLINE_ncurses_LIBRARY NAMES ncurses)
|
||||
|
||||
MARK_AS_ADVANCED (
|
||||
|
|
|
@ -265,7 +265,7 @@ your .taskrc file (note that your installation may use a slightly different path
|
|||
from the example):
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/dark-256.theme
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme
|
||||
.RE
|
||||
|
||||
You can use any of the standard taskwarrior themes:
|
||||
|
@ -304,7 +304,7 @@ Better yet, create your own, and share it. We will gladly host the theme file
|
|||
on <http://taskwarrior.org>.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior is distributed under the MIT license. See
|
||||
http://www.opensource.org/licenses/mit-license.php for more information.
|
||||
|
|
|
@ -72,9 +72,9 @@ reason to back up your task data files!
|
|||
.TP
|
||||
.B Q: Can I have two separate versions of taskwarrior installed? How?
|
||||
Yes, and here is one simple way to do that. Install the older version of
|
||||
taskwarrior, and then rename the 'task' binary to something like 't194' to
|
||||
taskwarrior, and then rename the 'task' binary to something like 't230' to
|
||||
reflect the version number. Then install the newer version, which will be
|
||||
named 'task'. Now you have 't194' and 'task' both installed, both using the
|
||||
named 'task'. Now you have 't230' and 'task' both installed, both using the
|
||||
same configuration and data.
|
||||
|
||||
Note that the older version will not be aware of any new configuration settings
|
||||
|
@ -86,6 +86,9 @@ Note also that the man pages will overwrite, which is why it is suggested that
|
|||
the older version be installed first, so that you benefit from improved
|
||||
documentation.
|
||||
|
||||
Is this a good idea? Not really. You should be using the latest software
|
||||
whenever possible, enjoying the benefits of enhancements and bug fixes.
|
||||
|
||||
.TP
|
||||
.B Q: How do I build a Darwin 32bit version of task
|
||||
The taskwarrior packages will not work on a 32-bit OSX installation on Core
|
||||
|
@ -159,11 +162,6 @@ new file, then this command lists only the defaults.
|
|||
Note that this is a good way to learn about new configuration settings,
|
||||
particularly if your .taskrc file was created by an older version.
|
||||
|
||||
.TP
|
||||
.B Q: Do I need to back up my taskwarrior data?
|
||||
Yes you do, like all your other files. You should back up all the files in your
|
||||
~/.task directory, and your ~/.taskrc file too.
|
||||
|
||||
.TP
|
||||
.B Q: Can I share my tasks between different machines?
|
||||
Yes, you can. Most people have success with a DropBox - a free and secure file
|
||||
|
@ -174,40 +172,25 @@ folder, by modifying the:
|
|||
|
||||
configuration variable. Check out DropBox at http://www.dropbox.com.
|
||||
|
||||
You might also want to share the same .taskrc file. You can do this by putting an alias in the .bashrc file along the lines of
|
||||
|
||||
alias task="task rc:/home/username/Dropbox/mysharedtaskrc"
|
||||
|
||||
An alternative to Dropbox is to use the push/pull/merge features built into Taskwarrior. See 'man task-sync' for details.
|
||||
You might also want to share the same .taskrc file. You can do this by putting
|
||||
an alias in the .bashrc file along the lines of
|
||||
|
||||
alias task="task rc:/home/username/Dropbox/mysharedtaskrc"
|
||||
|
||||
.TP
|
||||
.B Q: I don't want to use dropbox. Is there another way to synchronize my tasks?
|
||||
Of course. Especially if you want to modify tasks offline on both machines and
|
||||
synchronize them later on. For this purpose there is a 'merge' command which is
|
||||
is able to insert the modifications you made to one of your task databases into
|
||||
a second database.
|
||||
|
||||
Here is a basic example of the procedure:
|
||||
|
||||
task merge ssh://user@myremotehost/.task/
|
||||
task push ssh://user@myremotehost/.task/
|
||||
|
||||
The first command fetches the undo.data file from the remote system, reads the
|
||||
changes made and updates the local database. When this merge command completes,
|
||||
you should copy all the local .data files to the remote system either by using
|
||||
the push command explicitly or by activating the merge.autopush feature in the
|
||||
~/.taskrc file. This way you ensure that both systems are fully synchronized.
|
||||
Yes. Get a Taskserver account, and sync tasks between all your machines and
|
||||
devices. See task-sync(5).
|
||||
|
||||
.TP
|
||||
.B Q: The undo.data file gets very large - do I need it?
|
||||
You need it if you want the undo capability, or the merge capability mentioned
|
||||
above. But if it gets large, you can certainly truncate it to save space, just
|
||||
be careful to delete lines from the top of the file, up to and including a
|
||||
separator '---'. The simplest way is to simply delete the undo.data file. Note
|
||||
that it does not slow down taskwarrior in performance-sensitive areas, because
|
||||
it is typically not read until you want to undo, or report total active time in
|
||||
the 'info' command. Taskwarrior generally only appends to the file.
|
||||
You need it if you want the undo capability. But if it gets large, you can
|
||||
certainly truncate it to save space, just be careful to delete lines from the
|
||||
top of the file, up to and including a separator '---'. The simplest way is to
|
||||
simply delete the undo.data file. Note that it does not slow down taskwarrior
|
||||
in performance-sensitive areas, because it is typically not read until you want
|
||||
to undo, or report total active time in the 'info' command. Taskwarrior
|
||||
generally only appends to the file.
|
||||
|
||||
It is not recommended that you delete the undo.data file, as it limits
|
||||
functionality.
|
||||
|
@ -262,7 +245,8 @@ Taskwarrior does this to always show you the smallest numbers it can. The idea
|
|||
is that if your tasks are numbered 1 - 33, for example, those are easy to type
|
||||
in. If instead task kept a rolling sequence number, after a while your tasks
|
||||
might be numbered 481 - 513, which makes it more likely to enter one
|
||||
incorrectly, because there are more digits.
|
||||
incorrectly, because there are more digits, and humans have difficulty with
|
||||
longer numbers.
|
||||
|
||||
When you run a report (such as "list"), the numbers are assigned before display.
|
||||
For example, you can do this:
|
||||
|
@ -355,7 +339,7 @@ There are lots of ways. Here are some:
|
|||
- Fix bugs
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior is distributed under the MIT license. See
|
||||
http://www.opensource.org/licenses/mit-license.php for more information.
|
||||
|
|
|
@ -1,361 +1,148 @@
|
|||
.TH task-sync 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
task-sync \- A tutorial for the task(1) data synchronization capabilities.
|
||||
task-sync \- A discussion and tutorial for the various task(1) data
|
||||
synchronization capabilities.
|
||||
|
||||
.SH DESCRIPTION
|
||||
Taskwarrior has built-in support for synchronization, which can be used to keep
|
||||
two task databases up to date, regardless of which one is used. This capability
|
||||
can also be used to keep a backup copy of your task database on another machine.
|
||||
.SH INTRODUCTION
|
||||
Taskwarrior has several sync options, external and internal. If you wish to
|
||||
sync your data, choose one method only; mixing methods is only going to lead to
|
||||
problems. Each of the methods discussed have their own strengths.
|
||||
|
||||
Taskwarrior can use various protocols for transferring the data.
|
||||
|
||||
.SH HOW IT WORKS
|
||||
If you were to manually attempt to keep two separate task databases up to date,
|
||||
you would need to inspect both databases, and detect changes that occurred in
|
||||
each one. Those changes would need to be migrated to the other database, while
|
||||
being careful not to miss a change, and not to confuse an 'add' in one with
|
||||
a 'delete' in the other.
|
||||
|
||||
The synchronization feature does just this. It can transfer task databases,
|
||||
compare tasks, and apply changes where necessary.
|
||||
|
||||
.SH NEW COMMANDS
|
||||
Taskwarrior has 'pull', 'push' and 'merge' commands which perform the steps
|
||||
necessary to move files around and combine them. In the common use case, you
|
||||
would only need to use the 'merge' command. These commands take an argument
|
||||
that is a URI, which indicates where the remote database resides.
|
||||
|
||||
To be clear, the local database always refers to your ~/.task directory (unless
|
||||
overridden), and the remote database is always specified by URI.
|
||||
|
||||
.SH MERGE
|
||||
The merge command will fetch task data via URI and combine it with the local
|
||||
task database. The syntax is:
|
||||
.SH ALTERNATIVES
|
||||
There are three alternatives for syncing data, which are:
|
||||
|
||||
1) Version control systems, such as git, hg, svn
|
||||
.br
|
||||
.RS
|
||||
task merge [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B merge.default.uri
|
||||
configuration variable is set. The URI may point to a different directory, or
|
||||
it may be a different computer. Here is an example of the merge command:
|
||||
|
||||
2) File hosting systems, such as DropBox
|
||||
.br
|
||||
.RS
|
||||
$ task merge ~/work/
|
||||
.RE
|
||||
3) Using the Taskserver and the 'sync' command
|
||||
|
||||
This URI (~/work/) is a path name, which means the remote database is on the
|
||||
same computer. Taskwarrior will fetch the data from the URI, and merge it with
|
||||
your local data in ~/.task.
|
||||
|
||||
When complete, you will be asked whether you would like to push the combined
|
||||
data back to the remote location specified by the URI. This is useful if you
|
||||
are keeping two task databases synchronized, but it can be turned off. See
|
||||
CONFIGURATION.
|
||||
.SH OPTION 1: VERSION CONTROL SYSTEMS
|
||||
There are several good, distributed VCS systems (git, hg, ...) and centralized
|
||||
VCS systems (svn ...), and they function in a similar fashion for our purposes.
|
||||
|
||||
Note that a merge operation is not atomically reversible. You could however
|
||||
run the 'task undo' command repeatedly to undo the effects.
|
||||
|
||||
.SH PUSH
|
||||
The push command will copy the local task database to the specified URI. The
|
||||
syntax is:
|
||||
Setup is straightforward. You place your .task directory under revision
|
||||
control. You then need to perform a regular commit/push/pull/update to make
|
||||
sure that the data is propagated when needed. You can even do this using shell
|
||||
scripts so that every task command is preceded by a 'pull' and followed by a
|
||||
'push'.
|
||||
|
||||
Strengths:
|
||||
.br
|
||||
.RS
|
||||
task push [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B push.default.uri
|
||||
configuration variable is set. This command is useful for making backup copies
|
||||
of your task database.
|
||||
|
||||
Note that the task files at the location specified by the URI are simply
|
||||
overwritten, so don't expect any merging to occur. Misused, push can be
|
||||
dangerous.
|
||||
|
||||
.SH PULL
|
||||
The pull command will copy a task database from a URI to the local task database
|
||||
(~/.task by default). The syntax is:
|
||||
|
||||
- Good data transport mechanisms
|
||||
.br
|
||||
.RS
|
||||
task pull [<URI>]
|
||||
.RE
|
||||
|
||||
The URI is optional if the
|
||||
.B pull.default.uri
|
||||
configuration variable is set. This command is useful for restoring a backup
|
||||
copy of your task database.
|
||||
|
||||
Note that your local task database files will be simply overwritten by the files
|
||||
obtained from the location specified by the URI, so don't expect any merging to
|
||||
occur. Misused, pull can be dangerous.
|
||||
|
||||
.SH URI TYPES
|
||||
The most basic URI is a path name on the local machine. An example would be:
|
||||
- Secure transport options
|
||||
|
||||
Weaknesses:
|
||||
.br
|
||||
.RS
|
||||
/home/bob/.task/
|
||||
.RE
|
||||
|
||||
All the other URIs allow access to remote machines. The first uses SSH and scp
|
||||
(either form can be used):
|
||||
|
||||
- You need proficiency with VCS tools
|
||||
.br
|
||||
.RS
|
||||
ssh://[user@]host[:port]/absolute/path/to/.task/
|
||||
- You will need to manually resolve conflicts frequently
|
||||
.br
|
||||
[user@]host:/absolute/path/to/.task/
|
||||
.RE
|
||||
- You need to provide the mechanism for making sure copies are up to date
|
||||
|
||||
In both cases paths are considered to be absolute. You can specify paths relative to the
|
||||
users home directory as follows:
|
||||
|
||||
.SH OPTION 2: FILE HOSTING SERVICES
|
||||
There are many file hosting services, such as DropBox, Amazon S3, Google Drive,
|
||||
SkyDrive and more. This technique involves storing your .task directory in a
|
||||
shared directory under the control of the file hosting services.
|
||||
|
||||
Syncing happens quickly, although it is possible to run into conflict situations
|
||||
when there is no network connectivity, and the tasks are modified in two
|
||||
separate locations. This is because the file hosting service knows only about
|
||||
files, and it has no idea how to merge tasks. Avoid this problem by never
|
||||
modifying the same task on two machines, without an intervening sync.
|
||||
|
||||
Setup simply involves creating the directory and modifying your data.location
|
||||
configuration variable like this:
|
||||
|
||||
$ task config data.location /path/to/shared/directory
|
||||
|
||||
Strengths:
|
||||
.br
|
||||
.RS
|
||||
ssh://[user@]host[:port]/.task/
|
||||
- Always secure
|
||||
.br
|
||||
[user@]host:.task/
|
||||
.RE
|
||||
|
||||
or even shorter
|
||||
|
||||
- Good client support
|
||||
.br
|
||||
.RS
|
||||
[user@]host:.task/
|
||||
.RE
|
||||
|
||||
Remark: Since taskwarrior simply calls the scp binary you can specify very much anything
|
||||
that scp would accept, e.g. host configurations from ~/.ssh/config or ~username
|
||||
expansion:
|
||||
|
||||
- Easy setup
|
||||
.br
|
||||
.RS
|
||||
ssh://configured-host/~[username]/.task/
|
||||
- Transparent use
|
||||
|
||||
Weaknesses:
|
||||
.br
|
||||
configured-host:~[username]/.task/
|
||||
.RE
|
||||
- Tasks are not properly merged
|
||||
|
||||
|
||||
Rsync is another supported protocol that minimizes network traffic, by a clever
|
||||
algorithm that doesn't copy files that have not changed:
|
||||
.SH OPTION 3: TASKSERVER
|
||||
The Taskserver was designed for this purpose to be secure, fast and conflict
|
||||
free, allowing data interchange between assorted Taskwarrior clients, and
|
||||
tolerant of network connectivity problems.
|
||||
|
||||
There is a 'sync' command built in to Taskwarrior, and with a server account
|
||||
and client configuration, syncing is done on demand.
|
||||
|
||||
Setup is a matter of creating an account on a Taskserver (see your Taskserver
|
||||
provider or operate your own - see
|
||||
http://taskwarrior.org/projects/taskwarrior/wiki/Server_setup)
|
||||
|
||||
Once you have an account, you'll receive a certificate, key and a password.
|
||||
You'll need to put the certificate and key somewhere like this:
|
||||
|
||||
$ cp <name>.cert.pem ~/.task
|
||||
$ cp <name>.key.pem ~/.task
|
||||
|
||||
Then you configure Taskwarrior, using the account details:
|
||||
|
||||
$ task config taskd.certificate ~/.task/<name>.cert.pem
|
||||
$ task config taskd.key ~/.task/<name>.key.pem
|
||||
$ task config taskd.credentials <organization>/<name>/<password>
|
||||
$ task config taskd.server <server domain>:<port>
|
||||
|
||||
If you are using a private server, you are likely also using a self-signed
|
||||
certificate, which means you will need one of the following additional entries:
|
||||
|
||||
$ task config taskd.ca ~/.task/ca.cert.pem
|
||||
|
||||
The CA (Certificate Authority) will be used to verify the server certificate.
|
||||
Alternatively, you can override the cert verification process using:
|
||||
|
||||
$ task config taskd.trust yes
|
||||
|
||||
This is an insecure option that should be used with caution, because it directs
|
||||
Taskwarrior to trust any certificate.
|
||||
|
||||
After setup, you run a one-time sync initialization, like this:
|
||||
|
||||
$ task sync initialize
|
||||
|
||||
This will make sure your client and the server are properly in sync to begin
|
||||
with. From this point on, you never run the 'initialize' command again, just
|
||||
go about your business, and when you want to sync, run this:
|
||||
|
||||
$ task sync
|
||||
|
||||
You'll see a summary of how many tasks were uploaded and downloaded. You can
|
||||
safely run the command as often as you like. When there are no changes to sync,
|
||||
nothing happens. If you do not have connectivity, your task changes accumulate
|
||||
so that when you next run 'sync' with proper connectivity, the changes are
|
||||
properly handled, in the right order.
|
||||
|
||||
Strengths:
|
||||
.br
|
||||
.RS
|
||||
rsync://[user@]host.xz[:port]/path/to/.task/
|
||||
.RE
|
||||
|
||||
Curl supports several protocols that can transfer data using HTTP, HTTPS and
|
||||
FTP:
|
||||
|
||||
- Always secure
|
||||
.br
|
||||
.RS
|
||||
http://host[:port]/path/to/.task/
|
||||
- Minimal bandwidth
|
||||
.br
|
||||
https://host[:port]/path/to/.task/
|
||||
- Tolerates connectivity outage
|
||||
|
||||
Weaknesses:
|
||||
.br
|
||||
ftp://[user@]host[:port]/path/to/.task/
|
||||
.RE
|
||||
|
||||
You can use single quotes to encapsulate user names that contain delimiting
|
||||
characters like '@', '/' or ':', e.g.:
|
||||
|
||||
.br
|
||||
.RS
|
||||
ssh://'user@name'@host/
|
||||
.RE
|
||||
|
||||
Remember to escape the quotes on your shell:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push ftp://\'user@name\':host/
|
||||
.RE
|
||||
|
||||
.SH CONFLICTS
|
||||
When modifications on the local and remote machine conflict, for example if
|
||||
both machines change the project name of the same task to different values,
|
||||
then Taskwarrior automatically selects the most recent change. Thus, there
|
||||
are no conflicts.
|
||||
|
||||
.SH EXAMPLE - Backup on another machine
|
||||
One very good use of 'push' is to make backup copies of your task database in
|
||||
another location. Suppose your task database is kept in the usual place, in
|
||||
the ~/.task directory, and you wanted to make a backup copy in ~/backup. You
|
||||
would use this command:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push ~/backup/
|
||||
.RE
|
||||
|
||||
This would copy the files in ~/.task to ~/backup, overwriting the files that
|
||||
were already in ~/backup. To backup your files to another machine, you could
|
||||
use:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push user@host:backup
|
||||
.RE
|
||||
|
||||
This could be improved by setting the
|
||||
.B push.default.uri
|
||||
configuration variable and then relying on the default, like this:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task config push.default.uri user@host:backup
|
||||
.RE
|
||||
|
||||
and then you need only run the push command:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task push
|
||||
.RE
|
||||
|
||||
and the default push URI will be used. If you wanted to restore a backup, you
|
||||
simply use the pull command instead:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task pull user@host:backup
|
||||
.RE
|
||||
|
||||
This can be simplified by setting the
|
||||
.B pull.default.uri
|
||||
configuration variable and then relying on the default, like this:
|
||||
|
||||
.br
|
||||
.RS
|
||||
$ task config pull.default.uri user@host:backup
|
||||
.RE
|
||||
|
||||
Note that pull and push will blindly overwrite the task files without any
|
||||
merging. Be careful.
|
||||
|
||||
.SH EXAMPLE - Keeping two task databases synchronized
|
||||
The most common synchronization will be to keep two task databases synchronized
|
||||
on different machines. Here is a full example, including setup that illustrates
|
||||
this.
|
||||
|
||||
Suppose there are two machines, named 'local' and 'remote', for simplicity.
|
||||
Taskwarrior is installed on both machines. The different machines are
|
||||
indicated here by the prompt. Suppose Alice enters two tasks on her local
|
||||
machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task add Deliver the new budget proposal due:tuesday
|
||||
.br
|
||||
local> task add Set up a meeting with Bob
|
||||
.RE
|
||||
|
||||
Then later adds a task on the remote machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
remote> task add Present the budget proposal at the big meeting due:thursday
|
||||
.RE
|
||||
|
||||
Now on the local machine, Alice merges the two task databases:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task merge alice@remote:.task
|
||||
.br
|
||||
Would you like to push the changes to 'alice@remote:.task'? Y
|
||||
.RE
|
||||
|
||||
Taskwarrior has combined the two task databases on local, then pushed the
|
||||
changes back to remote. Now suppose Alice changes the due date for task 1
|
||||
on remote:
|
||||
|
||||
.br
|
||||
.RS
|
||||
remote> task 1 due:wednesday
|
||||
.RE
|
||||
|
||||
Now on the local machine, Alice sets up a default URI and autopush:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task config merge.default.uri alice@remote:.task
|
||||
.br
|
||||
local> task config merge.autopush yes
|
||||
.RE
|
||||
|
||||
Now Alice can simply run merge to make sure that the new due date is copied to
|
||||
the local machine:
|
||||
|
||||
.br
|
||||
.RS
|
||||
local> task merge
|
||||
.RE
|
||||
|
||||
This time the URI is determined automatically, and after the merge the files are
|
||||
pushed back to the remote machine. In a similar way, the remote machine can
|
||||
also be configured to merge from the local machine and push back to it. Then it
|
||||
is just a matter of Alice remembering to merge now and then, from either
|
||||
machine, to have her data in two (or even more) places.
|
||||
|
||||
.SH CONFIGURATION
|
||||
By setting these configuration variables, it is possible to simplify the
|
||||
synchronization commands, by relying on the defaults or alias names.
|
||||
|
||||
.br
|
||||
.B merge.autopush=yes|no|ask
|
||||
.RS
|
||||
This controls whether the automatic push after a merge is performed, not
|
||||
performed, or whether the user is asked every time. The default value is 'ask'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B merge.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task merge' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set merge.desktop.uri and run 'task merge desktop'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B push.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task push' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set push.desktop.uri and run 'task push desktop'.
|
||||
.RE
|
||||
|
||||
.br
|
||||
.B pull.default.uri=<uri>
|
||||
.RS
|
||||
Sets a default URI so that just the 'task pull' command be run without the
|
||||
need to retype the URI every time. You can also use this configuration scheme
|
||||
to set alias names, e.g. set pull.desktop.uri and run 'task pull desktop'.
|
||||
.RE
|
||||
|
||||
Note that, when using SSH/scp, hostnames will be expanded due to the ssh
|
||||
configuration file ~/.ssh/config.
|
||||
|
||||
.SH EXTERNAL DEPENDENCIES
|
||||
Depending on the URI protocols used, the utilities 'scp', 'rsync' and 'curl'
|
||||
must be installed and accessible via the $PATH environment variable.
|
||||
|
||||
If you have deleted your ~/.task/undo.data file to save space, you will be
|
||||
unable to merge. The change transactions stored in the undo.data file are
|
||||
used for synchronization.
|
||||
- You need to manage your own server, or gain access to a hosted server.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
|
||||
The sync capabilities were written by J. Schlatow.
|
||||
Parts copyright (C) 2010 - 2013 J. Schlatow.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior is distributed under the MIT license. See
|
||||
http://www.opensource.org/licenses/mit-license.php for more information.
|
||||
|
@ -367,7 +154,6 @@ http://www.opensource.org/licenses/mit-license.php for more information.
|
|||
.BR task-faq(5),
|
||||
.BR task-color(5),
|
||||
.BR task-tutorial(5),
|
||||
.BR ssh_config(5)
|
||||
|
||||
For more information regarding task, the following may be referenced:
|
||||
|
||||
|
|
|
@ -1286,19 +1286,19 @@ theme into the configuration file, you can see some striking effects. For a
|
|||
blue theme, add this line to your .taskrc file:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/dark-blue-256.theme
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-blue-256.theme
|
||||
.RE
|
||||
|
||||
For a red theme:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/dark-red-256.theme
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-red-256.theme
|
||||
.RE
|
||||
|
||||
For a general dark theme:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/dark-256.theme
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme
|
||||
.RE
|
||||
|
||||
Here are two color rules that specify a dark blue background for all tasks that
|
||||
|
@ -1497,7 +1497,7 @@ used most. You can create your own, or use one of the samples to show holidays
|
|||
on the calendar. Try adding this line to your ~/.taskrc file:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/holidays.en-US.rc
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc
|
||||
.RE
|
||||
|
||||
Then:
|
||||
|
@ -3081,7 +3081,7 @@ $ task help
|
|||
.RE
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
This man page was originally written by Federico Hernandez, and has been modified and supplemented by Paul Beckingham.
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ Shows a graphical burndown chart, by month.
|
|||
.B task calendar [due|<month> <year>|<year>] [y]
|
||||
Shows a monthly calendar with due tasks marked. Shows one horizontal line of
|
||||
months. If the 'y' argument is provided, will show at least one complete year.
|
||||
If a year is provided, such as '2013', then that full year is shown. If both
|
||||
a month and a year are specified ('6 2013') then the months displayed begin at
|
||||
If a year is provided, such as '2014', then that full year is shown. If both
|
||||
a month and a year are specified ('6 2014') then the months displayed begin at
|
||||
the specified month and year. If the 'due' argument is provided, will show
|
||||
the starting month of the earliest due task.
|
||||
|
||||
|
@ -173,7 +173,18 @@ Displays only a count of tasks matching the filter.
|
|||
Exports all tasks in the JSON format. Redirect the output to a file, if you
|
||||
wish to save it, or pipe it to another command or script to convert it to
|
||||
another format. The standard task release comes with a few example scripts,
|
||||
such as export-yaml.pl.
|
||||
such as:
|
||||
|
||||
export-csv.pl
|
||||
export-sql.py
|
||||
export-xml.py
|
||||
export-yaml.pl
|
||||
export-html.pl
|
||||
export-tsv.pl
|
||||
export-xml.rb
|
||||
export-ical.pl
|
||||
export-xml.pl
|
||||
export-yad.pl
|
||||
|
||||
.TP
|
||||
.B task <filter> ghistory.annual
|
||||
|
@ -335,29 +346,15 @@ provided for exceptional circumstances. Use carefully.
|
|||
.TP
|
||||
.B task import <file> [<file> ...]
|
||||
Imports tasks in the JSON format. The standard task release comes with a few
|
||||
example scripts, such as import-yaml.pl.
|
||||
example scripts, such as:
|
||||
|
||||
import-todo.sh.pl
|
||||
import-yaml.pl
|
||||
|
||||
.TP
|
||||
.B task log <mods>
|
||||
Adds a new task that is already completed, to the task list.
|
||||
|
||||
.TP
|
||||
.B task merge <URL>
|
||||
Merges two task databases by comparing the modifications that are stored in the
|
||||
undo.data files. The location of the second undo.data file must be passed on as
|
||||
argument. URL may have the following syntaxes:
|
||||
|
||||
ssh://[user@]host.xz[:port]/path/to/.task/
|
||||
|
||||
rsync://[user@]host.xz[:port]/path/to/.task/
|
||||
|
||||
[user@]host.xz:path/to/.task/
|
||||
|
||||
/path/to/local/.task/
|
||||
|
||||
You can set aliases for frequently used URLs in the .taskrc. Further
|
||||
documentation can be found in the task-sync(5) man page.
|
||||
|
||||
.TP
|
||||
.B task <filter> modify <mods>
|
||||
Modifies the existing task with provided information.
|
||||
|
@ -366,17 +363,6 @@ Modifies the existing task with provided information.
|
|||
.B task <filter> prepend <mods>
|
||||
Prepends description text to an existing task.
|
||||
|
||||
.TP
|
||||
.B task pull <URL>
|
||||
Overwrites the task database with those files found at the URL.
|
||||
(See 'merge' command for valid URL syntax.)
|
||||
|
||||
.TP
|
||||
.B task push <URL>
|
||||
Pushes the task database to a remote location for distributing the
|
||||
changes made by the merge command.
|
||||
(See 'merge' command for valid URL syntax.)
|
||||
|
||||
.TP
|
||||
.B task <filter> start <mods>
|
||||
Marks the specified tasks as started.
|
||||
|
@ -533,6 +519,24 @@ Shows the IDs and descriptions of matching tasks.
|
|||
.B task <filter> _zshuuids
|
||||
Shows the UUIDs and descriptions of matching tasks.
|
||||
|
||||
.TP
|
||||
.B task _get <DOM> [<DOM> ...]
|
||||
Accesses and displays the DOM reference(s). Used to extract individual values
|
||||
from tasks, or the system. Supported DOM references are:
|
||||
|
||||
rc.<name>
|
||||
context.program
|
||||
context.args
|
||||
context.width
|
||||
context.height
|
||||
system.version
|
||||
system.os
|
||||
<id>.<attribute>
|
||||
<uuid>.<attribute>
|
||||
|
||||
Note that the 'rc.<name>' reference may need to be escaped using '--' to prevent
|
||||
the reference from being interpreted as an override.
|
||||
|
||||
.SH ATTRIBUTES AND METADATA
|
||||
|
||||
.TP
|
||||
|
@ -570,9 +574,13 @@ are:
|
|||
DUE Matches if the task is due
|
||||
DUETODAY Matches if the task is due today
|
||||
TODAY Matches if the task is due today
|
||||
WEEK Matches if the task is due this week
|
||||
MONTH Matches if the task is due this month
|
||||
YEAR Matches if the task is due this year
|
||||
OVERDUE Matches if the task is overdue
|
||||
ACTIVE Matches if the task is started
|
||||
SCHEDULED Matches if the task is scheduled
|
||||
PARENT Matches if the task is a parent
|
||||
CHILD Matches if the task has a parent
|
||||
UNTIL Matches if the task expires
|
||||
WAITING Matches if the task is waiting
|
||||
|
@ -882,6 +890,22 @@ This sets the wait date to 1/18/2038.
|
|||
.TP
|
||||
Next occurring weekday
|
||||
task ... due:fri
|
||||
|
||||
.TP
|
||||
Predictable holidays
|
||||
task ... due:goodfriday
|
||||
.br
|
||||
task ... due:easter
|
||||
.br
|
||||
task ... due:eastermonday
|
||||
.br
|
||||
task ... due:ascension
|
||||
.br
|
||||
task ... due:pentecost
|
||||
.br
|
||||
task ... due:midsommar
|
||||
.br
|
||||
task ... due:midsommarafton
|
||||
.RE
|
||||
|
||||
.SS FREQUENCIES
|
||||
|
@ -1057,10 +1081,10 @@ The file that contains the completed ("done") tasks.
|
|||
|
||||
.TP
|
||||
~/.task/undo.data
|
||||
The file that contains information needed by the "undo" and "merge" commands.
|
||||
The file that contains information needed by the "undo" command.
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior is distributed under the MIT license. See
|
||||
http://www.opensource.org/licenses/mit-license.php for more information.
|
||||
|
|
|
@ -80,6 +80,8 @@ The hash mark, or pound sign ("#") is used as a comment character. It can be
|
|||
used to annotate the configuration file. All text after the character to the end
|
||||
of the line is ignored.
|
||||
|
||||
The configuration file supports UTF8 as well as JSON encoding, such as \\uNNNN.
|
||||
|
||||
Note that taskwarrior is flexible about the values used to represent Boolean
|
||||
items. You can use "on", "yes", "y", "1" and "true".
|
||||
Anything else means "off".
|
||||
|
@ -89,7 +91,7 @@ You can edit your .taskrc file by hand if you wish, or you can use the 'config'
|
|||
command. To permanently set a value in your .taskrc file, use this command:
|
||||
|
||||
.RS
|
||||
$ task config nag "You have higher priority tasks!"
|
||||
$ task config nag "You have more urgent tasks."
|
||||
.RE
|
||||
|
||||
To delete an entry, use this command:
|
||||
|
@ -129,9 +131,9 @@ ones containing just the relevant configuration data like colors, etc.
|
|||
There are two excellent uses of includes in your .taskrc, shown here:
|
||||
|
||||
.RS
|
||||
include /usr/local/share/doc/task/rc/holidays.en-US.rc
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc
|
||||
.br
|
||||
include /usr/local/share/doc/task/rc/dark-16.theme
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-16.theme
|
||||
.RE
|
||||
|
||||
This includes two standard files that are distributed with taskwarrior, which
|
||||
|
@ -139,7 +141,7 @@ define a set of US holidays, and set up a 16-color theme to use, to color the
|
|||
reports and calendar.
|
||||
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
These environmant variables override defaults and command line arguments.
|
||||
These environment variables override defaults and command line arguments.
|
||||
|
||||
.TP
|
||||
.B TASKDATA=~/.task
|
||||
|
@ -304,11 +306,11 @@ variable is "no".
|
|||
This is useful for preventing large-scale unintended changes.
|
||||
|
||||
.TP
|
||||
.B nag=You have higher priority tasks.
|
||||
.B nag=You have more urgent tasks.
|
||||
This may be a string of text, or blank. It is used as a prompt when a task is
|
||||
started or completed that is not considered high priority. Default value is:
|
||||
You have higher priority tasks. It is a gentle reminder that you are
|
||||
contradicting your own priority settings.
|
||||
You have more urgent tasks. It is a gentle reminder that you are contradicting
|
||||
your own priority settings.
|
||||
|
||||
.TP
|
||||
.B complete.all.projects=yes
|
||||
|
@ -445,6 +447,10 @@ debug output can be useful. It can also help explain how the command line is
|
|||
being parsed, but the information is displayed in a developer-friendly, not a
|
||||
user-friendly way.
|
||||
|
||||
.TP
|
||||
.B debug.tls=0
|
||||
Controls the GnuTLS log level. For 'sync' debugging.
|
||||
|
||||
.TP
|
||||
.B alias.rm=delete
|
||||
Taskwarrior supports command aliases. This alias provides an alternate name
|
||||
|
@ -486,41 +492,45 @@ characters:
|
|||
|
||||
.RS
|
||||
.RS
|
||||
m minimal-digit month, for example 1 or 12
|
||||
m minimal-digit month, for example 1 or 12
|
||||
.br
|
||||
d minimal-digit day, for example 1 or 30
|
||||
d minimal-digit day, for example 1 or 30
|
||||
.br
|
||||
y two-digit year, for example 09 or 12
|
||||
y two-digit year, for example 09 or 12
|
||||
.br
|
||||
D two-digit day, for example 01 or 30
|
||||
D two-digit day, for example 01 or 30
|
||||
.br
|
||||
M two-digit month, for example 01 or 12
|
||||
M two-digit month, for example 01 or 12
|
||||
.br
|
||||
Y four-digit year, for example 2009 or 2013
|
||||
Y four-digit year, for example 2009 or 2014
|
||||
.br
|
||||
a short name of weekday, for example Mon or Wed
|
||||
a short name of weekday, for example Mon or Wed
|
||||
.br
|
||||
A long name of weekday, for example Monday or Wednesday
|
||||
A long name of weekday, for example Monday or Wednesday
|
||||
.br
|
||||
b short name of month, for example Jan or Aug
|
||||
b short name of month, for example Jan or Aug
|
||||
.br
|
||||
B long name of month, for example January or August
|
||||
B long name of month, for example January or August
|
||||
.br
|
||||
v minimal-digit week, for example 3 or 37
|
||||
v minimal-digit week, for example 3 or 37
|
||||
.br
|
||||
V two-digit week, for example 03 or 37
|
||||
V two-digit week, for example 03 or 37
|
||||
.br
|
||||
h minimal-digit hour, for example 3 or 21
|
||||
h minimal-digit hour, for example 3 or 21
|
||||
.br
|
||||
n minimal-digit minutes, for example 5 or 42
|
||||
n minimal-digit minutes, for example 5 or 42
|
||||
.br
|
||||
s minimal-digit seconds, for example 7 or 47
|
||||
s minimal-digit seconds, for example 7 or 47
|
||||
.br
|
||||
H two-digit hour, for example 03 or 21
|
||||
H two-digit hour, for example 03 or 21
|
||||
.br
|
||||
N two-digit minutes, for example 05 or 42
|
||||
N two-digit minutes, for example 05 or 42
|
||||
.br
|
||||
S two-digit seconds, for example 07 or 47
|
||||
S two-digit seconds, for example 07 or 47
|
||||
.br
|
||||
J three-digit Julian day, for example 023 or 365
|
||||
.br
|
||||
j Julian day, for example 23 or 365
|
||||
.RE
|
||||
.RE
|
||||
|
||||
|
@ -701,7 +711,7 @@ be included like this:
|
|||
.RS
|
||||
.RS
|
||||
.br
|
||||
include /usr/local/share/doc/task/rc/holidays.en-US.rc
|
||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc
|
||||
.RE
|
||||
.RE
|
||||
|
||||
|
@ -835,7 +845,7 @@ Colors any task where the description or any annotation contains X.
|
|||
|
||||
.TP
|
||||
.B color.uda.X=on green
|
||||
Colors any taks that has the user defined attribute X.
|
||||
Colors any task that has the user defined attribute X.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
|
@ -957,7 +967,7 @@ a change that is to be reverted.
|
|||
.br
|
||||
.B color.sync.rejected=red
|
||||
.RS
|
||||
Colors the output of the merge command.
|
||||
Colors the output of the sync command.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
|
@ -1040,6 +1050,7 @@ Specific tag coefficient.
|
|||
.B urgency.user.project.<project>.coefficient=...
|
||||
.RS
|
||||
Specific project coefficient.
|
||||
.RE
|
||||
.B urgency.uda.<name>.coefficient=...
|
||||
.RS
|
||||
Presence/absence of UDA data.
|
||||
|
@ -1078,31 +1089,6 @@ shadow.notify=on
|
|||
When this value is set to "on", taskwarrior will display a message whenever the
|
||||
shadow file is updated by some task command.
|
||||
|
||||
.SS PUSH/PULL/MERGE
|
||||
|
||||
See the 'man task-synch' page for more details regarding usage.
|
||||
|
||||
.TP
|
||||
.B merge.autopush=yes|no|ask
|
||||
.RS
|
||||
Determines post-merge behavior regarding automatic push.
|
||||
.RE
|
||||
|
||||
.B merge.default.uri
|
||||
.RS
|
||||
Default merge URI.
|
||||
.RE
|
||||
|
||||
.B pull.default.uri
|
||||
.RS
|
||||
Default pull URI.
|
||||
.RE
|
||||
|
||||
.B push.default.uri
|
||||
.RS
|
||||
Default push URI.
|
||||
.RE
|
||||
|
||||
.SS DEFAULTS
|
||||
|
||||
.TP
|
||||
|
@ -1126,6 +1112,13 @@ Provides a default due date for the
|
|||
.I task add
|
||||
command, if you don't specify one. The default is blank.
|
||||
|
||||
.TP
|
||||
.B
|
||||
uda.<name>.default=...
|
||||
Provides default values for UDA fields when using the
|
||||
.I task add
|
||||
command, if you don't specify values. The default is blank.
|
||||
|
||||
.TP
|
||||
.B
|
||||
default.command=next
|
||||
|
@ -1173,11 +1166,8 @@ The description for report X when running the "task help" command.
|
|||
|
||||
.TP
|
||||
.B report.X.columns
|
||||
The columns that will be used when generating the report X. Valid columns are:
|
||||
id, uuid, status, project, priority, priority_long, entry, start, end, due,
|
||||
countdown, countdown_compact, age, age_compact, active, tags, depends,
|
||||
description_only, description, recur, recurrence_indicator, tag_indicator and
|
||||
wait. The IDs are separated by commas.
|
||||
This is a comma-separated list of columns and formatting specifiers. See the
|
||||
command 'task columns' for a full list of options and examples.
|
||||
|
||||
.TP
|
||||
.B report.X.labels
|
||||
|
@ -1191,7 +1181,7 @@ specified by using the column ids post-fixed by a "+" for ascending sort order
|
|||
or a "-" for descending sort order. The sort IDs are separated by commas.
|
||||
For example:
|
||||
|
||||
report.list.sort=due+,priority-,active-,project+
|
||||
report.list.sort=due+,priority-,start.active-,project+
|
||||
|
||||
.TP
|
||||
.B report.X.filter
|
||||
|
@ -1330,8 +1320,63 @@ of a task.
|
|||
.B uda.estimate.values=trivial,small,medium,large,huge
|
||||
.RE
|
||||
|
||||
.SS SYNC
|
||||
|
||||
These configuration settings are used to connect and sync tasks with the task
|
||||
server.
|
||||
|
||||
.TP
|
||||
.B taskd.server=<host>:<port>
|
||||
.RS
|
||||
Specifies the hostname and port of the Taskserver. Hostname may be an IPv4 or
|
||||
IPv6 address, or domain. Port is an integer.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.credentials=<organization>/<user>/<key>
|
||||
.RS
|
||||
User identification for the Taskserver, which includes a private key.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.certificate=<path>
|
||||
.RS
|
||||
Specifies the path to the client certificate used for identification with the
|
||||
Taskserver.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.key=<path>
|
||||
.RS
|
||||
Specifies the path to the client key used for encrypted communication with the
|
||||
Taskserver.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.ca=<path>
|
||||
.RS
|
||||
Specifies the path to the CA certificate in the event that your Taskserver is
|
||||
using a self-signed certificate. Optional.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.trust=yes|no
|
||||
.RS
|
||||
If you do not specify a CA certificate when your Taskserver is using a self-
|
||||
signed certificate, you can override the certificate validation by setting this
|
||||
value to 'yes'. Default is not to trust a server certificate.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B taskd.ciphers=NORMAL
|
||||
Override of the cipher selection. The set of ciphers used by TLS may be
|
||||
controlled by both server and client. There must be some overlap between
|
||||
client and server supported ciphers, or communication cannot occur.
|
||||
Default is "NORMAL". See GnuTLS documentation for full details.
|
||||
.RE
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
This man page was originally written by Federico Hernandez.
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ ID Project Pri Due Active Age Description
|
|||
.RE
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
This man page was originally written by Federico Hernandez.
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ Calendar trick
|
|||
Metadata
|
||||
|
||||
Sync
|
||||
push
|
||||
pull
|
||||
merge
|
||||
sync (needs 2.3.0 & task server)
|
||||
sync (needs 2.3.0 & Taskserver)
|
||||
|
||||
Logo?
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/be-BY/2013.json
|
||||
# http://holidata.net/be-BY/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/cs-CZ/2013.json
|
||||
# http://holidata.net/cs-CZ/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/da-DK/2013.json
|
||||
# http://holidata.net/da-DK/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/de-AT/2013.json
|
||||
# http://holidata.net/de-AT/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/de-DE/2013.json
|
||||
# http://holidata.net/de-DE/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/en-CA/2013.json
|
||||
# http://holidata.net/en-CA/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/en-GB/2013.json
|
||||
# http://holidata.net/en-GB/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/en-NZ/2013.json
|
||||
# http://holidata.net/en-NZ/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/en-US/2013.json
|
||||
# http://holidata.net/en-US/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/es-ES/2013.json
|
||||
# http://holidata.net/es-ES/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/fr-FR/2013.json
|
||||
# http://holidata.net/fr-FR/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/it-IT/2013.json
|
||||
# http://holidata.net/it-IT/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/jp-JP/2013.json
|
||||
# http://holidata.net/jp-JP/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/nb-NO/2013.json
|
||||
# http://holidata.net/nb-NO/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/nl-NL/2013.json
|
||||
# http://holidata.net/nl-NL/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# http://holidata.net/sv-SE/2013.json
|
||||
# http://holidata.net/sv-SE/2014.json
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Colors used are based on the Solarized palette created by Ethan Schoonover
|
||||
# <http://ethanschoonover.com/solarized>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Colors used are based on the Solarized palette created by Ethan Schoonover
|
||||
# <http://ethanschoonover.com/solarized>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -242,7 +242,7 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
|
|||
$ /usr/local/bin/task version
|
||||
|
||||
task 2.0.0 built for darwin
|
||||
Copyright (C) 2006 - 2013 P. Beckingham, F. Hernandez.
|
||||
Copyright (C) 2006 - 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
Taskwarrior may be copied only under the terms of the GNU General Public
|
||||
License, which may be found in the taskwarrior source kit.
|
||||
|
|
1
performance/.gitignore
vendored
1
performance/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
*.data
|
||||
*.rc
|
||||
export.json
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
echo 'Performance: setup'
|
||||
echo ' - This step will take several minutes'
|
||||
rm -f ./pending.data ./completed.data ./undo.data perf.rc
|
||||
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data perf.rc
|
||||
./load
|
||||
|
||||
# Run benchmarks.
|
||||
|
@ -26,6 +26,14 @@ echo ' - task add...'
|
|||
../src/task rc.debug:1 rc:perf.rc add >/dev/null 2>&1
|
||||
../src/task rc.debug:1 rc:perf.rc add This is a task with an average sized description length project:P priority:H +tag1 +tag2 2>&1 | grep "Perf task"
|
||||
|
||||
echo ' - task export...'
|
||||
../src/task rc.debug:1 rc:perf.rc export >/dev/null 2>&1
|
||||
../src/task rc.debug:1 rc:perf.rc export 2>&1 >export.json | grep "Perf task"
|
||||
|
||||
echo ' - task import...'
|
||||
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data
|
||||
../src/task rc.debug:1 rc:perf.rc import export.json 2>&1 | grep "Perf task"
|
||||
|
||||
echo 'End'
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
###############################################################################
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -190,7 +190,7 @@ if (open my $fh, '>:utf8', $file)
|
|||
"# ${url_current}\n",
|
||||
"# ${url_next}\n",
|
||||
"#\n",
|
||||
"# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.\n",
|
||||
"# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.\n",
|
||||
"#\n",
|
||||
"# Permission is hereby granted, free of charge, to any person obtaining a copy\n",
|
||||
"# of this software and associated documentation files (the \"Software\"), to deal\n",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# bash completion support for taskwarrior
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
# Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# * Tags
|
||||
# * Attribute names and modifiers
|
||||
#
|
||||
# Copyright 2009 - 2013 Mick Koch <kchmck@gmail.com>
|
||||
# Copyright 2009 - 2014 Mick Koch <kchmck@gmail.com>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
172
scripts/utils/l10n
Executable file
172
scripts/utils/l10n
Executable file
|
@ -0,0 +1,172 @@
|
|||
#! /usr/bin/env python -tt
|
||||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
## in the Software without restriction, including without limitation the rights
|
||||
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
## copies of the Software, and to permit persons to whom the Software is
|
||||
## furnished to do so, subject to the following conditions:
|
||||
##
|
||||
## The above copyright notice and this permission notice shall be included
|
||||
## in all copies or substantial portions of the Software.
|
||||
##
|
||||
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
## SOFTWARE.
|
||||
##
|
||||
## http://www.opensource.org/licenses/mit-license.php
|
||||
##
|
||||
################################################################################
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import re
|
||||
import fnmatch
|
||||
|
||||
def find_localizations(source):
|
||||
'''Finds all [a-z][a-z]-[A-Z][A-Z].h files in the source tree.'''
|
||||
found = []
|
||||
for path, dirs, files in os.walk(source, topdown=True, onerror=None, followlinks=False):
|
||||
found.extend(map(lambda x: os.path.join(path, x),
|
||||
fnmatch.filter(files, '[a-z][a-z]-[A-Z][A-Z].h')))
|
||||
return found
|
||||
|
||||
def read_file(translations, file):
|
||||
'''Reads all the localized strings from a file.'''
|
||||
translations[file] = {}
|
||||
with open(file, 'r') as fh:
|
||||
for match in re.findall(r'^\s*#define\s+(STRING_[^\s]+)(\s|\\)+"([^"]*)"', fh.read(), re.MULTILINE):
|
||||
translations[file][match[0]] = match[2]
|
||||
|
||||
def is_present(translations, file, string):
|
||||
'''Determines if the string is defined in a translation.'''
|
||||
return string in translations[file]
|
||||
|
||||
def used_in_source(source, string):
|
||||
'''Determines if the string is used in the source.'''
|
||||
command = "git grep %s %s | grep -v [a-z][a-z]-[A-Z][A-Z].h >/dev/null 2>&1" % (string, source)
|
||||
return True if os.system(command) == 0 else False
|
||||
|
||||
def is_translated(translations, file, string):
|
||||
'''Determines whether the string is the same in the base version as in the
|
||||
translation, indicating work needed.'''
|
||||
if file == base:
|
||||
return True
|
||||
elif string not in translations[base]:
|
||||
return True
|
||||
elif string not in translations[file]:
|
||||
return False
|
||||
else:
|
||||
return bool(translations[file][string] != translations[base][string])
|
||||
|
||||
def main(args):
|
||||
'''Processes all the localized files.'''
|
||||
errors = 0
|
||||
translations = {}
|
||||
|
||||
for file in args.files:
|
||||
# Verify all files exist.
|
||||
if not os.path.exists(file):
|
||||
raise Exception("Localized file '%s' not readable." % file)
|
||||
read_file(translations, file)
|
||||
|
||||
strings = set()
|
||||
for file in translations:
|
||||
for string in translations[file]:
|
||||
strings.add(string)
|
||||
|
||||
if len(strings) == 0:
|
||||
if not args.quiet:
|
||||
print("There are no localized strings found.")
|
||||
errors = 1
|
||||
|
||||
# Get length of longest string ID.
|
||||
longest_string = len(max(strings, key=len))
|
||||
|
||||
# Display info.
|
||||
if not args.quiet:
|
||||
print('Scanning in', args.source)
|
||||
print()
|
||||
|
||||
# Print header line.
|
||||
files = map(lambda x: os.path.basename(x), args.files)
|
||||
if not args.quiet:
|
||||
print('%-*s %s' % (longest_string, 'String ID', ' '.join(files)))
|
||||
print('-' * longest_string, ' '.join(['-------'] * len(files)))
|
||||
|
||||
for string in sorted(strings):
|
||||
# assess status of 'string':
|
||||
# - clean
|
||||
|
||||
line = ''
|
||||
line_errors = 0
|
||||
for file in args.files:
|
||||
message = ' '
|
||||
if is_present(translations, file, string):
|
||||
if is_translated(translations, file, string):
|
||||
message = ' [30;42mOk [0m'
|
||||
else:
|
||||
message = ' [30;43mTODO [0m'
|
||||
else:
|
||||
message = ' [37;41mMissing[0m'
|
||||
line_errors = 1
|
||||
|
||||
line += message
|
||||
|
||||
if args.all or line_errors != 0:
|
||||
if args.search:
|
||||
if used_in_source(args.source, string):
|
||||
if not args.quiet:
|
||||
print('%-*s' % (longest_string, string), line, sep='')
|
||||
else:
|
||||
if not args.quiet:
|
||||
print('[37;41m%-*s[0m' % (longest_string, string), line, sep='')
|
||||
line_errors = 1
|
||||
else:
|
||||
if not args.quiet:
|
||||
print('%-*s' % (longest_string, string), line, sep='')
|
||||
|
||||
if line_errors:
|
||||
errors = 1
|
||||
|
||||
if not args.quiet:
|
||||
print('-' * longest_string, ' '.join(['-------'] * len(files)))
|
||||
print('%-*s' % (longest_string, 'Total'), end='')
|
||||
for file in args.files:
|
||||
print('%8d' % len(translations[file]), end='')
|
||||
print()
|
||||
|
||||
sys.exit(errors)
|
||||
|
||||
if __name__ == "__main__":
|
||||
usage="""Utility for checking localized string status across translations."""
|
||||
|
||||
parser = argparse.ArgumentParser(description=usage)
|
||||
parser.add_argument('--source', action='store', required=True, help='The source code tree.')
|
||||
parser.add_argument('--all', action='store_true', help='Show all string IDs.')
|
||||
parser.add_argument('--search', action='store_true', help='Search source for use.')
|
||||
parser.add_argument('--quiet', action='store_true', help='Produces no output.')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.source:
|
||||
args.files = find_localizations(args.source)
|
||||
|
||||
base = filter(lambda x: x.endswith('en-US.h'), args.files)[0]
|
||||
|
||||
try:
|
||||
main(args)
|
||||
except Exception as msg:
|
||||
print('Error:', msg)
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
## in the Software without restriction, including without limitation the rights
|
||||
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
## copies of the Software, and to permit persons to whom the Software is
|
||||
## furnished to do so, subject to the following conditions:
|
||||
##
|
||||
## The above copyright notice and this permission notice shall be included
|
||||
## in all copies or substantial portions of the Software.
|
||||
##
|
||||
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
## SOFTWARE.
|
||||
##
|
||||
## http://www.opensource.org/licenses/mit-license.php
|
||||
##
|
||||
################################################################################
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print "Usage:", sys.argv[0], "file1 file2 ..."
|
||||
sys.exit()
|
||||
|
||||
translations = {}
|
||||
missing = {}
|
||||
for file in sys.argv[1:]:
|
||||
with open(file, 'r') as f:
|
||||
translations[file] = set()
|
||||
missing[file] = set()
|
||||
# Treat empty strings ("") as a missing entry - because they are just that.
|
||||
for m in re.findall(r'^\s*#define\s(STRING_[^\s]+)(\s|\\)+"([^"]+)"', f.read(), re.MULTILINE):
|
||||
translations[file].add(m[0])
|
||||
|
||||
for file in translations:
|
||||
for entry in translations[file]:
|
||||
for other_translation in translations:
|
||||
if entry not in translations[other_translation]:
|
||||
missing[other_translation].add(entry)
|
||||
|
||||
for file in missing:
|
||||
if len(missing[file]) > 0:
|
||||
print "--- %s --- missing defines:" % file
|
||||
for i in sorted(list(missing[file])):
|
||||
print i
|
||||
else:
|
||||
print "--- %s --- is ok." % file
|
||||
|
|
@ -53,7 +53,7 @@ You should then be ready to go.
|
|||
---
|
||||
All four above mentioned files are
|
||||
|
||||
Copyright 2009 - 2013 John Florian
|
||||
Copyright 2009 - 2014 John Florian
|
||||
|
||||
and are available under the MIT license.
|
||||
For the full text of this license, see COPYING.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Thu Dec 10 18:28:26 EST 2009
|
||||
"
|
||||
" Copyright 2009 - 2013 John Florian
|
||||
" Copyright 2009 - 2014 John Florian
|
||||
"
|
||||
" This file is available under the MIT license.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Wed Jul 8 19:46:20 EDT 2009
|
||||
"
|
||||
" Copyright 2009 - 2013 John Florian
|
||||
" Copyright 2009 - 2014 John Florian
|
||||
"
|
||||
" This file is available under the MIT license.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Wed Jul 8 19:46:32 EDT 2009
|
||||
"
|
||||
" Copyright 2009 - 2013 John Florian
|
||||
" Copyright 2009 - 2014 John Florian
|
||||
"
|
||||
" This file is available under the MIT license.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
" Maintainer: John Florian <jflorian@doubledog.org>
|
||||
" Updated: Sat Feb 20 14:14:44 EST 2010
|
||||
"
|
||||
" Copyright 2009 - 2013 John Florian
|
||||
" Copyright 2009 - 2014 John Florian
|
||||
"
|
||||
" This file is available under the MIT license.
|
||||
" For the full text of this license, see COPYING.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# taskwarrior - a command line task list manager.
|
||||
#
|
||||
# Copyright 2010 - 2013 Johannes Schlatow
|
||||
# Copyright 2010 - 2014 Johannes Schlatow
|
||||
# Copyright 2009 P.C. Shyamshankar
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -98,11 +98,13 @@ _regex_words values 'task dates' \
|
|||
'soww:Start of work week' \
|
||||
'socw:Start of calendar week' \
|
||||
'som:Start of month' \
|
||||
'soq:Start of quarter' \
|
||||
'soy:Start of year' \
|
||||
'eow:End of week' \
|
||||
'eoww:End of work week' \
|
||||
'eocw:End of calendar week' \
|
||||
'eom:End of month' \
|
||||
'eoq:End of quarter' \
|
||||
'eoy:End of year' \
|
||||
'mon:Monday' \
|
||||
'tue:Tuesday'\
|
||||
|
@ -110,7 +112,16 @@ _regex_words values 'task dates' \
|
|||
'thu:Thursday' \
|
||||
'fri:Friday' \
|
||||
'sat:Saturday' \
|
||||
'sun:Sunday'
|
||||
'sun:Sunday' \
|
||||
'good*friday:Good Friday' \
|
||||
'easter:Easter' \
|
||||
'eastermonday:Easter Monday' \
|
||||
'ascension:Ascension' \
|
||||
'pentecost:Pentecost' \
|
||||
'midsommar:Midsommar' \
|
||||
'midsommarafton:Midsommarafton' \
|
||||
'later:Later' \
|
||||
'someday:Some Day'
|
||||
_task_dates=("$reply[@]")
|
||||
|
||||
local -a _task_reldates
|
||||
|
@ -141,7 +152,7 @@ _regex_words values 'task frequencies' \
|
|||
'weekly:Every week' \
|
||||
'biweekly:Every two weeks' \
|
||||
'fortnight:Every two weeks' \
|
||||
'monthly:Every month' \
|
||||
'monthly:Every month' \
|
||||
'quarterly:Every three months' \
|
||||
'semiannual:Every six months' \
|
||||
'annual:Every year' \
|
||||
|
|
67
src/A3.cpp
67
src/A3.cpp
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include <i18n.h>
|
||||
#include <main.h>
|
||||
#include <A3.h>
|
||||
#include <cmake.h>
|
||||
|
||||
#ifdef FEATURE_STDIN
|
||||
#include <sys/select.h>
|
||||
|
@ -72,38 +72,37 @@ static struct
|
|||
std::string op;
|
||||
int precedence;
|
||||
char type;
|
||||
int symbol;
|
||||
char associativity;
|
||||
} operators[] =
|
||||
{
|
||||
// Operator Precedence Type Symbol Associativity
|
||||
{ "and", 5, 'b', 0, 'l' }, // Conjunction
|
||||
{ "xor", 4, 'b', 0, 'l' }, // Disjunction
|
||||
// Operator Precedence Type Associativity
|
||||
{ "and", 5, 'b', 'l' }, // Conjunction
|
||||
{ "xor", 4, 'b', 'l' }, // Disjunction
|
||||
|
||||
{ "or", 3, 'b', 0, 'l' }, // Disjunction
|
||||
{ "<=", 10, 'b', 1, 'l' }, // Less than or equal
|
||||
{ ">=", 10, 'b', 1, 'l' }, // Greater than or equal
|
||||
{ "!~", 9, 'b', 1, 'l' }, // Regex non-match
|
||||
{ "!=", 9, 'b', 1, 'l' }, // Inequal
|
||||
{ "or", 3, 'b', 'l' }, // Disjunction
|
||||
{ "<=", 10, 'b', 'l' }, // Less than or equal
|
||||
{ ">=", 10, 'b', 'l' }, // Greater than or equal
|
||||
{ "!~", 9, 'b', 'l' }, // Regex non-match
|
||||
{ "!=", 9, 'b', 'l' }, // Inequal
|
||||
|
||||
{ "=", 9, 'b', 1, 'l' }, // Equal
|
||||
// { "^", 16, 'b', 1, 'r' }, // Exponent
|
||||
{ ">", 10, 'b', 1, 'l' }, // Greater than
|
||||
{ "~", 9, 'b', 1, 'l' }, // Regex match
|
||||
{ "!", 15, 'u', 1, 'r' }, // Not
|
||||
{ "=", 9, 'b', 'l' }, // Equal
|
||||
// { "^", 16, 'b', 'r' }, // Exponent
|
||||
{ ">", 10, 'b', 'l' }, // Greater than
|
||||
{ "~", 9, 'b', 'l' }, // Regex match
|
||||
{ "!", 15, 'u', 'r' }, // Not
|
||||
|
||||
{ "_hastag_", 9, 'b', 0, 'l'}, // +tag [Pseudo-op]
|
||||
{ "_notag_", 9, 'b', 0, 'l'}, // -tag [Pseudo-op]
|
||||
{ "_hastag_", 9, 'b', 'l'}, // +tag [Pseudo-op]
|
||||
{ "_notag_", 9, 'b', 'l'}, // -tag [Pseudo-op]
|
||||
|
||||
{ "-", 15, 'u', 1, 'r' }, // Unary minus
|
||||
{ "*", 13, 'b', 1, 'l' }, // Multiplication
|
||||
{ "/", 13, 'b', 1, 'l' }, // Division
|
||||
// { "%", 13, 'b', 1, 'l' }, // Modulus
|
||||
{ "+", 12, 'b', 1, 'l' }, // Addition
|
||||
{ "-", 12, 'b', 1, 'l' }, // Subtraction
|
||||
{ "<", 10, 'b', 1, 'l' }, // Less than
|
||||
{ "(", 0, 'b', 1, 'l' }, // Precedence start
|
||||
{ ")", 0, 'b', 1, 'l' }, // Precedence end
|
||||
{ "-", 15, 'u', 'r' }, // Unary minus
|
||||
{ "*", 13, 'b', 'l' }, // Multiplication
|
||||
{ "/", 13, 'b', 'l' }, // Division
|
||||
// { "%", 13, 'b', 'l' }, // Modulus
|
||||
{ "+", 12, 'b', 'l' }, // Addition
|
||||
{ "-", 12, 'b', 'l' }, // Subtraction
|
||||
{ "<", 10, 'b', 'l' }, // Less than
|
||||
{ "(", 0, 'b', 'l' }, // Precedence start
|
||||
{ ")", 0, 'b', 'l' }, // Precedence end
|
||||
};
|
||||
|
||||
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
||||
|
@ -1141,6 +1140,9 @@ const A3 A3::sequence (const A3& input) const
|
|||
if (ids.size () == 0 && uuids.size () == 0)
|
||||
return input;
|
||||
|
||||
if (ids.size () == 1 && ids[0] < 1)
|
||||
throw format (STRING_A3_ZERO_ID, ids[0]);
|
||||
|
||||
// Copy everything up to the first id/uuid.
|
||||
for (arg = input.begin (); arg != input.end (); ++arg)
|
||||
{
|
||||
|
@ -1371,7 +1373,6 @@ bool A3::is_attmod (Nibbler& n, Arg& arg)
|
|||
std::string canonical;
|
||||
std::string modifier;
|
||||
std::string value;
|
||||
// time_t date;
|
||||
|
||||
// If there is a valid attribute name.
|
||||
if (n.getName (name) &&
|
||||
|
@ -1403,14 +1404,6 @@ bool A3::is_attmod (Nibbler& n, Arg& arg)
|
|||
n.getUntilEOS (value) || // Redundant?
|
||||
n.depleted ())
|
||||
{
|
||||
/*
|
||||
TODO Eliminate anything that looks like a URL.
|
||||
// Exclude certain URLs, that look like attrs.
|
||||
if (value.find ('@') <= n.cursor () ||
|
||||
value.find ('/') <= n.cursor ())
|
||||
return false;
|
||||
*/
|
||||
|
||||
arg._raw = canonical + '.' + modifier + ':' + value;
|
||||
Column* col = context.columns[canonical];
|
||||
arg._type = col ? Arg::type_id (col->type ()) : Arg::type_pseudo;
|
||||
|
@ -1575,6 +1568,7 @@ bool A3::is_dom (Nibbler& n, Arg& arg)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool A3::is_date (Nibbler& n, std::string& result)
|
||||
{
|
||||
#ifdef NIBBLER_FEATURE_DATE
|
||||
std::string date_format = context.config.get ("dateformat");
|
||||
std::string::size_type start = n.save ();
|
||||
time_t t;
|
||||
|
@ -1586,6 +1580,7 @@ bool A3::is_date (Nibbler& n, std::string& result)
|
|||
}
|
||||
|
||||
n.restore ();
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
2
src/A3.h
2
src/A3.h
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <Arg.h>
|
||||
#include <Context.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -33,6 +33,7 @@ set (task_SRCS A3.cpp A3.h
|
|||
Task.cpp Task.h
|
||||
Taskmod.cpp Taskmod.h
|
||||
Timer.cpp Timer.h
|
||||
TLSClient.cpp TLSClient.h
|
||||
Transport.cpp Transport.h
|
||||
TransportCurl.cpp TransportCurl.h
|
||||
TransportRSYNC.cpp TransportRSYNC.h
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#define FEATURE_COLOR 1
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#define _COLOR_INVERSE 0x00400000 // Inverse attribute.
|
||||
#define _COLOR_256 0x00200000 // 256-color mode.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
@ -37,10 +38,10 @@
|
|||
#include <Date.h>
|
||||
#include <File.h>
|
||||
#include <Timer.h>
|
||||
#include <JSON.h>
|
||||
#include <Config.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <cmake.h>
|
||||
#include <i18n.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -290,17 +291,17 @@ std::string Config::_defaults =
|
|||
"list.all.tags=no # Include old tag names in 'tags' command\n"
|
||||
"print.empty.columns=no # Print columns which have no data for any task\n"
|
||||
"debug=no # Display diagnostics\n"
|
||||
"debug.tls=0 # GnuTLS log level\n"
|
||||
"extensions=off # Extension system master switch\n"
|
||||
"fontunderline=yes # Uses underlines rather than -------\n"
|
||||
"shell.prompt=task> # Prompt used by the shell command\n"
|
||||
"\n"
|
||||
"# Merge options\n"
|
||||
"#\n"
|
||||
"# WARNING: Please read the documentation (man task-sync) before proceeding with these\n"
|
||||
"# synchronization features. If improperly used, data can be lost!\n"
|
||||
"merge.autopush=ask # Push database to remote origin after merge: yes, no, ask\n"
|
||||
"#merge.default.uri=user@host.xz:.task/ # URI for merge\n"
|
||||
"#pull.default.uri=rsync://host.xz/task-backup/ # URI for pull\n"
|
||||
"# WARNING: Please read the documentation (man task-sync) before setting up\n"
|
||||
"# Taskwarrior for Taskserver synchronization.\n"
|
||||
"#taskd.certificate <certificat file>\n"
|
||||
"#taskd.credentials <organization>/<name>/<password>\n"
|
||||
"#taskd.server <server>:<port>\n"
|
||||
"taskd.ciphers=NORMAL\n"
|
||||
"\n"
|
||||
"# Aliases - alternate names for commands\n"
|
||||
"alias.rm=delete # Alias for the delete command\n"
|
||||
|
@ -308,6 +309,7 @@ std::string Config::_defaults =
|
|||
"alias.ghistory=ghistory.monthly # Prefer monthly graphical over annual history reports\n"
|
||||
"alias._query=export # _query is now export\n"
|
||||
"alias.burndown=burndown.weekly # Prefer the weekly burndown chart\n"
|
||||
"alias.shell=exec tasksh # Alias old shell command to new shell\n"
|
||||
"\n"
|
||||
"# Reports\n"
|
||||
"\n"
|
||||
|
@ -377,7 +379,6 @@ std::string Config::_defaults =
|
|||
"report.waiting.filter=+WAITING\n"
|
||||
"report.waiting.sort=due+,wait+,entry+\n"
|
||||
"\n"
|
||||
// Updated.
|
||||
"report.all.description=Pending, waiting and completed tasks by age\n"
|
||||
"report.all.labels=ID,St,UUID,A,Age,Done,D,P,Project,Tags,R,Wait,Sch,Due,Until,Description\n"
|
||||
"report.all.columns=id,status.short,uuid.short,start.active,entry.age,end.age,depends.indicator,priority,project.parent,tags.count,recur.indicator,wait.age,scheduled.age,due,until.age,description\n"
|
||||
|
@ -496,7 +497,7 @@ void Config::parse (const std::string& input, int nest /* = 1 */)
|
|||
std::string key = trim (line.substr (0, equal), " \t"); // no i18n
|
||||
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t"); // no i18n
|
||||
|
||||
(*this)[key] = value;
|
||||
(*this)[key] = json::decode (value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006 - 2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006 - 2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
@ -40,7 +41,6 @@
|
|||
#include <util.h>
|
||||
#include <main.h>
|
||||
#include <i18n.h>
|
||||
#include <cmake.h>
|
||||
#ifdef HAVE_COMMIT
|
||||
#include <commit.h>
|
||||
#endif
|
||||
|
@ -152,10 +152,6 @@ int Context::initialize (int argc, const char** argv)
|
|||
// Apply rc overrides to Context::config, capturing raw args for later use.
|
||||
a3.apply_overrides ();
|
||||
|
||||
// Now that the final RC is in place, initialize the urgency coefficients
|
||||
// to speed the 'next' report.
|
||||
initializeUrgencyCoefficients ();
|
||||
|
||||
// Initialize the color rules, if necessary.
|
||||
if (color ())
|
||||
initializeColorRules ();
|
||||
|
@ -166,6 +162,9 @@ int Context::initialize (int argc, const char** argv)
|
|||
// Instantiate built-in column objects.
|
||||
Column::factory (columns);
|
||||
|
||||
// Static initialization to decouple code.
|
||||
staticInitialization ();
|
||||
|
||||
// Categorize all arguments one more time. THIS IS NECESSARY - it helps the
|
||||
// following inject_defaults method determine whether there needs to be a
|
||||
// default command assumed.
|
||||
|
@ -597,6 +596,48 @@ const std::vector <std::string> Context::getCommands () const
|
|||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// The 'Task' object, among others, is shared between projects. To make this
|
||||
// easier, it has been decoupled from Context.
|
||||
void Context::staticInitialization ()
|
||||
{
|
||||
Task::defaultProject = config.get ("default.project");
|
||||
Task::defaultPriority = config.get ("default.priority");
|
||||
Task::defaultDue = config.get ("default.due");
|
||||
Task::searchCaseSensitive = config.getBoolean ("search.case.sensitive");
|
||||
Task::regex = config.getBoolean ("regex");
|
||||
|
||||
std::map <std::string, Column*>::iterator i;
|
||||
for (i = columns.begin (); i != columns.end (); ++i)
|
||||
Task::attributes[i->first] = i->second->type ();
|
||||
|
||||
Task::urgencyPriorityCoefficient = config.getReal ("urgency.priority.coefficient");
|
||||
Task::urgencyProjectCoefficient = config.getReal ("urgency.project.coefficient");
|
||||
Task::urgencyActiveCoefficient = config.getReal ("urgency.active.coefficient");
|
||||
Task::urgencyScheduledCoefficient = config.getReal ("urgency.scheduled.coefficient");
|
||||
Task::urgencyWaitingCoefficient = config.getReal ("urgency.waiting.coefficient");
|
||||
Task::urgencyBlockedCoefficient = config.getReal ("urgency.blocked.coefficient");
|
||||
Task::urgencyAnnotationsCoefficient = config.getReal ("urgency.annotations.coefficient");
|
||||
Task::urgencyTagsCoefficient = config.getReal ("urgency.tags.coefficient");
|
||||
Task::urgencyNextCoefficient = config.getReal ("urgency.next.coefficient");
|
||||
Task::urgencyDueCoefficient = config.getReal ("urgency.due.coefficient");
|
||||
Task::urgencyBlockingCoefficient = config.getReal ("urgency.blocking.coefficient");
|
||||
Task::urgencyAgeCoefficient = config.getReal ("urgency.age.coefficient");
|
||||
Task::urgencyAgeMax = config.getReal ("urgency.age.max");
|
||||
|
||||
// Tag- and project-specific coefficients.
|
||||
std::vector <std::string> all;
|
||||
config.all (all);
|
||||
|
||||
std::vector <std::string>::iterator var;
|
||||
for (var = all.begin (); var != all.end (); ++var)
|
||||
{
|
||||
if (var->substr (0, 13) == "urgency.user." ||
|
||||
var->substr (0, 12) == "urgency.uda.")
|
||||
Task::coefficients[*var] = config.getReal (*var);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::assumeLocations ()
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -75,6 +75,7 @@ public:
|
|||
void decomposeSortField (const std::string&, std::string&, bool&);
|
||||
|
||||
private:
|
||||
void staticInitialization ();
|
||||
void assumeLocations ();
|
||||
void createDefaultConfig ();
|
||||
void loadAliases ();
|
||||
|
|
66
src/DOM.cpp
66
src/DOM.cpp
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,13 +25,13 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <sstream>
|
||||
#include <Context.h>
|
||||
#include <Nibbler.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
#include <DOM.h>
|
||||
#include <cmake.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
|
@ -73,6 +73,7 @@ const std::vector <std::string> DOM::get_references () const
|
|||
//
|
||||
// system.version
|
||||
// system.os
|
||||
//
|
||||
const std::string DOM::get (const std::string& name)
|
||||
{
|
||||
int len = name.length ();
|
||||
|
@ -86,20 +87,20 @@ const std::string DOM::get (const std::string& name)
|
|||
}
|
||||
|
||||
// context.*
|
||||
else if (len > 8 &&
|
||||
if (len > 8 &&
|
||||
name.substr (0, 8) == "context.")
|
||||
{
|
||||
if (name == "context.program") return context.a3[0]._raw;
|
||||
else if (name == "context.args") return context.a3.combine ();
|
||||
else if (name == "context.width") return format (context.terminal_width);
|
||||
else if (name == "context.height") return format (context.terminal_height);
|
||||
else if (name == "context.width") return format (context.terminal_width ? context.terminal_width : context.getWidth ());
|
||||
else if (name == "context.height") return format (context.terminal_height ? context.terminal_height : context.getHeight ());
|
||||
else throw format (STRING_DOM_UNREC, name);
|
||||
}
|
||||
|
||||
// TODO stats.<name>
|
||||
|
||||
// system. --> Implement locally.
|
||||
else if (len > 7 &&
|
||||
if (len > 7 &&
|
||||
name.substr (0, 7) == "system.")
|
||||
{
|
||||
// Taskwarrior version number.
|
||||
|
@ -143,53 +144,26 @@ const std::string DOM::get (const std::string& name)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// DOM Supported References:
|
||||
//
|
||||
// TODO <id>.{entry,start,end,scheduled,due,until,wait}
|
||||
// TODO <id>.description
|
||||
// TODO <id>.project
|
||||
// TODO <id>.priority
|
||||
// TODO <id>.parent
|
||||
// TODO <id>.status
|
||||
// TODO <id>.tags
|
||||
// TODO <id>.urgency
|
||||
// TODO <id>.recur
|
||||
// TODO <id>.depends
|
||||
//
|
||||
// TODO <uuid>.{entry,start,end,scheduled,due,until,wait}
|
||||
// TODO <uuid>.description
|
||||
// TODO <uuid>.project
|
||||
// TODO <uuid>.priority
|
||||
// TODO <uuid>.parent
|
||||
// TODO <uuid>.status
|
||||
// TODO <uuid>.tags
|
||||
// TODO <uuid>.urgency
|
||||
// TODO <uuid>.recur
|
||||
// TODO <uuid>.depends
|
||||
//
|
||||
// {entry,start,end,scheduled,due,until,wait}
|
||||
// description
|
||||
// project
|
||||
// priority
|
||||
// parent
|
||||
// status
|
||||
// tags
|
||||
// urgency
|
||||
// recur
|
||||
// depends
|
||||
// <attribute>
|
||||
// <id>.<attribute>
|
||||
// <uuid>.<attribute>
|
||||
//
|
||||
const std::string DOM::get (const std::string& name, const Task& task)
|
||||
{
|
||||
Nibbler n (name);
|
||||
n.save ();
|
||||
|
||||
int id;
|
||||
std::string uuid;
|
||||
std::string canonical;
|
||||
|
||||
// <attr>
|
||||
if (name == "id") return format (task.id);
|
||||
else if (name == "urgency") return format (task.urgency_c (), 4, 3);
|
||||
else if (name == "urgency") return format (task.urgency_c ());
|
||||
else if (A3::is_attribute (name, canonical)) return task.get (canonical);
|
||||
|
||||
// <id>.<name>
|
||||
else if (n.getInt (id))
|
||||
if (n.getInt (id))
|
||||
{
|
||||
if (n.skip ('.'))
|
||||
{
|
||||
|
@ -203,13 +177,15 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
n.getUntilEOS (attr);
|
||||
|
||||
if (attr == "id") return format (ref.id);
|
||||
else if (attr == "urgency") return format (ref.urgency_c (), 4, 3);
|
||||
else if (attr == "urgency") return format (ref.urgency_c ());
|
||||
else if (A3::is_attribute (attr, canonical)) return ref.get (canonical);
|
||||
}
|
||||
|
||||
n.restore ();
|
||||
}
|
||||
|
||||
// <uuid>.<name>
|
||||
else if (n.getUUID (uuid))
|
||||
if (n.getUUID (uuid))
|
||||
{
|
||||
if (n.skip ('.'))
|
||||
{
|
||||
|
@ -222,10 +198,12 @@ const std::string DOM::get (const std::string& name, const Task& task)
|
|||
std::string attr;
|
||||
n.getUntilEOS (attr);
|
||||
|
||||
if (name == "id") return format (ref.id);
|
||||
else if (name == "urgency") return format (ref.urgency_c (), 4, 3);
|
||||
if (attr == "id") return format (ref.id);
|
||||
else if (attr == "urgency") return format (ref.urgency_c (), 4, 3);
|
||||
else if (A3::is_attribute (attr, canonical)) return ref.get (canonical);
|
||||
}
|
||||
|
||||
n.restore ();
|
||||
}
|
||||
|
||||
// Delegate to the context-free version of DOM::get.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
49
src/Date.cpp
49
src/Date.cpp
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <time.h>
|
||||
|
@ -133,8 +134,10 @@ Date::Date (const std::string& input, const std::string& format /* = "m/d/Y" */)
|
|||
|
||||
// Parse a formatted date.
|
||||
Nibbler n (input);
|
||||
#ifdef NIBBLER_FEATURE_DATE
|
||||
if (n.getDate (format, _t) && n.depleted ())
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Parse an ISO date.
|
||||
if (n.getDateISO (_t) && n.depleted ())
|
||||
|
@ -582,6 +585,12 @@ int Date::month () const
|
|||
return t->tm_mon + 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::week () const
|
||||
{
|
||||
return Date::weekOfYear (Date::dayOfWeek (context.config.get ("weekstart")));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Date::day () const
|
||||
{
|
||||
|
@ -676,6 +685,16 @@ bool Date::sameDay (const Date& rhs) const
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::sameWeek (const Date& rhs) const
|
||||
{
|
||||
if (this->year () == rhs.year () &&
|
||||
this->week () == rhs.week ())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Date::sameMonth (const Date& rhs) const
|
||||
{
|
||||
|
@ -834,8 +853,7 @@ bool Date::isRelativeDate (const std::string& input)
|
|||
found == "eoww" ||
|
||||
found == "eocw" ||
|
||||
found == "sow" ||
|
||||
found == "soww" ||
|
||||
found == "socw")
|
||||
found == "soww")
|
||||
{
|
||||
if (found == "eow" || found == "eoww")
|
||||
dow = 5;
|
||||
|
@ -846,9 +864,6 @@ bool Date::isRelativeDate (const std::string& input)
|
|||
if (found == "sow" || found == "soww")
|
||||
dow = 1;
|
||||
|
||||
if (found == "socw")
|
||||
dow = Date::dayOfWeek (context.config.get ("weekstart"));
|
||||
|
||||
if (today.dayOfWeek () >= dow)
|
||||
today += (dow - today.dayOfWeek () + 7) * 86400;
|
||||
else
|
||||
|
@ -861,6 +876,28 @@ bool Date::isRelativeDate (const std::string& input)
|
|||
_t = then._t;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if (found == "socw")
|
||||
{
|
||||
// day S M T W T F S
|
||||
// dow 0 1 2 3 4 5 6
|
||||
// -----------------------
|
||||
// weekstart ^
|
||||
// today1 ^
|
||||
// today2 ^
|
||||
//
|
||||
// delta1 = 6 <-- (0 - 1 + 7) % 7
|
||||
// delta2 = 3 <-- (4 - 1 + 7) % 7
|
||||
|
||||
dow = Date::dayOfWeek (context.config.get ("weekstart"));
|
||||
int delta = (today.dayOfWeek () - dow + 7) % 7;
|
||||
today -= delta * 86400;
|
||||
|
||||
Date then (today.month (), today.day (), today.year ());
|
||||
_t = then._t;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if (found == "today")
|
||||
{
|
||||
Date then (today.month (),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -29,9 +29,9 @@
|
|||
#define INCLUDED_DATE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
||||
class Date;
|
||||
|
||||
class Date
|
||||
|
@ -76,6 +76,7 @@ public:
|
|||
static int length (const std::string&);
|
||||
|
||||
int month () const;
|
||||
int week () const;
|
||||
int day () const;
|
||||
int year () const;
|
||||
int weekOfYear (int) const;
|
||||
|
@ -93,6 +94,7 @@ public:
|
|||
bool operator>= (const Date&) const;
|
||||
bool sameHour (const Date&) const;
|
||||
bool sameDay (const Date&) const;
|
||||
bool sameWeek (const Date&) const;
|
||||
bool sameMonth (const Date&) const;
|
||||
bool sameYear (const Date&) const;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -33,7 +34,6 @@
|
|||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <Directory.h>
|
||||
#include <cmake.h>
|
||||
|
||||
#ifdef SOLARIS
|
||||
#include <limits.h>
|
||||
|
@ -85,19 +85,19 @@ Directory& Directory::operator= (const Directory& other)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Directory::create ()
|
||||
bool Directory::create (int mode /* = 0755 */)
|
||||
{
|
||||
return mkdir (_data.c_str (), 0755) == 0 ? true : false;
|
||||
return mkdir (_data.c_str (), mode) == 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Directory::remove ()
|
||||
bool Directory::remove () const
|
||||
{
|
||||
return remove_directory (_data);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Directory::remove_directory (const std::string& dir)
|
||||
bool Directory::remove_directory (const std::string& dir) const
|
||||
{
|
||||
DIR* dp = opendir (dir.c_str ());
|
||||
if (dp != NULL)
|
||||
|
@ -191,6 +191,12 @@ bool Directory::up ()
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Directory::cd () const
|
||||
{
|
||||
return chdir (_data.c_str ()) == 0 ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Directory::list (
|
||||
const std::string& base,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -42,18 +42,19 @@ public:
|
|||
|
||||
Directory& operator= (const Directory&);
|
||||
|
||||
virtual bool create ();
|
||||
virtual bool remove ();
|
||||
virtual bool create (int mode = 0755);
|
||||
virtual bool remove () const;
|
||||
|
||||
std::vector <std::string> list ();
|
||||
std::vector <std::string> listRecursive ();
|
||||
|
||||
static std::string cwd ();
|
||||
bool up ();
|
||||
bool cd () const;
|
||||
|
||||
private:
|
||||
void list (const std::string&, std::vector <std::string>&, bool);
|
||||
bool remove_directory (const std::string&);
|
||||
bool remove_directory (const std::string&) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,8 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Date.h>
|
||||
|
@ -183,7 +185,10 @@ void E9::eval (const Task& task, std::vector <Arg>& value_stack)
|
|||
{
|
||||
OldDuration dur (operand._raw);
|
||||
Date now;
|
||||
now += (int)(time_t) dur;
|
||||
if (dur.negative ())
|
||||
now -= (int)(time_t) dur;
|
||||
else
|
||||
now += (int)(time_t) dur;
|
||||
operand._value = now.toEpochString ();
|
||||
}
|
||||
else
|
||||
|
|
2
src/E9.h
2
src/E9.h
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
44
src/File.cpp
44
src/File.cpp
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,8 +25,10 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <fstream>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/file.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
|
@ -89,10 +91,11 @@ File& File::operator= (const File& other)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool File::create ()
|
||||
bool File::create (int mode /* = 0640 */)
|
||||
{
|
||||
if (open ())
|
||||
{
|
||||
fchmod (_h, mode);
|
||||
close ();
|
||||
return true;
|
||||
}
|
||||
|
@ -101,7 +104,7 @@ bool File::create ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool File::remove ()
|
||||
bool File::remove () const
|
||||
{
|
||||
return unlink (_data.c_str ()) == 0 ? true : false;
|
||||
}
|
||||
|
@ -193,12 +196,13 @@ bool File::waitForLock ()
|
|||
void File::read (std::string& contents)
|
||||
{
|
||||
contents = "";
|
||||
contents.reserve (size ());
|
||||
|
||||
std::ifstream in (_data.c_str ());
|
||||
if (in.good ())
|
||||
{
|
||||
std::string line;
|
||||
line.reserve (1024);
|
||||
line.reserve (512 * 1024);
|
||||
while (getline (in, line))
|
||||
contents += line + "\n";
|
||||
|
||||
|
@ -216,7 +220,7 @@ void File::read (std::vector <std::string>& contents)
|
|||
if (in.good ())
|
||||
{
|
||||
std::string line;
|
||||
line.reserve (1024);
|
||||
line.reserve (512 * 1024);
|
||||
while (getline (in, line))
|
||||
contents.push_back (line);
|
||||
|
||||
|
@ -336,12 +340,38 @@ time_t File::mtime () const
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool File::create (const std::string& name)
|
||||
time_t File::ctime () const
|
||||
{
|
||||
std::ofstream out (expand (name).c_str ());
|
||||
struct stat s;
|
||||
if (!stat (_data.c_str (), &s))
|
||||
return s.st_ctime;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
time_t File::btime () const
|
||||
{
|
||||
struct stat s;
|
||||
if (!stat (_data.c_str (), &s))
|
||||
#ifdef HAVE_ST_BIRTHTIME
|
||||
return s.st_birthtime;
|
||||
#else
|
||||
return s.st_ctime;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool File::create (const std::string& name, int mode /* = 0640 */)
|
||||
{
|
||||
std::string full_name = expand (name);
|
||||
std::ofstream out (full_name.c_str ());
|
||||
if (out.good ())
|
||||
{
|
||||
out.close ();
|
||||
chmod (full_name.c_str (), mode);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
10
src/File.h
10
src/File.h
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -45,8 +45,8 @@ public:
|
|||
|
||||
File& operator= (const File&);
|
||||
|
||||
virtual bool create ();
|
||||
virtual bool remove ();
|
||||
virtual bool create (int mode = 0640);
|
||||
virtual bool remove () const;
|
||||
|
||||
bool open ();
|
||||
bool openAndLock ();
|
||||
|
@ -69,8 +69,10 @@ public:
|
|||
virtual mode_t mode ();
|
||||
virtual size_t size () const;
|
||||
virtual time_t mtime () const;
|
||||
virtual time_t ctime () const;
|
||||
virtual time_t btime () const;
|
||||
|
||||
static bool create (const std::string&);
|
||||
static bool create (const std::string&, int mode = 0640);
|
||||
static std::string read (const std::string&);
|
||||
static bool read (const std::string&, std::string&);
|
||||
static bool read (const std::string&, std::vector <std::string>&);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <Context.h>
|
||||
|
@ -105,25 +106,21 @@ void Hooks::initialize ()
|
|||
bool big_red_switch = context.config.getBoolean ("extensions");
|
||||
if (big_red_switch)
|
||||
{
|
||||
std::vector <std::string> vars;
|
||||
context.config.all (vars);
|
||||
|
||||
std::vector <std::string>::iterator it;
|
||||
for (it = vars.begin (); it != vars.end (); ++it)
|
||||
Config::const_iterator it;
|
||||
for (it = context.config.begin (); it != context.config.end (); ++it)
|
||||
{
|
||||
std::string type;
|
||||
std::string name;
|
||||
std::string value;
|
||||
|
||||
// "<type>.<name>"
|
||||
Nibbler n (*it);
|
||||
Nibbler n (it->first);
|
||||
if (n.getUntil ('.', type) &&
|
||||
type == "hook" &&
|
||||
n.skip ('.') &&
|
||||
n.getUntilEOS (name))
|
||||
{
|
||||
std::string value = context.config.get (*it);
|
||||
Nibbler n (value);
|
||||
Nibbler n (it->second);
|
||||
|
||||
// <path>:<function> [, ...]
|
||||
while (!n.depleted ())
|
||||
|
@ -141,7 +138,7 @@ void Hooks::initialize ()
|
|||
(void) n.skip (',');
|
||||
}
|
||||
else
|
||||
; // Was: throw std::string (format ("Malformed hook definition '{1}'.", *it));
|
||||
; // Was: throw std::string (format ("Malformed hook definition '{1}'.", it->first));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// taskwarrior - a command line task list manager.
|
||||
//
|
||||
// Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cmake.h>
|
||||
|
||||
// Hook class representing a single hook, which is just a three-way map.
|
||||
class Hook
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue