Permalink
Browse files

update thor task and readme to markdown

  • Loading branch information...
1 parent e8367c4 commit 3992a2c1f26629ffe438465e9f48cc487138c8e8 @cjolly committed Sep 17, 2011
Showing with 52 additions and 48 deletions.
  1. +0 −39 README
  2. +39 −0 README.md
  3. +13 −9 lib/pickem.thor
View
39 README
@@ -1,39 +0,0 @@
-Suggestions for NFL Pickem leagues based on ESPN AccuScore
-
-nfl_pickem Taps into ESPN's unintentional AccuScore API and generates a set of suggestions based on AccuScore's game simulation odds percentages.
-http://insider.espn.go.com/nfl/projections
-
-Week 6 example:
-→ bundle install
-→ bundle exec ruby nfl_pickem.rb WEEK=6
-Games:
-CHI (74.6%) at SEA (25.3%)
-GB (62.9%) at MIA (37.0%)
-STL (20.5%) at SD (79.4%)
-NE (52.6%) at BAL (47.3%)
-NYG (77.4%) at DET (22.5%)
-PHI (60.1%) at ATL (39.8%)
-PIT (89.5%) at CLE (10.5%)
-TB (35.9%) at NO (63.9%)
-HOU (63.7%) at KC (36.2%)
-DEN (37.6%) at NYJ (62.4%)
-SF (58.4%) at OAK (41.5%)
-MIN (52.6%) at DAL (47.3%)
-WAS (39.1%) at IND (60.8%)
-JAC (49.7%) at TEN (50.1%)
---------------------------------------------------------------------------------
-Suggestions:
-16 - PIT (89.5%)
-15 - SD (79.4%)
-14 - NYG (77.4%)
-13 - CHI (74.6%)
-12 - NO (63.9%)
-11 - HOU (63.7%)
-10 - GB (62.9%)
-9 - NYJ (62.4%)
-8 - IND (60.8%)
-7 - PHI (60.1%)
-6 - SF (58.4%)
-5 - MIN (52.6%)
-4 - NE (52.6%)
-3 - TEN (50.1%)
View
@@ -0,0 +1,39 @@
+# NFL Pickem suggestions by week
+
+`thor pickem:picks:for_week 2`
+
+ Games:
+ BUF (53.0%) at OAK (46.9%)
+ DET (74.7%) at KC (25.2%)
+ TEN (25.9%) at BAL (74.0%)
+ IND (55.4%) at CLE (44.5%)
+ MIN (49.9%) at TB (50.0%)
+ NO (59.5%) at CHI (40.4%)
+ NYJ (66.7%) at JAC (33.2%)
+ PIT (85.2%) at SEA (14.7%)
+ WAS (52.3%) at ARI (47.5%)
+ CAR (23.3%) at GB (76.6%)
+ SF (51.3%) at DAL (48.6%)
+ DEN (64.8%) at CIN (35.1%)
+ MIA (52.5%) at HOU (47.4%)
+ NE (59.6%) at SD (40.3%)
+ ATL (52.9%) at PHI (47.0%)
+ NYG (73.9%) at STL (26.0%)
+ --------------------------------------------------------------------------------
+ Suggestions:
+ 16 - PIT (85.2%)
+ 15 - GB (76.6%)
+ 14 - DET (74.7%)
+ 13 - BAL (74.0%)
+ 12 - NYG (73.9%)
+ 11 - NYJ (66.7%)
+ 10 - DEN (64.8%)
+ 9 - NE (59.6%)
+ 8 - NO (59.5%)
+ 7 - IND (55.4%)
+ 6 - BUF (53.0%)
+ 5 - ATL (52.9%)
+ 4 - MIA (52.5%)
+ 3 - WAS (52.3%)
+ 2 - SF (51.3%)
+ 1 - TB (50.0%)
View
@@ -1,14 +1,18 @@
$LOAD_PATH<<'.'
require 'pickem'
-class Picks < Thor
- desc "test", "an example description"
- def test(week_number)
- week = Pickem::Week.new(week_number)
- puts "Games:"
- puts week.games
- puts "-" * 80
- puts "Suggestions:"
- puts week.suggestions
+module Pickem
+ class Picks < Thor
+ default_task :for_week
+
+ desc "for_week", "Suggestions for week "
+ def for_week(week_number)
+ week = ::Pickem::Week.new(week_number)
+ puts "Games:"
+ puts week.games
+ puts "-" * 80
+ puts "Suggestions:"
+ puts week.suggestions
+ end
end
end

0 comments on commit 3992a2c

Please sign in to comment.