Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 86 lines (82 sloc) 1.804 kb
eadb2abb »
2011-05-23 first pass at circuit training generator
1 require 'rubygems'
2 require 'formatador'
3
4 srand
5
6 @exercises = {
a307db93 »
2011-08-28 expanding exercise listings
7 :core => [
888162b6 »
2011-05-29 [circuit] rep tweaks, add burpees, add v situps
8 '6x bosu situps',
a307db93 »
2011-08-28 expanding exercise listings
9 '5x bicycle crunches',
10 '5x crunches',
11 '5x diagonal chop',
12 '5x double crunch',
57a1651d »
2011-09-14 [circuit] good morning for time
13 '20s good morning',
fbe8db68 »
2011-09-14 [circuit] more reasonable reps for overhead squat
14 '2x2 overhead squat',
8e108e43 »
2011-09-12 [circuit] plank holds for seconds, not reps
15 '30s plank hold',
a307db93 »
2011-08-28 expanding exercise listings
16 '5x hanging leg raises',
17 '5x supine leg raises',
69735481 »
2011-05-29 [circuit] add transverse abdominus
18 '2x 20s transverse abdominus',
a307db93 »
2011-08-28 expanding exercise listings
19 '5x v situps',
20 '5x sidebends',
21 '5x situp',
22 '5x stiff-leg situp',
23 '5x superman',
f507708d »
2011-09-12 [circuit] add missing comma
24 '5x torso circle',
c7c0de21 »
2011-08-31 [circuit] fix missing comma
25 '5x5 windmills'
eadb2abb »
2011-05-23 first pass at circuit training generator
26 ],
27 :cardio => [
888162b6 »
2011-05-29 [circuit] rep tweaks, add burpees, add v situps
28 '10x burpees',
d71a2157 »
2011-05-23 tweaks after latest workout
29 '10x10 tactical lunge',
888162b6 »
2011-05-29 [circuit] rep tweaks, add burpees, add v situps
30 '6x6 snatches',
f4475bb9 »
2011-08-01 [circuit] jump rope by count rather than time is easier to track
31 '50x jump rope',
eadb2abb »
2011-05-23 first pass at circuit training generator
32 '30s rowing'
33 ],
a307db93 »
2011-08-28 expanding exercise listings
34 :full_body => [
35 '2x2 turkish getups'
36 ],
bc072521 »
2011-08-05 [circuit] add some grip exercises
37 :grip => [
38 '5x gripprotrainer crush, 10x expand',
39 '5x kettlebell crush, 10x expand',
40 '5x kettlebell towel shrug, 10x expand',
41 '5x5 sledgehammer lever',
42 '5x5 sledgehammer rotation',
43 '5x5 sledgehammer rotation (crimp grip)',
44 '5x sledgehammer walk'
45 ],
eadb2abb »
2011-05-23 first pass at circuit training generator
46 :gymnastics => [
4d77bf7c »
2011-08-17 [circuit] add pull up bar related stuff back in, now that I have it s…
47 'back lever',
4c2d0a6a »
2011-05-29 [circuit] add l-seat
48 'l-seat',
1f035ed0 »
2011-05-27 [circuit] tweaking reps
49 'planche'
eadb2abb »
2011-05-23 first pass at circuit training generator
50 ],
51 :lower => [
de249e77 »
2011-06-01 [circuit] more rep tweaks
52 '6x6 squat',
53 '4x4 pistols',
54 '8x8 calf press'
eadb2abb »
2011-05-23 first pass at circuit training generator
55 ],
4d77bf7c »
2011-08-17 [circuit] add pull up bar related stuff back in, now that I have it s…
56 :upper_pull => [
57 '5x pull up',
9c82fe72 »
2011-08-01 [circuit] split upper push/pull
58 # '8x full body row'
4d77bf7c »
2011-08-17 [circuit] add pull up bar related stuff back in, now that I have it s…
59 ],
9c82fe72 »
2011-08-01 [circuit] split upper push/pull
60 :upper_push => [
9999cde4 »
2011-09-14 [circuit] fix reps for clean and press
61 '5x5 clean and press',
9c82fe72 »
2011-08-01 [circuit] split upper push/pull
62 '2x handstand pushup',
63 '8x push up',
eadb2abb »
2011-05-23 first pass at circuit training generator
64 ]
65 }
66
67 def next_category
68 @remaining_categories ||= @exercises.keys.dup.sort {|x,y| rand(2)}
69 @remaining_categories.shift
70 end
71
e26addc4 »
2011-05-23 cleanup output
72 Formatador.display_line
73 Formatador.display_line('Circuit:')
db397f9c »
2011-08-17 [circuit] nicer output format at the end summarizing days workout
74 circuit, exercises = [], []
e26addc4 »
2011-05-23 cleanup output
75 Formatador.indent do
76 while category = next_category
77 options = @exercises[category]
db397f9c »
2011-08-17 [circuit] nicer output format at the end summarizing days workout
78 exercises << options[rand(options.length)]
71706221 »
2011-08-01 [circuit] nicer? table formatting of output
79 circuit << {
80 :category => category,
db397f9c »
2011-08-17 [circuit] nicer output format at the end summarizing days workout
81 :exercise => exercises.last
71706221 »
2011-08-01 [circuit] nicer? table formatting of output
82 }
e26addc4 »
2011-05-23 cleanup output
83 end
eadb2abb »
2011-05-23 first pass at circuit training generator
84 end
71706221 »
2011-08-01 [circuit] nicer? table formatting of output
85 Formatador.display_table(circuit)
db397f9c »
2011-08-17 [circuit] nicer output format at the end summarizing days workout
86 Formatador.display_lines(['', exercises.join(', '), ''])
Something went wrong with that request. Please try again.