README.md 2.04 KB
Newer Older
Johannes Knoedtel's avatar
Johannes Knoedtel committed
1
2
3
4
5
6
7
8
9
10
11
workoutcard.rb
==============

This is a tool to generate LaTeX-based workout logging cards. The format in which the exercises are specified can be learned by looking at the examples lower.workout
and upper.workout.

It is not very well written but does the job well. I only released it, because other people might find it useful and I have no intent to maintain or improve the code.

Example
-------

Johannes Knoedtel's avatar
Johannes Knoedtel committed
12
1. Specify your Workout
Johannes Knoedtel's avatar
Johannes Knoedtel committed
13

derrotebaron's avatar
derrotebaron committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  ```
  $ cat upper.workout
  ```
  ```ruby
  { :year      => 2014,
    :title     => "Upper Body Workout",
    :exercises => [[{ :name => "Bench Press",
                     :variant => "Dumbbells", 
                     :sets => 3, :reps => 8 },
                   { :name => "Seated Rows",
                     :variant => "Lever",
                     :sets => 3, :reps => 8 },
                   { :name => "Fly",
                     :variant => "Pec Deck",
                     :sets => 3, :reps => 8 },
                   { :name => "Cable Pulldown",
                     :variant => "Close Grip",
                     :sets => 3, :reps => 8 }],
                  [{ :name => "Military Press",
                     :variant => "Barbell",
                     :sets => 3, :reps => 8 },
                   { :name => "Upright Row",
                     :variant => "Barbell",
                     :sets => 3, :reps => 8 },
                   { :name => "Preacher Curl",
                     :variant => "EZ-Bar",
                     :sets => 3, :reps => 8 },
                   { :name => "Triceps Extension",
                     :variant => "Dumbbell",
                     :sets => 3, :reps => 8 },
                   { :name => "Shrug",
                     :variant => "Dumbbell",
Johannes Knoedtel's avatar
Johannes Knoedtel committed
46
                   :sets => 3, :reps => 8 }]] }
derrotebaron's avatar
derrotebaron committed
47
  ```
Johannes Knoedtel's avatar
Johannes Knoedtel committed
48
49
50

2. Build the LaTeX-Source

derrotebaron's avatar
derrotebaron committed
51
52
53
  ```
  $ ./workoutcard.rb lower.workout > lower.tex
  ```
Johannes Knoedtel's avatar
Johannes Knoedtel committed
54
55
56

3. Compile it

derrotebaron's avatar
derrotebaron committed
57
58
59
  ```
  $ pdflatex lower.tex
  ```
Johannes Knoedtel's avatar
Johannes Knoedtel committed
60
61
62

4. Print it

derrotebaron's avatar
derrotebaron committed
63
64
65
  ```
  lpr lower.pdf
  ```
Johannes Knoedtel's avatar
Johannes Knoedtel committed
66
67
68
69
70
71
72
73
74
75
76

Dependencies
------------

- Ruby 2.1
- LaTeX, including packages:
    - textcomp
    - geometry
    - array
    - realboxes
    - xfrac