Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (82 sloc) 1.804 kb
eadb2ab Wesley Beary first pass at circuit training generator
authored
1 require 'rubygems'
2 require 'formatador'
3
4 srand
5
6 @exercises = {
a307db9 Wesley Beary expanding exercise listings
authored
7 :core => [
888162b Wesley Beary [circuit] rep tweaks, add burpees, add v situps
authored
8 '6x bosu situps',
a307db9 Wesley Beary expanding exercise listings
authored
9 '5x bicycle crunches',
10 '5x crunches',
11 '5x diagonal chop',
12 '5x double crunch',
57a1651 Wesley Beary [circuit] good morning for time
authored
13 '20s good morning',
fbe8db6 Wesley Beary [circuit] more reasonable reps for overhead squat
authored
14 '2x2 overhead squat',
8e108e4 Wesley Beary [circuit] plank holds for seconds, not reps
authored
15 '30s plank hold',
a307db9 Wesley Beary expanding exercise listings
authored
16 '5x hanging leg raises',
17 '5x supine leg raises',
6973548 Wesley Beary [circuit] add transverse abdominus
authored
18 '2x 20s transverse abdominus',
a307db9 Wesley Beary expanding exercise listings
authored
19 '5x v situps',
20 '5x sidebends',
21 '5x situp',
22 '5x stiff-leg situp',
23 '5x superman',
f507708 Wesley Beary [circuit] add missing comma
authored
24 '5x torso circle',
c7c0de2 Wesley Beary [circuit] fix missing comma
authored
25 '5x5 windmills'
eadb2ab Wesley Beary first pass at circuit training generator
authored
26 ],
27 :cardio => [
888162b Wesley Beary [circuit] rep tweaks, add burpees, add v situps
authored
28 '10x burpees',
d71a215 Wesley Beary tweaks after latest workout
authored
29 '10x10 tactical lunge',
888162b Wesley Beary [circuit] rep tweaks, add burpees, add v situps
authored
30 '6x6 snatches',
f4475bb Wesley Beary [circuit] jump rope by count rather than time is easier to track
authored
31 '50x jump rope',
eadb2ab Wesley Beary first pass at circuit training generator
authored
32 '30s rowing'
33 ],
a307db9 Wesley Beary expanding exercise listings
authored
34 :full_body => [
35 '2x2 turkish getups'
36 ],
bc07252 Wesley Beary [circuit] add some grip exercises
authored
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 ],
eadb2ab Wesley Beary first pass at circuit training generator
authored
46 :gymnastics => [
4d77bf7 Wesley Beary [circuit] add pull up bar related stuff back in, now that I have it setu...
authored
47 'back lever',
4c2d0a6 Wesley Beary [circuit] add l-seat
authored
48 'l-seat',
1f035ed Wesley Beary [circuit] tweaking reps
authored
49 'planche'
eadb2ab Wesley Beary first pass at circuit training generator
authored
50 ],
51 :lower => [
de249e7 Wesley Beary [circuit] more rep tweaks
authored
52 '6x6 squat',
53 '4x4 pistols',
54 '8x8 calf press'
eadb2ab Wesley Beary first pass at circuit training generator
authored
55 ],
4d77bf7 Wesley Beary [circuit] add pull up bar related stuff back in, now that I have it setu...
authored
56 :upper_pull => [
57 '5x pull up',
9c82fe7 Wesley Beary [circuit] split upper push/pull
authored
58 # '8x full body row'
4d77bf7 Wesley Beary [circuit] add pull up bar related stuff back in, now that I have it setu...
authored
59 ],
9c82fe7 Wesley Beary [circuit] split upper push/pull
authored
60 :upper_push => [
9999cde Wesley Beary [circuit] fix reps for clean and press
authored
61 '5x5 clean and press',
9c82fe7 Wesley Beary [circuit] split upper push/pull
authored
62 '2x handstand pushup',
63 '8x push up',
eadb2ab Wesley Beary first pass at circuit training generator
authored
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
e26addc Wesley Beary cleanup output
authored
72 Formatador.display_line
73 Formatador.display_line('Circuit:')
db397f9 Wesley Beary [circuit] nicer output format at the end summarizing days workout
authored
74 circuit, exercises = [], []
e26addc Wesley Beary cleanup output
authored
75 Formatador.indent do
76 while category = next_category
77 options = @exercises[category]
db397f9 Wesley Beary [circuit] nicer output format at the end summarizing days workout
authored
78 exercises << options[rand(options.length)]
7170622 Wesley Beary [circuit] nicer? table formatting of output
authored
79 circuit << {
80 :category => category,
db397f9 Wesley Beary [circuit] nicer output format at the end summarizing days workout
authored
81 :exercise => exercises.last
7170622 Wesley Beary [circuit] nicer? table formatting of output
authored
82 }
e26addc Wesley Beary cleanup output
authored
83 end
eadb2ab Wesley Beary first pass at circuit training generator
authored
84 end
7170622 Wesley Beary [circuit] nicer? table formatting of output
authored
85 Formatador.display_table(circuit)
db397f9 Wesley Beary [circuit] nicer output format at the end summarizing days workout
authored
86 Formatador.display_lines(['', exercises.join(', '), ''])
Something went wrong with that request. Please try again.