Permalink
Browse files

Slurping up everything from my local repo

  • Loading branch information...
0 parents commit f1c21ebb61b3f467583e6bb9938e6396ee225c95 @petdance committed Apr 16, 2007
Showing with 2,383 additions and 0 deletions.
  1. +96 −0 Changes
  2. +173 −0 HWD.pm
  3. +25 −0 MANIFEST
  4. +41 −0 Makefile.PL
  5. +29 −0 README
  6. +368 −0 Task.pm
  7. +150 −0 Work.pm
  8. +457 −0 bin/hwd
  9. +90 −0 bin/hwd-burnchart
  10. +259 −0 eg/sked.hwd
  11. +56 −0 etc/hwd.vim
  12. +10 −0 t/00-load.t
  13. +25 −0 t/burndown.t
  14. +46 −0 t/hwd.t
  15. +6 −0 t/pod-coverage.t
  16. +6 −0 t/pod.t
  17. +32 −0 t/simple.hwd
  18. +21 −0 t/started.t
  19. +61 −0 t/task-relationships.t
  20. +25 −0 t/task-rollup-error.t
  21. +24 −0 t/task-structure-error.t
  22. +62 −0 t/task-subtasks.t
  23. +159 −0 t/task.t
  24. +52 −0 t/work.t
  25. +110 −0 tags
