Commit graph

61 commits

Author SHA1 Message Date
Paul Beckingham
96d406960d Enhancement
- Corrected sorting to use std::stable_sort instead of std::sort, which is not
  guaranteed stable (thanks to Stefan Hacker).
2011-03-09 12:45:45 -05:00
Paul Beckingham
462caf5bd4 Copyright
- Updated copyright to 2011.
2010-12-31 22:03:05 -05:00
Paul Beckingham
31cf470cc8 Copyright
- Made all the copyright notices consistent.  It was bothering me.
2010-11-27 09:13:09 -05:00
Paul Beckingham
38ffa390ea Bug #542
- Fixed bug #542, which sorted the countdown columns incorrectly (thanks to
  Michelle Crane).
- Duration could not parse all varieties of it's own output, which is why the
  sorting was broken, in particular negative durations and real numbers in
  durations (such as (1.2y').
- Sorting in Table::sort_compare for Table::periodAscending and
  Table::periodDescending was broken.
- Missing unit tests for countdown_compact.
- Imported Nibbler::getNumber from the Attitash project.
- Additional Duration unit tests.
- Additional Nibbler unit tests.
- Additional countdown.t unit tests.
2010-11-26 14:00:49 -05:00
Paul Beckingham
eb2cb99532 Performance
- Removed "std::endl" in cases where the autoflush is only going to
  slow things down.
2010-10-02 12:02:06 -04:00
Paul Beckingham
44fe227595 Product Name Change
- Converted all (appropriate) uses of 'task' to 'taskwarrior'.
2010-08-21 12:31:00 -04:00
Paul Beckingham
d02eac07a9 Bug
- Fixed problem with extra blank line in the ghistory reports.
2010-08-08 18:16:36 -04:00
Paul Beckingham
a306892509 Code Cleanup
- Removed unreachable code from Table::sort_compare.
2010-08-07 20:34:54 -04:00
Paul Beckingham
f83cc3f39a Sorting
- Completed sort_compare routine to mimic 1.9.2, but using std::sort.
- Added blank task to the unit tests to prove the sorting is working
  (it wasn't), then fixed all.
2010-08-07 19:58:56 -04:00
Paul Beckingham
2f1c582d7d Code Cleanup
- Relocated the Table::getCharLength() from Johannes to text.cpp/characters()
  because it is a general-purpose function, and will be the start of the UTF8
  conversion of all text.cpp code.
- Added unit tests for characters().
2010-08-01 13:05:53 -04:00
Johannes Schlatow
6e1aa42d1a Bug #455 - Text alignment in reports is broken when text contains utf8 characters
- Applied patch from Johannes.
- Also included extra calls to getCharLength in other parts of the code.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2010-08-01 09:30:42 -04:00
Johannes Schlatow
3939503377 Bug #453 - Priorities are sorted inconsistently (asc vs. desc)
- Patch to correct the sorting of priorities, which had a condition
  flipped making the Table::descendingPriority consider a missing
  priority to be 'higher' than 'H'.
2010-07-31 09:03:01 -04:00
Paul Beckingham
9cab648d8a Merge branch 'sort' into 1.9.3 2010-07-29 14:50:54 -04:00
Paul Beckingham
031c4c484d Instrumentation
- Added timing measurement for table sorting.
- Added timing measurement for table composition.
2010-07-25 15:02:35 -04:00
Paul Beckingham
a3f1aba6f0 Code Cleanup
- Reorganized sort_compare code to make certain shortcuts occur
  earlier in processing.
2010-07-23 20:57:36 -07:00
Federico Hernandez
9a973770d8 Missing include under Linux 2010-07-22 13:10:40 +02:00
Paul Beckingham
faa96dbf6b Enhancement - sort
- Tweaks to the comparison function.
2010-07-21 23:36:54 -07:00
Paul Beckingham
da9985058b Enhancement - Sorting
- Replaced the hand-written combsort with std::sort.
- Added exhaustive set of unit tests to cover the single and double
  column sort orders.
2010-07-21 15:30:37 -07:00
Paul Beckingham
1a34a29b7a Bug #438 - Reports sorting by end_time, start_time, and entry_time are ordered incorrectly
- Fixed bug #438, correcting the sorting of the entry_time, start_time
  and end_time columns (thanks to Michelle Crane).
- Reordered ChangeLog so that bugs, features are in sequence.  Don't know
  why I did this.  Some inner compulsion.
- Deprecated silly start_time, end_time and entry_time columns, which are
  now (and were) superseded by start, end and entry columns with time formats.
- Config.cpp now detects use of these deprecated fields and complains to the
  show command.
- Date.cpp now uses the variable 'input' instead of 'mdy', which was confusing
  and implied that it contained a date without a time.
- Obsoleted and removed Date::toStringWithTime, which ignored requested formats.
- When checking for an epoch, Date::isEpoch just looked for strings of more
  than 8 digits.  The additional restriction of less than or equal to 10 digits
  was added.  This was breaking unit tests using the dateformat YMDHNS, which is
  reasonable.
- Removed the obsolete field format hooks format-entry_time, format-start_time
  and format-end_time
- Removed the obsolete field format hook unit tests hook.format-entry_time.t,
  hook.format-start_time.t and hook.format-end_time.t.
- Removed use of deprecated field in hook.format-countdown_compact.t.
- Added missing shortcut comparisons in Table::sort that was causing an
  unnecessary full parse of dates even if they were identical as strings.
- Coded entry_time as a synonym for entry.  Ditto for start_time and end_time.
- Marked the new synonyms as deprecated.
- Added bug.438.t unit test.
- Added deprecated fields to the NEWS file.
2010-07-20 16:57:41 -07:00
Paul Beckingham
ad9c89b9fb Performance
- Found some inefficient string initialization in Table.cpp, report.cpp,
  and in switching over to using more std::string capabilities, realized
  a 25% boost in Table::render speed.
- Eliminated Table::suppressWS.
- Eliminated Table::clean.
2010-07-06 01:37:35 -04:00
Paul Beckingham
14508742f1 Code Cleanup
- Removed obsolete code from Table object.
2010-06-28 17:46:27 -04:00
Paul Beckingham
916b8641b3 Feature #415
- Added feature #415, which supports displaying just a single page of tasks,
  by specifying either 'limit:page' to a command, or 'report.xxx.limit:page'
  in a report specification (thanks to T. Charles Yun).
- Modified the 'next' report to only display a page, by default.
2010-06-20 17:32:11 -04:00
Paul Beckingham
2b2795077b Bug Fix - #371 color.due clobbered by color.alternate
- Fixed bug #371 which caused task to mis-apply certain color rules, like
  color.alternate, which was (a) not applied first, and (b) not blended
  with the other color rules (thanks to Richard Querin).
2010-02-06 12:23:46 -05:00
Federico Hernandez
401f1b6496 Holidays and dates
- improved dateformat handling now defaulting to YMD set via
  dateformat.holiday variable
- fixed missing sorting in holiday table output when running
  calendar.holidays=full
- renamed reportdateformat to dateformat.report
- added config file checking for calendar.holidays and calendar.details
- added 2 holiday files for SE and US (watertown, MA)
2010-01-25 01:06:15 +01:00
Federico Hernandez
fccd0d6c96 Report date format
Added report.X.dateformat which gives each report the possibility
to have a custom format for the due dates.
2010-01-18 03:45:49 +01:00
Paul Beckingham
cb821c2a25 Config - defaults
- Implemented replacement Config::get* methods.
- Replaced all calls throughout the code, with the new methods which
  have no static values as defaults.
2010-01-15 20:55:06 -05:00
Federico Hernandez
660d0cca3e Report date format
- added new reportdateformat to extend the formatting of due dates
  in the reports and "task info"
- added new conversion sequences a, A, b, B and Y to be used with
  reportdateformat
2010-01-12 23:12:22 +01:00
Paul Beckingham
9ce55bcf67 Copyright
- Updated the copyright notices to 2010, for the 1.9.0 release.
2009-12-27 12:39:42 -05:00
Paul Beckingham
fbb217538e Code Cleanup
- Removed unnecessary use of the scope resolution operator.
2009-11-17 22:34:28 -05:00
Federico Hernandez
bf077c0f97 Merge branch 'master' (1.8.3) into 1.9.0
Conflicts which were fixed:
	ChangeLog
	configure.ac
	doc/man/task-tutorial.5
	doc/man/task.1
	doc/man/taskrc.5
	src/report.cpp
2009-10-22 22:55:01 +02:00
Paul Beckingham
175dd3eb4f Feature - #292 Alternate line coloration
- Implemented alternate line coloration, triggered by the 'color.alternate'
  configuration variable.
2009-10-05 22:09:19 -04:00
Paul Beckingham
b3d40b2554 Portability - Haiku R1/alpha1
- Added necessary include files and edits in order to build task on
  Haiku R1/alpha1.
2009-09-27 17:02:20 -04:00
Paul Beckingham
ff3b7cf337 Feature - 256-color support
- Integrated new Color object into task.
- Debugging needed - the cyan, green, and yellow colors are mixed up!
2009-09-22 17:01:59 -04:00
Paul Beckingham
f3d3126839 Bug Fix
- Fixed bug that caused asserts in Table.cpp when a column had a blank
  heading and value.
2009-06-27 23:42:49 -04:00
Paul Beckingham
50f000988b Debugging
- Added timers to measure performance.
2009-06-23 01:23:46 -04:00
Paul Beckingham
04f60a4d8c FF4 - header file reorg
- Added new util.h and text.h header files.
- Corresponding edits.
2009-05-17 23:29:53 -04:00
Paul Beckingham
2e39929d71 FF4 - util.cpp:convertDuration -> Duration
- Replaced util.cpp convertDuration function with Duration object.
2009-05-16 22:14:32 -04:00
Paul Beckingham
11ee827a0d Platform Testing - clean builds
- on Ubuntu 9.04
- on Fedora Core 10
- on Crunchbang Linux
- on Windows XP/Cygwin
2009-05-14 22:20:09 -04:00
Paul Beckingham
f7fc455b62 Bug Fix - extra line in ghistory report
- Fixed bug that added an extra line between header and graph in the
  ghistory report.
2009-05-08 01:09:55 -04:00
Paul Beckingham
3979c3283e Enhancement - annotations
- Added support for "annotate" command to annotate existing tasks.
- Bumped file format to version 3, due to the annotations.
- Added unit tests to verify that annotations work.
- Changed 'description' column everywhere to include annotations.
- Added 'description_only' column to exclude the annotations.
- Fixed bug in Table.cpp that calculated the width of multi-line
  columns by using the cell length, instead of the length of the
  longest individual line.
- Updated documentation with new feature.
- Updated documentation with new column.
- Enhanced t.t unit tests to cover format 43
2009-03-24 01:57:12 -04:00
Paul Beckingham
b5690f00e2 Portabiliy - Fedora 9, Ubuntu 8
- The custom report limit "report.x.limit" was being used to limit the
  rendered rows in the table.  Instead, there should be something like
  min (limit, actual_rows) used, in Table.cpp.
  The symptom was duplicate tasks in a "task oldest" report, when there
  were less than 10 tasks.
2009-03-15 16:39:41 -04:00
Paul Beckingham
c35a764019 Custom Reports - oldest, newest
- Added support for the "report.X.limit" configuration variable, to
  restrict the number of rows a report generates.
- Added support for Table::render (limit) to limit the number of rows
  that are rendered.
- Removed "oldest" and "newest" report code.
- Added "oldest" and "newest" custom report details to Config.cpp
- Updated various documentation.
2009-03-12 22:34:45 -04:00
Paul Beckingham
17de9fec9f New Column - recur
- Added new column 'recur' for use in custom reports.
- Implemented Table::ascendingPeriod, Table::descendingPeriod allowing
  sorting on the recur column.
- Added unit tests to both use the new column and test the sorting.
- Code cleanup.
2009-03-09 22:01:08 -04:00
Paul Beckingham
28e997691f Unit Tests - repair
- Added auto right trim to all table rows, which is a much more
  efficient way of doing what Table::optimize was doing.
- Table::optimize is now a nop.
2009-03-08 22:56:47 -04:00
Paul Beckingham
3f418c6fdc Performance
- Made Table::optimize a public method.
- Table::optimize called only from handleReportGHistory, where it's
  needed.
- Retaining benchmark.txt, to allow further improvements.
2009-03-08 21:29:55 -04:00
Paul Beckingham
0362b41f3b Performance
- Added Timer class to display high resolution timing information.
- Found terrible bug in Table::optimize that was taking up 99.7%,
  on average, of the Table::rendering time, including sorting.  This
  fix naturally causes a 187-fold speedup of rendering.
- Changed report.cpp in handleCustomReport to only load pending tasks,
  instead of all pending tasks.  Subtle, but important difference.
2009-03-08 20:49:33 -04:00
Paul Beckingham
a1b7516cf8 Sort Algorithm Fix
- The sort algorithm (Combsort11) was broken because it didn't
  consider all the possible variations of present/missing, same/
  different combinations of data, when performing a compare.  This
  led to an unstable sort, which is an infinite loop in Combsort11.
2009-03-02 23:49:13 -05:00
Paul Beckingham
2307dcab8a Copyright Update
- bumped the year, on the source copyright notices.
2009-02-14 17:50:38 -05:00
Paul Beckingham
4abc722eff - Task now uses dashes (-----) to underline column headings when color is
disabled (thanks for Vincent Fleuranceau).
2008-09-12 11:27:25 -04:00
Paul Beckingham
11225eb599 - Applied patch from Andy Lester to correct Table sorting to use the entire
string instead of just the initial characters.
2008-09-12 10:28:14 -04:00