README.md 1.96 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
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

```
$ cat lower.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",
                   :sets => 3, :reps => 8 }]] }
```

2. Build the LaTeX-Source

```
$ ./workoutcard.rb lower.workout > lower.tex
```

3. Compile it

```
$ pdflatex lower.tex
```

4. Print it

```
lpr lower.pdf
```

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

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