Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6673e408a2 | ||
|
|
422ad576ea | ||
|
|
c1a1d13aab | ||
|
|
42189ce998 | ||
|
|
43287d7fc9 | ||
|
|
06f6aaaded | ||
|
|
0c17986303 | ||
|
|
feb9959907 | ||
|
|
7409e23ce0 | ||
|
|
4572c97c9d | ||
|
|
9bca303113 | ||
|
|
7fb3ab0c3d | ||
|
|
56037fe3bc | ||
|
|
a2f8ce41cf | ||
|
|
598bd3b4ef | ||
|
|
315a7d69fb | ||
|
|
64fff6c2ff | ||
|
|
969ecd7b5d | ||
|
|
cede865693 | ||
|
|
d68395bc51 | ||
|
|
7ec523d5ea | ||
|
|
08fc906d5f | ||
|
|
f3e995ef92 | ||
|
|
a4304c97af | ||
|
|
d1ef0d17d5 | ||
|
|
c54cb4d6c8 |
8
AUTHORS
8
AUTHORS
@@ -1,10 +1,14 @@
|
|||||||
Principal Author:
|
Principal Author:
|
||||||
Paul Beckingham, paul@beckingham.net
|
Paul Beckingham, paul@beckingham.net
|
||||||
|
|
||||||
|
Contributing Authors:
|
||||||
|
Damian Glenny
|
||||||
|
|
||||||
With thanks to:
|
With thanks to:
|
||||||
Eugene Kramer
|
Eugene Kramer
|
||||||
SK
|
Srijith K
|
||||||
Damian Glenny
|
|
||||||
Richard Querin
|
Richard Querin
|
||||||
Bruce Israel
|
Bruce Israel
|
||||||
|
Thomas Engel
|
||||||
|
Nishiishii
|
||||||
|
|
||||||
|
|||||||
24
ChangeLog
24
ChangeLog
@@ -7,10 +7,32 @@ represents a feature release, and the z represents a patch.
|
|||||||
|
|
||||||
------ plans -------------------------------------
|
------ plans -------------------------------------
|
||||||
|
|
||||||
Configurable columns in reports
|
- Configurable columns in reports
|
||||||
|
- Dependencies
|
||||||
|
|
||||||
|
1.4.0 (?)
|
||||||
|
+ Bug: "showage" configuration variable should apply to all reprts, not
|
||||||
|
just the ones based on "list"
|
||||||
|
+ New configuration variable, "defaultwidth" that determines the width
|
||||||
|
of tables when ncurses support is not available
|
||||||
|
|
||||||
------ reality -----------------------------------
|
------ reality -----------------------------------
|
||||||
|
|
||||||
|
1.3.0 (6/18/2008)
|
||||||
|
+ "task calendar" now displays multiple months per line, adjustable by the
|
||||||
|
"monthsperline" configuration variable. Feature added by Damian Glenny
|
||||||
|
+ "task export" can now filter tasks like the reports
|
||||||
|
+ Factored out code to filter tasks
|
||||||
|
+ Displays shorter message when a command is entered incorrectly, and the
|
||||||
|
full usage for "task help"
|
||||||
|
+ "task oldest" shows the oldest tasks
|
||||||
|
+ "task newest" shows the newest tasks
|
||||||
|
+ Bug: Segmentation fault when no "dateformat" configuration variable
|
||||||
|
specified
|
||||||
|
+ Bug: Fixed bug whereby if you have more than one task with a due date, 7
|
||||||
|
days gets added to the entry date of task 2..n
|
||||||
|
+ Bug: Fixed bug whereby "1 wks" was being improperly pluralized
|
||||||
|
|
||||||
1.2.0 (6/13/2008)
|
1.2.0 (6/13/2008)
|
||||||
+ Bug: "dateformat" configuration variable used to display dates, but
|
+ Bug: "dateformat" configuration variable used to display dates, but
|
||||||
not parse them
|
not parse them
|
||||||
|
|||||||
2
NEWS
2
NEWS
@@ -1,4 +1,4 @@
|
|||||||
Welcome to Task 1.2.0.
|
Welcome to Task 1.4.0.
|
||||||
|
|
||||||
Task has been built and tested on the following configurations:
|
Task has been built and tested on the following configurations:
|
||||||
|
|
||||||
|
|||||||
41
TUTORIAL
41
TUTORIAL
@@ -1,4 +1,4 @@
|
|||||||
Task program tutorial, for version 1.2.0
|
Task program tutorial, for version 1.4.0
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
This guide shows how to quickly set up the task program, and become proficient
|
This guide shows how to quickly set up the task program, and become proficient
|
||||||
@@ -21,10 +21,10 @@ Build the task program according to the directions in the INSTALL file. This
|
|||||||
transcript illustrates a typical installation:
|
transcript illustrates a typical installation:
|
||||||
|
|
||||||
% ls
|
% ls
|
||||||
task-1.2.0.tar.gz
|
task-1.4.0.tar.gz
|
||||||
% gunzip task-1.2.0.tar.gz
|
% gunzip task-1.4.0.tar.gz
|
||||||
% tar xf task-1.2.0.tar
|
% tar xf task-1.4.0.tar
|
||||||
% cd task-1.2.0
|
% cd task-1.4.0
|
||||||
% ./configure
|
% ./configure
|
||||||
...
|
...
|
||||||
% make
|
% make
|
||||||
@@ -379,6 +379,22 @@ with no arguments will generate a help message that lists all these commands.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% task oldest
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Lists the oldest tasks. Shows 10 tasks by default, but can be set via the
|
||||||
|
"oldest" configuration variable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% task newest
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Lists the newest tasks. Shows 10 tasks by default, but can be set via the
|
||||||
|
"newest" configuration variable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% task history
|
% task history
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
@@ -678,7 +694,8 @@ Configuring Task
|
|||||||
Y four-digit year 2008
|
Y four-digit year 2008
|
||||||
|
|
||||||
The string may also contain other characters to act as
|
The string may also contain other characters to act as
|
||||||
spacers, or formatting. Other values could include:
|
spacers, or formatting. Other values could include
|
||||||
|
(but are not limited to):
|
||||||
|
|
||||||
d/m/Y 7/6/2008
|
d/m/Y 7/6/2008
|
||||||
YMD 20080607
|
YMD 20080607
|
||||||
@@ -687,6 +704,18 @@ Configuring Task
|
|||||||
showage May be "yes" or "no". Determines whether the "Age"
|
showage May be "yes" or "no". Determines whether the "Age"
|
||||||
column appears on the "list" and "next" reports.
|
column appears on the "list" and "next" reports.
|
||||||
|
|
||||||
|
monthsperline Determines how many months the "task calendar" command
|
||||||
|
renders across the screen. Defaults to 1.
|
||||||
|
|
||||||
|
oldest Determines how many tasks are shown on the "oldest"
|
||||||
|
report. Defaults to 10.
|
||||||
|
|
||||||
|
newest Determines how many tasks are shown on the "newest"
|
||||||
|
report. Defaults to 10.
|
||||||
|
|
||||||
|
defaultwidth The width of tables used when ncurses support is not
|
||||||
|
available. Defaults to 80.
|
||||||
|
|
||||||
color May be "on" or "off". Determines whether task uses
|
color May be "on" or "off". Determines whether task uses
|
||||||
color.
|
color.
|
||||||
|
|
||||||
|
|||||||
12
adsense.html
12
adsense.html
@@ -1,12 +0,0 @@
|
|||||||
<script type="text/javascript"><!--
|
|
||||||
google_ad_client = "pub-9709799404235424";
|
|
||||||
/* Task Main */
|
|
||||||
google_ad_slot = "8660617875";
|
|
||||||
google_ad_width = 120;
|
|
||||||
google_ad_height = 600;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript"
|
|
||||||
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
AC_INIT(task, 1.2.0, bugs@beckingham.net)
|
AC_INIT(task, 1.4.0, bugs@beckingham.net)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AC_CONFIG_SRCDIR([src/task.cpp])
|
AC_CONFIG_SRCDIR([src/task.cpp])
|
||||||
AC_CONFIG_HEADER([auto.h])
|
AC_CONFIG_HEADER([auto.h])
|
||||||
|
|||||||
68
grammar.txt
Normal file
68
grammar.txt
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
This is a full BNF grammar for the task command line. It is intended that a
|
||||||
|
future release of task will incorporate a complete lexer/parser implementing
|
||||||
|
this grammar.
|
||||||
|
|
||||||
|
|
||||||
|
command:
|
||||||
|
VERSION
|
||||||
|
| HELP
|
||||||
|
| PROJECTS
|
||||||
|
| TAGS
|
||||||
|
| SUMMARY
|
||||||
|
| HISTORY
|
||||||
|
| NEXT
|
||||||
|
| CALENDAR
|
||||||
|
| ACTIVE
|
||||||
|
| OVERDUE
|
||||||
|
| STATS
|
||||||
|
| USAGE
|
||||||
|
| OLDEST
|
||||||
|
| NEWEST
|
||||||
|
| EXPORT <file>
|
||||||
|
| COLOR
|
||||||
|
| DELETE <id>
|
||||||
|
| INFO <id>
|
||||||
|
| START <id>
|
||||||
|
| DONE <id>
|
||||||
|
| ADD [<tags>] [<attrs>] [<desc>]
|
||||||
|
| LIST [<tags>] [<attrs>] [<desc>]
|
||||||
|
| LONG [<tags>] [<attrs>] [<desc>]
|
||||||
|
| LS [<tags>] [<attrs>] [<desc>]
|
||||||
|
| COMPLETED [<tags>] [<attrs>] [<desc>]
|
||||||
|
| <id> [<tags>] [<attrs>] [<desc>]
|
||||||
|
| <id> <substitution>
|
||||||
|
|
||||||
|
id:
|
||||||
|
\d+
|
||||||
|
| \d{8}-\d{4}-\d{4}-\d{12}
|
||||||
|
|
||||||
|
tags:
|
||||||
|
+<tag>
|
||||||
|
| -<tag>
|
||||||
|
|
||||||
|
tag:
|
||||||
|
\w+
|
||||||
|
|
||||||
|
attrs:
|
||||||
|
<attr>
|
||||||
|
| <attr> <attrs>
|
||||||
|
|
||||||
|
attr:
|
||||||
|
<name>:<value>
|
||||||
|
|
||||||
|
name:
|
||||||
|
\w+
|
||||||
|
|
||||||
|
value:
|
||||||
|
.+
|
||||||
|
|
||||||
|
substitution:
|
||||||
|
/ <pattern> / <pattern> /
|
||||||
|
|
||||||
|
pattern:
|
||||||
|
.+
|
||||||
|
|
||||||
|
file:
|
||||||
|
?
|
||||||
|
|
||||||
17
ideas.txt
Normal file
17
ideas.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Real Parsing
|
||||||
|
define grammar for command line
|
||||||
|
implement flex/bison parser
|
||||||
|
|
||||||
|
User-Defined Reports
|
||||||
|
report.xxx=id,project(2+),priority(1-),description
|
||||||
|
change all list-based reports to user-defined
|
||||||
|
|
||||||
|
Generalized Report Writer
|
||||||
|
provide column list, sort order, filter
|
||||||
|
|
||||||
|
Test Suite
|
||||||
|
allow .taskrc override
|
||||||
|
debug=on to cause all cout to be csv
|
||||||
|
regression tests for every bug, command, feature
|
||||||
|
|
||||||
|
|
||||||
@@ -116,6 +116,9 @@ void Config::createDefault (const std::string& file)
|
|||||||
fprintf (out, "confirmation=yes\n");
|
fprintf (out, "confirmation=yes\n");
|
||||||
fprintf (out, "#nag=Note: try to stick to high priority tasks. See \"task next\".\n");
|
fprintf (out, "#nag=Note: try to stick to high priority tasks. See \"task next\".\n");
|
||||||
fprintf (out, "next=2\n");
|
fprintf (out, "next=2\n");
|
||||||
|
fprintf (out, "dateformat=m/d/Y\n");
|
||||||
|
fprintf (out, "showage=yes\n");
|
||||||
|
fprintf (out, "monthsperline=1\n");
|
||||||
fprintf (out, "curses=on\n");
|
fprintf (out, "curses=on\n");
|
||||||
fprintf (out, "color=on\n");
|
fprintf (out, "color=on\n");
|
||||||
|
|
||||||
@@ -137,6 +140,9 @@ void Config::createDefault (const std::string& file)
|
|||||||
set ("command.logging", "off");
|
set ("command.logging", "off");
|
||||||
set ("confirmation", "yes");
|
set ("confirmation", "yes");
|
||||||
set ("next", 1);
|
set ("next", 1);
|
||||||
|
set ("dateformat", "m/d/Y");
|
||||||
|
set ("showage", "yes");
|
||||||
|
set ("monthsperline", 3);
|
||||||
set ("curses", "on");
|
set ("curses", "on");
|
||||||
set ("color", "on");
|
set ("color", "on");
|
||||||
set ("color.overdue", "red");
|
set ("color.overdue", "red");
|
||||||
@@ -246,29 +252,6 @@ void Config::set (const std::string& key, const std::string& value)
|
|||||||
(*this)[key] = value;
|
(*this)[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// The vector form of Config::get assumes the single value is comma-separated,
|
|
||||||
// and splits accordingly.
|
|
||||||
void Config::get (
|
|
||||||
const std::string& key,
|
|
||||||
std::vector <std::string>& values)
|
|
||||||
{
|
|
||||||
values.clear ();
|
|
||||||
split (values, (*this)[key], ',');
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// The vector form of Config::set joins the values together with commas, and
|
|
||||||
// stores the single value.
|
|
||||||
void Config::set (
|
|
||||||
const std::string& key,
|
|
||||||
const std::vector <std::string>& values)
|
|
||||||
{
|
|
||||||
std::string conjoined;
|
|
||||||
join (conjoined, ",", values);
|
|
||||||
(*this)[key] = conjoined;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Provide a vector of all configuration keys.
|
// Provide a vector of all configuration keys.
|
||||||
void Config::all (std::vector<std::string>& items)
|
void Config::all (std::vector<std::string>& items)
|
||||||
|
|||||||
@@ -47,11 +47,9 @@ public:
|
|||||||
bool get (const std::string&, bool);
|
bool get (const std::string&, bool);
|
||||||
int get (const std::string&, const int);
|
int get (const std::string&, const int);
|
||||||
double get (const std::string&, const double);
|
double get (const std::string&, const double);
|
||||||
void get (const std::string&, std::vector <std::string>&);
|
|
||||||
void set (const std::string&, const int);
|
void set (const std::string&, const int);
|
||||||
void set (const std::string&, const double);
|
void set (const std::string&, const double);
|
||||||
void set (const std::string&, const std::string&);
|
void set (const std::string&, const std::string&);
|
||||||
void set (const std::string&, const std::vector <std::string>&);
|
|
||||||
void all (std::vector <std::string>&);
|
void all (std::vector <std::string>&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
74
src/Date.cpp
74
src/Date.cpp
@@ -57,7 +57,7 @@ Date::Date (const int m, const int d, const int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Date::Date (const std::string& mdy, const std::string format /* = "m/d/Y" */)
|
Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
||||||
{
|
{
|
||||||
int month = 0;
|
int month = 0;
|
||||||
int day = 0;
|
int day = 0;
|
||||||
@@ -221,65 +221,29 @@ void Date::toMDY (int& m, int& d, int& y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::string Date::toString (const std::string& format /*= "m/d/Y"*/)
|
const std::string Date::toString (const std::string& format /*= "m/d/Y" */) const
|
||||||
{
|
{
|
||||||
|
// Making this local copy seems to fix a bug. Remove the local copy and you'll
|
||||||
|
// see segmentation faults and all kinds of gibberish.
|
||||||
|
std::string localFormat = format;
|
||||||
|
|
||||||
|
char buffer[12];
|
||||||
std::string formatted;
|
std::string formatted;
|
||||||
for (unsigned int i = 0; i < format.length (); ++i)
|
for (unsigned int i = 0; i < localFormat.length (); ++i)
|
||||||
{
|
{
|
||||||
switch (format[i])
|
char c = localFormat[i];
|
||||||
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'm':
|
case 'm': sprintf (buffer, "%d", this->month ()); break;
|
||||||
{
|
case 'M': sprintf (buffer, "%02d", this->month ()); break;
|
||||||
char m[3];
|
case 'd': sprintf (buffer, "%d", this->day ()); break;
|
||||||
sprintf (m, "%d", this->month ());
|
case 'D': sprintf (buffer, "%02d", this->day ()); break;
|
||||||
formatted += m;
|
case 'y': sprintf (buffer, "%02d", this->year () % 100); break;
|
||||||
}
|
case 'Y': sprintf (buffer, "%d", this->year ()); break;
|
||||||
break;
|
default: sprintf (buffer, "%c", c); break;
|
||||||
|
|
||||||
case 'M':
|
|
||||||
{
|
|
||||||
char m[3];
|
|
||||||
sprintf (m, "%02d", this->month ());
|
|
||||||
formatted += m;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'd':
|
|
||||||
{
|
|
||||||
char d[3];
|
|
||||||
sprintf (d, "%d", this->day ());
|
|
||||||
formatted += d;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'D':
|
|
||||||
{
|
|
||||||
char d[3];
|
|
||||||
sprintf (d, "%02d", this->day ());
|
|
||||||
formatted += d;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'y':
|
|
||||||
{
|
|
||||||
char y[3];
|
|
||||||
sprintf (y, "%02d", this->year () % 100);
|
|
||||||
formatted += y;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'Y':
|
|
||||||
{
|
|
||||||
char y[5];
|
|
||||||
sprintf (y, "%d", this->year ());
|
|
||||||
formatted += y;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
formatted += format[i];
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatted += buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
return formatted;
|
return formatted;
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ public:
|
|||||||
Date ();
|
Date ();
|
||||||
Date (time_t);
|
Date (time_t);
|
||||||
Date (const int, const int, const int);
|
Date (const int, const int, const int);
|
||||||
Date (const std::string&, const std::string format = "m/d/Y");
|
Date (const std::string&, const std::string& format = "m/d/Y");
|
||||||
Date (const Date&);
|
Date (const Date&);
|
||||||
virtual ~Date ();
|
virtual ~Date ();
|
||||||
|
|
||||||
void toEpoch (time_t&);
|
void toEpoch (time_t&);
|
||||||
time_t toEpoch ();
|
time_t toEpoch ();
|
||||||
void toMDY (int&, int&, int&);
|
void toMDY (int&, int&, int&);
|
||||||
std::string toString (const std::string& format = "m/d/Y");
|
const std::string toString (const std::string& format = "m/d/Y") const;
|
||||||
static bool valid (const int, const int, const int);
|
static bool valid (const int, const int, const int);
|
||||||
|
|
||||||
static bool leapYear (int);
|
static bool leapYear (int);
|
||||||
|
|||||||
@@ -120,12 +120,15 @@ static const char* commands[] =
|
|||||||
"delete",
|
"delete",
|
||||||
"done",
|
"done",
|
||||||
"export",
|
"export",
|
||||||
|
"help",
|
||||||
"history",
|
"history",
|
||||||
"info",
|
"info",
|
||||||
"list",
|
"list",
|
||||||
"long",
|
"long",
|
||||||
"ls",
|
"ls",
|
||||||
|
"newest",
|
||||||
"next",
|
"next",
|
||||||
|
"oldest",
|
||||||
"overdue",
|
"overdue",
|
||||||
"projects",
|
"projects",
|
||||||
"start",
|
"start",
|
||||||
|
|||||||
1325
src/task.cpp
1325
src/task.cpp
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,10 @@
|
|||||||
#include "T.h"
|
#include "T.h"
|
||||||
#include "../auto.h"
|
#include "../auto.h"
|
||||||
|
|
||||||
|
#ifndef min
|
||||||
|
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef max
|
#ifndef max
|
||||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
@@ -69,6 +73,8 @@ void handleReportCalendar (const TDB&, T&, Config&);
|
|||||||
void handleReportActive (const TDB&, T&, Config&);
|
void handleReportActive (const TDB&, T&, Config&);
|
||||||
void handleReportOverdue (const TDB&, T&, Config&);
|
void handleReportOverdue (const TDB&, T&, Config&);
|
||||||
void handleReportStats (const TDB&, T&, Config&);
|
void handleReportStats (const TDB&, T&, Config&);
|
||||||
|
void handleReportOldest (const TDB&, T&, Config&);
|
||||||
|
void handleReportNewest (const TDB&, T&, Config&);
|
||||||
void handleVersion (Config&);
|
void handleVersion (Config&);
|
||||||
void handleExport (const TDB&, T&, Config&);
|
void handleExport (const TDB&, T&, Config&);
|
||||||
void handleDelete (const TDB&, T&, Config&);
|
void handleDelete (const TDB&, T&, Config&);
|
||||||
|
|||||||
24
src/util.cpp
24
src/util.cpp
@@ -80,19 +80,19 @@ void formatTimeDeltaDays (std::string& output, time_t delta)
|
|||||||
if (days > 365)
|
if (days > 365)
|
||||||
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
||||||
else if (days > 84)
|
else if (days > 84)
|
||||||
sprintf (formatted, "%1d mths", (int) (days / 30.6));
|
sprintf (formatted, "%1d mth%s", (int) (days / 30.6), ((int) (days / 30.6) == 1 ? "" : "s"));
|
||||||
else if (days > 13)
|
else if (days > 13)
|
||||||
sprintf (formatted, "%d wks", (int) (days / 7.0));
|
sprintf (formatted, "%d wk%s", (int) (days / 7.0), ((int) (days / 7.0) == 1 ? "" : "s"));
|
||||||
else if (days > 5.0)
|
else if (days > 5.0)
|
||||||
sprintf (formatted, "%d days", (int) days);
|
sprintf (formatted, "%d day%s", (int) days, ((int) days == 1 ? "" : "s"));
|
||||||
else if (days > 1.0)
|
else if (days > 1.0)
|
||||||
sprintf (formatted, "%.1f days", days);
|
sprintf (formatted, "%.1f days", days);
|
||||||
else if (days * 24 > 1.0)
|
else if (days * 24 > 1.0)
|
||||||
sprintf (formatted, "%d hrs", (int) (days * 24.0));
|
sprintf (formatted, "%d hr%s", (int) (days * 24.0), ((int) (days * 24.0) == 1 ? "" : "s"));
|
||||||
else if (days * 24 * 60 > 1)
|
else if (days * 24 * 60 > 1)
|
||||||
sprintf (formatted, "%d mins", (int) (days * 24 * 60));
|
sprintf (formatted, "%d min%s", (int) (days * 24 * 60), ((int) (days * 24 * 60) == 1 ? "" : "s"));
|
||||||
else if (days * 24 * 60 * 60 > 1)
|
else if (days * 24 * 60 * 60 > 1)
|
||||||
sprintf (formatted, "%d secs", (int) (days * 24 * 60 * 60));
|
sprintf (formatted, "%d sec%s", (int) (days * 24 * 60 * 60), ((int) (days * 24 * 60 * 60) == 1 ? "" : "s"));
|
||||||
else
|
else
|
||||||
strcpy (formatted, "-");
|
strcpy (formatted, "-");
|
||||||
|
|
||||||
@@ -108,19 +108,19 @@ std::string formatSeconds (time_t delta)
|
|||||||
if (days > 365)
|
if (days > 365)
|
||||||
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
||||||
else if (days > 84)
|
else if (days > 84)
|
||||||
sprintf (formatted, "%1d mths", (int) (days / 30.6));
|
sprintf (formatted, "%1d mth%s", (int) (days / 30.6), ((int) (days / 30.6) == 1 ? "" : "s"));
|
||||||
else if (days > 13)
|
else if (days > 13)
|
||||||
sprintf (formatted, "%d wks", (int) (days / 7.0));
|
sprintf (formatted, "%d wk%s", (int) (days / 7.0), ((int) (days / 7.0) == 1 ? "" : "s"));
|
||||||
else if (days > 5.0)
|
else if (days > 5.0)
|
||||||
sprintf (formatted, "%d days", (int) days);
|
sprintf (formatted, "%d day%s", (int) days, ((int) days == 1 ? "" : "s"));
|
||||||
else if (days > 1.0)
|
else if (days > 1.0)
|
||||||
sprintf (formatted, "%.1f days", days);
|
sprintf (formatted, "%.1f days", days);
|
||||||
else if (days * 24 > 1.0)
|
else if (days * 24 > 1.0)
|
||||||
sprintf (formatted, "%d hrs", (int) (days * 24.0));
|
sprintf (formatted, "%d hr%s", (int) (days * 24.0), ((int) (days * 24) == 1 ? "" : "s"));
|
||||||
else if (days * 24 * 60 > 1)
|
else if (days * 24 * 60 > 1)
|
||||||
sprintf (formatted, "%d mins", (int) (days * 24 * 60));
|
sprintf (formatted, "%d min%s", (int) (days * 24 * 60), ((int) (days * 24 * 60) == 1 ? "" : "s"));
|
||||||
else if (days * 24 * 60 * 60 > 1)
|
else if (days * 24 * 60 * 60 > 1)
|
||||||
sprintf (formatted, "%d secs", (int) (days * 24 * 60 * 60));
|
sprintf (formatted, "%d sec%s", (int) (days * 24 * 60 * 60), ((int) (days * 24 * 60 * 60) == 1 ? "" : "s"));
|
||||||
else
|
else
|
||||||
strcpy (formatted, "-");
|
strcpy (formatted, "-");
|
||||||
|
|
||||||
|
|||||||
116
task.html
116
task.html
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>Task 1.2.0</title>
|
<title>Task 1.4.0</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
@@ -74,7 +74,6 @@ body {
|
|||||||
#content h4 {
|
#content h4 {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin: 1.2em 0 0.3em;
|
margin: 1.2em 0 0.3em;
|
||||||
border-bottom: 1px dotted #bbb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#content h5 {
|
#content h5 {
|
||||||
@@ -166,14 +165,50 @@ a img { border: none; padding: 0; margin: 0; }
|
|||||||
<h2 class="title">Get the Source Code</h2>
|
<h2 class="title">Get the Source Code</h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
<p>
|
||||||
Download the latest task source code
|
Download the
|
||||||
<a href="http://www.beckingham.net/task-1.2.0.tar.gz">task-1.2.0.tar.gz</a>
|
<a href="http://www.beckingham.net/task-1.4.0.tar.gz">latest version</a>
|
||||||
(6/13/2008).
|
of the task source code (6/18/2008).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<h4>New in version 1.4.0</h4>
|
||||||
|
Source: <a href="http://www.beckingham.net/task-1.4.0.tar.gz">task-1.4.0.tar.gz</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Fixed bug where "showage" configuration variable was not being
|
||||||
|
oberved by the "task long" report
|
||||||
|
<li>New configuration variable "defaultwidth" determines the width
|
||||||
|
of windows in the absense of ncurses support
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<h4>New in version 1.3.0</h4>
|
||||||
|
Source: <a href="http://www.beckingham.net/task-1.3.0.tar.gz">task-1.3.0.tar.gz</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>"task calendar" now displays multiple months per line, adjustable
|
||||||
|
by the "monthsperline" configuration variable. Feature added by
|
||||||
|
Damian Glenny
|
||||||
|
<li>Displays shorter message when a command is entered incorrectly,
|
||||||
|
and the full usage for "task help"
|
||||||
|
<li>"task export" can now filter tasks like the reports
|
||||||
|
<li>"task oldest" shows the oldest tasks
|
||||||
|
<li>"task newest" shows the newest tasks
|
||||||
|
<li>Fixed bug where task generates a segmentation fault for several
|
||||||
|
commands, when no "dateformat" configuration variable was present
|
||||||
|
<li>Fixed bug whereby if you have more than one task with a due date,
|
||||||
|
7 days gets added to the entry date of task 2..n
|
||||||
|
<li>Fixed bug whereby "1 wks" was being improperly pluralized
|
||||||
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<h4>New in version 1.2.0</h4>
|
<h4>New in version 1.2.0</h4>
|
||||||
source: <a href="http://www.beckingham.net/task-1.2.0.tar.gz">task-1.2.0.tar.gz</a>
|
Source: <a href="http://www.beckingham.net/task-1.2.0.tar.gz">task-1.2.0.tar.gz</a>
|
||||||
|
<br />
|
||||||
|
Debian package: <a href="http://www.beckingham.net/task_1.2.0-1_i386.deb">task_1.2.0-1_i386.deb</a>
|
||||||
|
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@@ -190,10 +225,10 @@ a img { border: none; padding: 0; margin: 0; }
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<h4>New in version 1.1.0</h4>
|
<h4>New in version 1.1.0</h4>
|
||||||
source: <a href="http://www.beckingham.net/task-1.1.0.tar.gz">task-1.1.0.tar.gz</a>
|
Source: <a href="http://www.beckingham.net/task-1.1.0.tar.gz">task-1.1.0.tar.gz</a>
|
||||||
<br />
|
<br />
|
||||||
Debian package: <a href="http://www.beckingham.net/task_1.1.0-1_i386.deb">task_1.1.0-1_i386.deb</a>
|
Debian package: <a href="http://www.beckingham.net/task_1.1.0-1_i386.deb">task_1.1.0-1_i386.deb</a>
|
||||||
(Thanks to Richard Querin)
|
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@@ -235,6 +270,12 @@ a img { border: none; padding: 0; margin: 0; }
|
|||||||
This guide shows how to quickly set up the task program, and become
|
This guide shows how to quickly set up the task program, and become
|
||||||
proficient with it.
|
proficient with it.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Alternatively, watch the
|
||||||
|
<a href="http://www.youtube.com/watch?v=D2Kn4DMOVSw">task movie</a>
|
||||||
|
which illustrates many of task's features.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -246,10 +287,10 @@ a img { border: none; padding: 0; margin: 0; }
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre><code>% ls
|
<pre><code>% ls
|
||||||
task-1.2.0.tar.gz
|
task-1.3.0.tar.gz
|
||||||
% gunzip task-1.2.0.tar.gz
|
% gunzip task-1.3.0.tar.gz
|
||||||
% tar xf task-1.2.0.tar
|
% tar xf task-1.3.0.tar
|
||||||
% cd task-1.2.0
|
% cd task-1.3.0
|
||||||
% ./configure
|
% ./configure
|
||||||
...
|
...
|
||||||
% make
|
% make
|
||||||
@@ -739,6 +780,18 @@ ID Project Pri Description
|
|||||||
12 Errand L Remember to deposit bonus check
|
12 Errand L Remember to deposit bonus check
|
||||||
...</code></pre>
|
...</code></pre>
|
||||||
|
|
||||||
|
<strong>% task oldest</strong>
|
||||||
|
<p>
|
||||||
|
Lists the oldest tasks. Shows 10 tasks by default, but can be
|
||||||
|
set via the "oldest" configuration variable.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<strong>% task newest</strong>
|
||||||
|
<p>
|
||||||
|
Lists the newest tasks. Shows 10 tasks by default, but can be
|
||||||
|
set via the "newest" configuration variable.
|
||||||
|
</p>
|
||||||
|
|
||||||
<strong>% task /from/to/</strong>
|
<strong>% task /from/to/</strong>
|
||||||
<p>
|
<p>
|
||||||
If a task has been entered with a typo, it can be easily corrected
|
If a task has been entered with a typo, it can be easily corrected
|
||||||
@@ -1024,7 +1077,7 @@ on_white on_bright_white</code></pre>
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
The string may also contain other characters to act as spacers,
|
The string may also contain other characters to act as spacers,
|
||||||
or formatting. Other values could include:
|
or formatting. Other values could include (but are not limited to):
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -1055,6 +1108,30 @@ on_white on_bright_white</code></pre>
|
|||||||
column appears on the "list" and "next" reports.
|
column appears on the "list" and "next" reports.
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
|
<dt>monthsperline</dt>
|
||||||
|
<dd>
|
||||||
|
Determines how many months the "task calendar" command
|
||||||
|
renders across the screen. Defaults to 1.
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>oldest</dt>
|
||||||
|
<dd>
|
||||||
|
Determines how many tasks the "task oldest" command displays.
|
||||||
|
Defaults to 10.
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>newest</dt>
|
||||||
|
<dd>
|
||||||
|
Determines how many tasks the "task newest" command displays.
|
||||||
|
Defaults to 10.
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>defaultwidth</dt>
|
||||||
|
<dd>
|
||||||
|
The width of tables used when ncurses support is not available.
|
||||||
|
Defaults to 80.
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt>color</dt>
|
<dt>color</dt>
|
||||||
<dd>
|
<dd>
|
||||||
May be "on" or "off". Determines whether task uses color.
|
May be "on" or "off". Determines whether task uses color.
|
||||||
@@ -1152,6 +1229,8 @@ on_white on_bright_white</code></pre>
|
|||||||
task calendar
|
task calendar
|
||||||
task active
|
task active
|
||||||
task overdue
|
task overdue
|
||||||
|
task oldest
|
||||||
|
task newest
|
||||||
task stats
|
task stats
|
||||||
task usage
|
task usage
|
||||||
task export
|
task export
|
||||||
@@ -1222,6 +1301,17 @@ Many characters have special meaning to the shell, including:
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||||
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var pageTracker = _gat._getTracker("UA-4737637-1");
|
||||||
|
pageTracker._initData();
|
||||||
|
pageTracker._trackPageview();
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user