@@ -0,0 +1,96 @@
+Revision history for App-HWD
+
+0.12
+ [ENHANCEMENTS]
+ * Now word-wraps the output based on the terminal size, or
+ at 72 if output is being redirected. This may be overridden
+ with --wrap.
+
+ * Now includes notes in the output. Can be turned off with --nonotes.
+
+ [FIXES]
+ * Added checks to make sure that tasks with estimates do not have children.
+
+ [INTERNALS]
+ * get_tasks_and_work() now returns an error array, rather
+ than dying.
+
+0.10 Mon Oct 24 17:38:00 CDT 2005
+ [ENHANCEMENTS]
+ * Added top-level totaling on the main dump.
+ * --todo now respects subtasks and their doneness.
+ * Added --csv option for printing dumps in an importable form
+ * You can now have notes in a task. Anything that is indented
+ is assumed to be part of the notes for the task above it.
+
+ [INTERNALS]
+ * Added parent()/children() to App::HWD::Task to support the
+ hierarchy reporting.
+
+0.08 Tue Aug 30 16:43:54 CDT 2005
+ [THINGS THAT MIGHT BREAK YOUR CODE]
+ * Dates must now be in YYYY-MM-DD format.
+
+ [ENHANCEMENTS]
+ * Added --todo option to show only those items needing to be done.
+ * Now handles fractional estimates.
+ * Now handles deletion dates. We don't DO anything with them,
+ but they're legal, and burndown ignores them.
+ * Franctional estimates and velocities in the main listing now
+ show as "+" rather than the decimals. For example, "12"
+ shows as "12", but "12.5" shows as "12+".
+
+ [FIXES]
+ * No longer double-counts tasks worked on by multiple people
+ in --started.
+ * Doesn't print a total when a --started person is specified.
+
+0.07_01 Wed Aug 17 15:03:12 CDT 2005
+ [THINGS THAT MIGHT BREAK YOUR CODE]
+ * Previously, a task that was added after coding started was
+ noted like this:
+
+ --Implement widget (#251, 4hrs, @11/7/05)
+
+ Now, we use the word "added" instead of "@"
+
+ --Implement widget (#251, 4hrs, added 11/7/05)
+
+ [ENHANCEMENTS]
+ * Added whitespace to --started output.
+ * Gives total points open on --started.
+
+ [FIXES]
+ * Fixed potentially destructive bug in a test file:
+
+ unlink($started, qr#Chimp is working on.+ 107 - Refactor \(1/1\)#s);
+
+ That "unlink" is, of course, supposed to be "unlike". OOPS!
+
+ [INTERNALS]
+ * Removed code for handling --detail_level
+ * bin/hwd now has no globals.
+ * Added many items to TODO list.
+
+0.06 Sun Aug 14 21:52:55 CDT 2005
+ [ENHANCEMENTS]
+ * Added a vim syntax file in etc/hwd.vim.
+ * Added --burndown and starting on the burndown graphic.
+ Thanks to Neil & Luke again.
+ * Added a $task->date_added()
+
+0.04 Tue Aug 2 15:47:23 CDT 2005
+ [ENHANCEMENTS]
+ * Added --started feature. Thanks to Neil Watkiss and Luke
+ Closs from Sophos.
+
+0.02 Mon Aug 1 14:32:29 PDT 2005
+ [FIXES]
+ * Fixes silly syntax bummers.
+
+ [ENHANCEMENTS]
+ * Added --nextid
+
+0.01
+ First version, released on an unsuspecting world.
+
@@ -0,0 +1,173 @@
+package App::HWD;
+
+use warnings;
+use strict;
+
+use App::HWD::Task;
+use App::HWD::Work;
+
+=head1 NAME
+
+App::HWD - How We Doin', the task tracking tool
+
+=head1 VERSION
+
+Version 0.12
+
+=cut
+
+our $VERSION = '0.12';
+
+=head1 SYNOPSIS
+
+This module is nothing more than a place-holder for the version info and the TODO list.
+
+=head1 TODO
+
+=over 4
+
+=item * Better documentation
+
+=item * Samples so that prospective users can see what it will do.
+
+=item * Tutorial showing different commands and output
+
+=item * Add support for HWDFILE environment variable so those of us who
+are only ever using one file don't have to keep retyping the name all
+the time.
+
+=item * Make sure a rollup task has no hours, and that any task with no
+hours has tasks below it.
+
+=item * Add support for changing estimates on a task
+
+=item * Open tasks are doubling up if two people have it open.
+
+=item * Show task history
+
+=item * Show tasks that are too big.
+
+=item * Show tasks that have gone over
+
+=item * Weekly burndown
+
+The C<--burndown> flag gives totals as they happen. I want them to give
+a Monday-morning total since I like to plot weekly, not daily.
+
+=back
+
+=head1 FUNCTIONS
+
+These functions are used by F<hwd>, but are kept here so I can easily
+test them.
+
+=head2 get_tasks_and_work( @tasks )
+
+Reads tasks and work, and applies the work to the tasks.
+
+Returns references to C<@tasks>, C<@work>, C<%tasks_by_id> and C<@errors>.
+
+=cut
+
+sub get_tasks_and_work {
+ my @tasks;
+ my @work;
+ my %tasks_by_id;
+ my @errors;
+
+ my @parents;
+ my $curr_task;
+ my $lineno = 0;
+ for my $line ( @_ ) {
+ ++$lineno;
+ chomp $line;
+ next if $line =~ /^\s*#/;
+ next if $line !~ /./;
+
+ if ( $line =~ /^(-+)/ ) {
+ my $level = length $1;
+ my $parent;
+ if ( $level > 1 ) {
+ $parent = $parents[ $level - 1 ];
+ if ( !$parent ) {
+ push( @errors, "Line $lineno has no parent: $line" );
+ next;
+ }
+ }
+ my $task = App::HWD::Task->parse( $line, $parent );
+ if ( !$task ) {
+ push( @errors, "Can't parse line $lineno: $line" );
+ next;
+ }
+ if ( $task->id ) {
+ if ( $tasks_by_id{ $task->id } ) {
+ push( @errors, "Dupe task ID on line $lineno: Task " . $task->id );
+ next;
+ }
+ $tasks_by_id{ $task->id } = $task;
+ }
+ push( @tasks, $task );
+ $curr_task = $task;
+ $parent->add_child( $task ) if $parent;
+
+ @parents = @parents[0..$level-1]; # Clear any sub-parents
+ $parents[ $level ] = $task; # Set the new one
+ }
+ elsif ( $line =~ s/^\s+// ) {
+ $curr_task->add_notes( $line );
+ }
+ else {
+ my $work = App::HWD::Work->parse( $line );
+ push( @work, $work );
+ }
+ } # while
+
+ # Validate the structure
+ for my $task ( @tasks ) {
+ if ( $task->estimate && $task->children ) {
+ push( @errors, sprintf( "Task %d cannot have estimates, because it has children", $task->id ) );
+ }
+ }
+
+ for my $work ( @work ) {
+ my $task = $tasks_by_id{ $work->task };
+ if ( !$task ) {
+ push( @errors, "No task ID " . $work->task );
+ next;
+ }
+ $task->add_work( $work );
+ }
+
+ $_->sort_work() for @tasks;
+
+ return( \@tasks, \@work, \%tasks_by_id, \@errors );
+}
+
+=head1 AUTHOR
+
+Andy Lester, C<< <andy at petdance.com> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-app-hwd at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-HWD>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to
+Neil Watkiss
+and Luke Closs for features and patches.
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2005 Andy Lester, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+1; # End of App::HWD
@@ -0,0 +1,25 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+HWD.pm
+Task.pm
+Work.pm
+bin/hwd
+bin/hwd-burnchart
+eg/sked.hwd
+etc/hwd.vim
+t/00-load.t
+t/burndown.t
+t/hwd.t
+t/pod-coverage.t
+t/pod.t
+t/simple.hwd
+t/started.t
+t/task.t
+t/task-relationships.t
+t/task-rollup-error.t
+t/task-structure-error.t
+t/task-subtasks.t
+t/work.t
+META.yml Module meta-data (added by MakeMaker)
@@ -0,0 +1,41 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'App::HWD',
+ AUTHOR => 'Andy Lester <andy@petdance.com>',
+ VERSION_FROM => 'HWD.pm',
+ ABSTRACT_FROM => 'HWD.pm',
+ PL_FILES => {},
+ EXE_FILES => [ 'bin/hwd', 'bin/hwd-burnchart' ],
+ PM => {
+ 'HWD.pm' => '$(INST_LIBDIR)/HWD.pm',
+ 'Task.pm' => '$(INST_LIBDIR)/HWD/Task.pm',
+ 'Work.pm' => '$(INST_LIBDIR)/HWD/Work.pm',
+ },
+ PREREQ_PM => {
+ 'DateTime' => 0,
+ 'DateTime::Format::Strptime' => 0,
+ 'Getopt::Long' => 0,
+ 'Pod::Usage' => 0,
+ 'Term::ReadKey' => 0,
+ 'Test::More' => 0,
+ 'Text::CSV_XS' => 0,
+ },
+ MAN3PODS => { }, # no need for docs on these
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'App-HWD-*' },
+);
+
+sub MY::postamble {
+ return <<'MAKE_FRAG';
+.PHONY: tags
+
+tags:
+ ctags -f tags --recurse --totals \
+ --exclude=blib/ --exclude=t/lib \
+ --exclude=.svn --exclude='*~' \
+ --languages=Perl --langmap=Perl:+.t \
+MAKE_FRAG
+}
@@ -0,0 +1,29 @@
+App-HWD
+
+The README is used to introduce the module and provide instructions on
+how to install the module, any machine dependencies it may have (for
+example C compilers and installed libraries) and any other information
+that should be provided before the module is installed.
+
+A README file is required for CPAN modules since CPAN extracts the README
+file from a module distribution so that people browsing the archive
+can use it get an idea of the modules uses. It is usually a good idea
+to provide version information here so that people can decide whether
+fixes for the module are worth downloading.
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2005 Andy Lester
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
Oops, something went wrong.

0 comments on commit f1c21eb

Please sign in to comment.