diff --git a/doc/man/.gitignore b/doc/man/.gitignore index a01a8f5f0..19f35585f 100644 --- a/doc/man/.gitignore +++ b/doc/man/.gitignore @@ -4,3 +4,4 @@ task-sync.5 task-tutorial.5 task.1 taskrc.5 +tasksh.1 diff --git a/doc/man/tasksh.1 b/doc/man/tasksh.1 deleted file mode 100644 index 5eab9712c..000000000 --- a/doc/man/tasksh.1 +++ /dev/null @@ -1,185 +0,0 @@ -.TH tasksh 1 2013-03-09 "task 2.3.0" "User Manuals" - -.SH NAME -tasksh \- Interactive taskwarrior shell - -.SH SYNOPSIS -.B tasksh [] -.br -.B tasksh --version -.br -.B tasksh --help - -.SH DESCRIPTION -The tasksh program can be used to create a more immersive task environment. -Any task command you run outside the shell can also be run inside the shell, -without the need to prefix every command with "task". - -.br -Moreover, task commands can be written in a file which can be passed or -redirected to tasksh for batch execution. - -.RS -$ tasksh -.br -.B task 2.3.0 -shell -.br - -.br -Enter any task command (such as 'list'), or hit 'Enter'. -.br -There is no need to include the 'task' command itself. -.br -Enter 'quit' to end the session. -.br - -.br -task> projects -.br - -.br -Project Tasks Pri:None Pri:L Pri:M Pri:H -.br -------- ----- -------- ----- ----- ----- -.br - 7 7 0 0 0 -.br -home 2 2 0 0 0 -.br -party 6 3 0 0 3 -.br - -.br -3 projects (15 tasks) -.br -task> tags -.br - -.br -Tag Count -.br -mall 2 -.br - -.br -1 tag (15 tasks) -.br -task> list -.br - -.br -ID Project Pri Due Active Age Description -.br ---------------------------------------------------------------------- -.br - 2 party H 10/17/2010 2 hrs Select and book a venue -.br - 5 party H 10/22/2010 2 hrs Design invitations -.br - 9 home 10/31/2010 1 hr Pay rent -.br - 3 party 2 hrs Mail invitations -.br - 4 party 2 hrs Select a caterer -.br - 6 party 2 hrs Print invitations -.br - -.br - 8 tasks -.br - task> quit -.br - $ -.br - $ cat task.commands -.br - add foo -.br - add bar -.br - $ tasksh task.commands -.br - task 2.3.0 shell -.br - -.br - Enter any task command (such as 'list'), or hit 'Enter'. -.br - There is no need to include the 'task' command itself. -.br - Enter 'quit' to end the session. -.br - -.br - task> add foo -.br - Created task 8. -.br - task> add bar -.br - Created task 9. -.br - $ -.br - $ cat task.commands | tasksh -.br - task 2.3.0 shell -.br - -.br - Enter any task command (such as 'list'), or hit 'Enter'. -.br - There is no need to include the 'task' command itself. -.br - Enter 'quit' to end the session. -.br - -.br - task> add foo -.br - Created task 8. -.br - task> add bar -.br - Created task 9. -.br - -.RE - -.SH "CREDITS & COPYRIGHTS" -Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez. - -This man page was originally written by Federico Hernandez. - -Taskwarrior is distributed under the MIT license. See -http://www.opensource.org/licenses/mit-license.php for more information. - -.SH SEE ALSO -.BR task(1), -.BR task-tutorial(5), -.BR taskrc(5), -.BR task-faq(5), -.BR task-color(5), -.BR task-sync(5) - -For more information regarding taskwarrior, see the following: - -.TP -The official site at - - -.TP -The official code repository at - - -.TP -You can contact the project by emailing - - -.SH REPORTING BUGS -.TP -Bugs in taskwarrior may be reported to the issue-tracker at - - diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt index fc763f122..61f1e36b8 100644 --- a/src/commands/CMakeLists.txt +++ b/src/commands/CMakeLists.txt @@ -11,6 +11,7 @@ set (commands_SRCS Command.cpp Command.h CmdAnnotate.cpp CmdAnnotate.h CmdAppend.cpp CmdAppend.h CmdBurndown.cpp CmdBurndown.h + CmdCalc.cpp CmdCalc.h CmdCalendar.cpp CmdCalendar.h CmdCommands.cpp CmdCommands.h CmdColor.cpp CmdColor.h diff --git a/src/commands/CmdCalc.cpp b/src/commands/CmdCalc.cpp new file mode 100644 index 000000000..dac64dd4d --- /dev/null +++ b/src/commands/CmdCalc.cpp @@ -0,0 +1,54 @@ +//////////////////////////////////////////////////////////////////////////////// +// 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 +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +extern Context context; + +//////////////////////////////////////////////////////////////////////////////// +CmdCalc::CmdCalc () +{ + _keyword = "calc"; + _usage = "task calc "; + _description = STRING_CMD_CALC_USAGE; + _read_only = true; + _displays_id = false; +} + +//////////////////////////////////////////////////////////////////////////////// +int CmdCalc::execute (std::string& output) +{ + int rc = 0; + + + return rc; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdCalc.h b/src/commands/CmdCalc.h new file mode 100644 index 000000000..9f62ba100 --- /dev/null +++ b/src/commands/CmdCalc.h @@ -0,0 +1,42 @@ +//////////////////////////////////////////////////////////////////////////////// +// 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 +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_CMDCALC +#define INCLUDED_CMDCALC + +#include +#include + +class CmdCalc : public Command +{ +public: + CmdCalc (); + int execute (std::string&); +}; + +#endif +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 2dfc97178..4e0a5e5db 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -106,6 +107,7 @@ void Command::factory (std::map & all) c = new CmdBurndownDaily (); all[c->keyword ()] = c; c = new CmdBurndownMonthly (); all[c->keyword ()] = c; c = new CmdBurndownWeekly (); all[c->keyword ()] = c; + c = new CmdCalc (); all[c->keyword ()] = c; c = new CmdCalendar (); all[c->keyword ()] = c; c = new CmdColor (); all[c->keyword ()] = c; c = new CmdColumns (); all[c->keyword ()] = c; diff --git a/src/en-US.h b/src/en-US.h index f19199c2e..177e5a3eb 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -526,6 +526,7 @@ #define STRING_CMD_CAL_LABEL_HOL "Holiday" #define STRING_CMD_CAL_SUN_MON "The 'weekstart' configuration variable may only contain 'Sunday' or 'Monday'." #define STRING_CMD_EDIT_USAGE "Launches an editor to modify a task directly" +#define STRING_CMD_CALC_USAGE "Calculator" // Config #define STRING_CONFIG_OVERNEST "Configuration file nested to more than 10 levels deep - this has to be a mistake." diff --git a/src/es-ES.h b/src/es-ES.h index 20e6f40df..a3b7c6382 100644 --- a/src/es-ES.h +++ b/src/es-ES.h @@ -526,6 +526,7 @@ #define STRING_CMD_CAL_LABEL_HOL "Festivo" #define STRING_CMD_CAL_SUN_MON "La variable de configuración 'weekstart' solamente puede contener 'domingo' o 'lunes'." #define STRING_CMD_EDIT_USAGE "Lanza un editor para modificar una tarea directamente" +#define STRING_CMD_CALC_USAGE "Calculator" // Config #define STRING_CONFIG_OVERNEST "Archivo de configuración anidado hasta más de 10 niveles de profundidad - esto tiene que ser un error." diff --git a/src/fr-FR.h b/src/fr-FR.h index fa7b6e42f..6a20ba1fa 100644 --- a/src/fr-FR.h +++ b/src/fr-FR.h @@ -526,6 +526,7 @@ #define STRING_CMD_CAL_LABEL_HOL "Holiday" #define STRING_CMD_CAL_SUN_MON "The 'weekstart' configuration variable may only contain 'Sunday' or 'Monday'." #define STRING_CMD_EDIT_USAGE "Launches an editor to modify a task directly" +#define STRING_CMD_CALC_USAGE "Calculator" // Config #define STRING_CONFIG_OVERNEST "Configuration file nested to more than 10 levels deep - this has to be a mistake."