From f92dc5c5e6a1c3261d4354715f803e009e0689a0 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 14 Jun 2011 09:40:57 -0400 Subject: [PATCH] hours: s/total_hours/goal_hours/ --- hours | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hours b/hours index f178aa6..fae631c 100755 --- a/hours +++ b/hours @@ -29,12 +29,12 @@ def get_dt_from_log_line(line): return None def main(argv): - total_hours = 40 + goal_hours = 40 parser = argparse.ArgumentParser('hours') parser.add_argument('-t', '--total', type=float) args = parser.parse_args(argv[1:]) if args.total is not None: - total_hours = args.total + goal_hours = args.total times = [] for i in range(7): @@ -90,10 +90,10 @@ def main(argv): border() sys.stdout.write('Total: %.1f hours' % round(seconds / 60.0 / 60.0, 1)) - secs_in_total_hours = total_hours * 60 * 60 + secs_in_total_hours = goal_hours * 60 * 60 if total_seconds < secs_in_total_hours: out_time = now + timedelta(0, secs_in_total_hours - total_seconds) - sys.stdout.write('; %.1f at: %s %s' % (total_hours, + sys.stdout.write('; %.1f at: %s %s' % (goal_hours, out_time.strftime('%a %d'), fmt_time_dt(out_time))) sys.stdout.write('\n')