Permalink
Browse files

To-CSV script; misc tweaks

  • Loading branch information...
1 parent 1000570 commit 425a202bf0e484044727ea9734dcacbaa9557754 @dreeves committed Sep 30, 2013
Showing with 404 additions and 685 deletions.
  1. +1 −1 README.md
  2. +2 −2 beemapi.pl
  3. +6 −5 ping.pl
  4. +319 −677 script/tagtime.nb
  5. +76 −0 tocsv.pl
View
@@ -123,7 +123,7 @@ The probability of waiting over 10 hours for a ping is one in a million.
To set up TagTime to automatically send reports to
[Beeminder](http://www.beeminder.com/),
-first set up a goal there (either a "Do More" goal or a "Set A Limit" goal).
+first set up a goal there (either a "Do More" or "Do Less" goal).
Copy the url and plug it into your
`settings.pl` file under the Beeminder section.
View
@@ -1,5 +1,5 @@
# Rough implementation of some Beeminder API calls needed for TagTime
-# See http://beeminder.com/api-docs
+# See http://beeminder.com/api
# Get your personal Beeminder auth token (after signing in) from
# https://www.beeminder.com/api/v1/auth_token.json
@@ -91,4 +91,4 @@
# value => $datapoint,
# comment => $comment
#}
-#);
+#);
View
@@ -83,11 +83,11 @@
my $last_doing = eval { get_last_doing() };
$last_doing = trim($last_doing);
-if ($@) { $eflag++; warn "ERROR: $@" }
+if($@) { $eflag++; warn "ERROR: $@" }
my $ansi_last_doing = $last_doing;
-if ($INC{'Term/ANSIColor.pm'}) {
+if($INC{'Term/ANSIColor.pm'}) {
# Yay! We can do fancy formatting
$ansi_last_doing = CYAN() . BOLD() . $last_doing . RESET();
}
@@ -133,7 +133,9 @@
$tagstr .= $autotags;
$tagstr =~ s/\s+/\ /g;
$a = annotime("$t $tagstr $comments", $t)."\n";
-} while($enforcenums && $tagstr ne "" && ($tagstr !~ /\b(\d+|non|afk)\b/));
+} while($tagstr ne "" &&
+ ($enforcenums && ($tagstr !~ /\b(\d+|non|afk)\b/) ||
+ $enforcenonon && ($tagstr =~ /\bnon\b/)));
print $a;
slog($a);
@@ -163,10 +165,9 @@
}
}
-# Returns what the user was last doing by extracting it from their logfile.
+# Return what the user was last doing by extracting it from their logfile.
# Timestamps and comments are removed.
# On error, throws an exception. (You can catch this with Try::Tiny or eval)
-
sub get_last_doing {
use strict;
use warnings;
Oops, something went wrong.

0 comments on commit 425a202

Please sign in to comment.