bread_calculator 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +162 -2
- data/bin/bread-calc +5 -36
- data/bread_calculator.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5ee571e444d4434bf4a4e2f64b9adb8e36f77e3
|
4
|
+
data.tar.gz: 36a0932e37107a14df6f4af01d4aa4ee0feb56de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e1fb24bb4da2e0bc23b61f1592c02e937604238d10ad31efd9750bc7fb7cc1cc40900246805f97650f9a6a73e04a4808919775520b2b3d983c628a02b76a7d
|
7
|
+
data.tar.gz: 180f92195733884d5a986ffa2aef459c23efe24cd1b5e58f4494dba21b0079e20ccac1ac2abda8d2a61ddf143347d83ba4dc23b553bb78a2ec3f7534a5ad9a3e
|
data/README.md
CHANGED
@@ -4,7 +4,16 @@ A ruby gem to calculate baker's percentages
|
|
4
4
|
|
5
5
|
Installation
|
6
6
|
---------
|
7
|
-
gem install bakers_percentage
|
7
|
+
`gem install bakers_percentage`
|
8
|
+
|
9
|
+
or, if you want the latest and the greatest,
|
10
|
+
or if you want the man page installed:
|
11
|
+
|
12
|
+
`git clone https://github.com/bread-calculator
|
13
|
+
cd bread-calculator
|
14
|
+
rake install`
|
15
|
+
|
16
|
+
(use sudo as necessary)
|
8
17
|
|
9
18
|
Runtime Requirements
|
10
19
|
---------
|
@@ -13,7 +22,10 @@ ruby >= 1.9.2
|
|
13
22
|
Build Requirements
|
14
23
|
---------
|
15
24
|
rake
|
16
|
-
|
25
|
+
|
26
|
+
Developer Requirements
|
27
|
+
---------
|
28
|
+
groff
|
17
29
|
|
18
30
|
Inspiration and History
|
19
31
|
---------
|
@@ -23,3 +35,151 @@ License
|
|
23
35
|
---------
|
24
36
|
© 2014 Noah Birnel
|
25
37
|
MIT license
|
38
|
+
|
39
|
+
Man page
|
40
|
+
---------
|
41
|
+
<html>
|
42
|
+
<head>
|
43
|
+
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
44
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
45
|
+
<meta name="Content-Style" content="text/css">
|
46
|
+
<title>bread-calc</title>
|
47
|
+
|
48
|
+
</head>
|
49
|
+
<body>
|
50
|
+
|
51
|
+
<h1 align="center">bread-calc</h1>
|
52
|
+
|
53
|
+
<a href="#NAME">NAME</a><br>
|
54
|
+
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
55
|
+
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
56
|
+
<a href="#OPTIONS">OPTIONS</a><br>
|
57
|
+
<a href="#EXAMPLES">EXAMPLES</a><br>
|
58
|
+
<a href="#FORMATS">FORMATS</a><br>
|
59
|
+
<a href="#SEE ALSO">SEE ALSO</a><br>
|
60
|
+
<a href="#BUGS">BUGS</a><br>
|
61
|
+
<a href="#LICENSE">LICENSE</a><br>
|
62
|
+
|
63
|
+
<hr>
|
64
|
+
|
65
|
+
|
66
|
+
<h2>NAME
|
67
|
+
<a name="NAME"></a>
|
68
|
+
</h2>
|
69
|
+
|
70
|
+
|
71
|
+
<p style="margin-left:11%; margin-top: 1em">bread-calc
|
72
|
+
− calculate baker’s percentages</p>
|
73
|
+
|
74
|
+
<h2>SYNOPSIS
|
75
|
+
<a name="SYNOPSIS"></a>
|
76
|
+
</h2>
|
77
|
+
|
78
|
+
|
79
|
+
<p style="margin-left:11%; margin-top: 1em"><b>bread-calc
|
80
|
+
[OPTIONS] [FILE]</b></p>
|
81
|
+
|
82
|
+
<h2>DESCRIPTION
|
83
|
+
<a name="DESCRIPTION"></a>
|
84
|
+
</h2>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<p style="margin-left:11%; margin-top: 1em"><b>bread-calc</b>
|
89
|
+
parses a nearly free-form bread recipe in file FILE, or from
|
90
|
+
standard in. By default, the canonical representation of the
|
91
|
+
recipe is printed to standard out. Optionally, the weight,
|
92
|
+
or bakers percentage formula can be generated, or the recipe
|
93
|
+
can by scaled up or down.</p>
|
94
|
+
|
95
|
+
<h2>OPTIONS
|
96
|
+
<a name="OPTIONS"></a>
|
97
|
+
</h2>
|
98
|
+
|
99
|
+
|
100
|
+
<p style="margin-left:11%; margin-top: 1em"><b>--help</b>
|
101
|
+
print this help</p>
|
102
|
+
|
103
|
+
|
104
|
+
<p style="margin-left:11%; margin-top: 1em"><b>--summary</b>
|
105
|
+
print a baker’s percentage summary</p>
|
106
|
+
|
107
|
+
|
108
|
+
<p style="margin-left:11%; margin-top: 1em"><b>--weight</b>
|
109
|
+
print the weight</p>
|
110
|
+
|
111
|
+
<p style="margin-left:11%; margin-top: 1em"><b>--scale-by
|
112
|
+
FACTOR</b> regenerate the recipe, scaling up or down by
|
113
|
+
FACTOR</p>
|
114
|
+
|
115
|
+
<h2>EXAMPLES
|
116
|
+
<a name="EXAMPLES"></a>
|
117
|
+
</h2>
|
118
|
+
|
119
|
+
|
120
|
+
<p style="margin-left:11%; margin-top: 1em"><b>bread-calc
|
121
|
+
--summary sample.recipe</b></p>
|
122
|
+
|
123
|
+
<h2>FORMATS
|
124
|
+
<a name="FORMATS"></a>
|
125
|
+
</h2>
|
126
|
+
|
127
|
+
|
128
|
+
<p style="margin-left:11%; margin-top: 1em">The recipe
|
129
|
+
format consists of a metadata prelude, and steps.</p>
|
130
|
+
|
131
|
+
<p style="margin-left:11%; margin-top: 1em">In prelude
|
132
|
+
lines, anything before a colon is considered to be the name
|
133
|
+
of a metadata field; anything after the colon is a value to
|
134
|
+
populate. Lines without colons are continuations of the
|
135
|
+
’notes’ field. I suggest having at least a
|
136
|
+
’name’ field.</p>
|
137
|
+
|
138
|
+
<p style="margin-left:11%; margin-top: 1em">A line starting
|
139
|
+
with a hyphen ends the prelude and starts the first
|
140
|
+
step.</p>
|
141
|
+
|
142
|
+
<p style="margin-left:11%; margin-top: 1em">Each step is
|
143
|
+
delimited by one or more blank lines.</p>
|
144
|
+
|
145
|
+
<p style="margin-left:11%; margin-top: 1em">Any line in a
|
146
|
+
step starting with a space or a blank is an ingredient,
|
147
|
+
consisting of quantity, units, and the ingredient itself.
|
148
|
+
<b>bread-calc</b> will attempt to guess at the type of
|
149
|
+
ingredient, but you can always force it by including one of
|
150
|
+
the words ’flour’, ’liquid’, or
|
151
|
+
’additive’ in the line.</p>
|
152
|
+
|
153
|
+
<h2>SEE ALSO
|
154
|
+
<a name="SEE ALSO"></a>
|
155
|
+
</h2>
|
156
|
+
|
157
|
+
|
158
|
+
<p style="margin-left:11%; margin-top: 1em"><i>ruby(1) <br>
|
159
|
+
http://en.wikipedia.org/wiki/Baker%27s_percentage <br>
|
160
|
+
http://rubygems.org/gems/bread_calculator</i></p>
|
161
|
+
|
162
|
+
<h2>BUGS
|
163
|
+
<a name="BUGS"></a>
|
164
|
+
</h2>
|
165
|
+
|
166
|
+
|
167
|
+
<p style="margin-left:11%; margin-top: 1em">It is
|
168
|
+
cheerfully assumed that all units are grams.</p>
|
169
|
+
|
170
|
+
<p style="margin-left:11%; margin-top: 1em">It is undefined
|
171
|
+
how ’liquid flour additive’ is parsed, but
|
172
|
+
don’t expect anything good.</p>
|
173
|
+
|
174
|
+
<h2>LICENSE
|
175
|
+
<a name="LICENSE"></a>
|
176
|
+
</h2>
|
177
|
+
|
178
|
+
|
179
|
+
<p style="margin-left:11%; margin-top: 1em">Copyright 2014
|
180
|
+
Noah Birnel</p>
|
181
|
+
|
182
|
+
<p style="margin-left:11%; margin-top: 1em">MIT License</p>
|
183
|
+
<hr>
|
184
|
+
</body>
|
185
|
+
</html>
|
data/bin/bread-calc
CHANGED
@@ -5,49 +5,18 @@ require 'bread_calculator'
|
|
5
5
|
|
6
6
|
def help status=true
|
7
7
|
puts <<EOF
|
8
|
-
|
9
|
-
|
10
|
-
SYNOPSIS
|
11
|
-
bread-calc [OPTIONS] [FILE]
|
12
|
-
DESCRIPTION
|
13
|
-
bread-calc parses a nearly free-form bread recipe in file FILE, or from
|
14
|
-
standard in. By default the canonical representation of the recipe is printed
|
15
|
-
to standard out. Optionally, the weight, or bakers percentage formula can be
|
16
|
-
generated, or the recipe can by scaled up or down.
|
17
|
-
OPTIONS:
|
8
|
+
USAGE: bread-calc [OPTIONS] [FILE]
|
9
|
+
where OPTIONS are any of:
|
18
10
|
--help
|
19
|
-
print this help
|
20
11
|
--summary
|
21
|
-
print a baker's percentage summary
|
22
12
|
--weight
|
23
|
-
print the weight
|
24
13
|
--scale-by FACTOR
|
25
|
-
regenerate the recipe, scaling up or down by FACTOR
|
26
|
-
FORMATS
|
27
|
-
The recipe format consists of a metadata prelude, and steps.
|
28
14
|
|
29
|
-
|
30
|
-
metadata field; anything after the colon is a value to populate. Lines
|
31
|
-
without colons are continuations of the 'notes' field. It is suggested to
|
32
|
-
have at least a 'name' field.
|
33
|
-
|
34
|
-
A line starting with a hyphen ends the prelude and starts the first step.
|
35
|
-
|
36
|
-
Each step is delimited by one or more blank lines.
|
37
|
-
|
38
|
-
Any line in a step starting with a space or a blank is an ingredient,
|
39
|
-
consisting of quantity, units, and the ingredient itself. bread-calc will
|
40
|
-
attempt to guess at the type of ingredient, but you can always force it by
|
41
|
-
including one of the words 'flour', 'liquid', or 'additive' in the line.
|
42
|
-
BUGS
|
43
|
-
It is cheerfully assumed that all units are grams.
|
44
|
-
|
45
|
-
Output is rather ugly.
|
15
|
+
Install the man page, or go to
|
46
16
|
|
47
|
-
|
48
|
-
anything good.
|
17
|
+
https://github.com/nbirnel/bread-calculator
|
49
18
|
|
50
|
-
|
19
|
+
for more detailed information.
|
51
20
|
EOF
|
52
21
|
|
53
22
|
exit status
|
data/bread_calculator.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'bread_calculator'
|
3
|
-
s.version = '0.2.
|
4
|
-
s.date = '2014-03-
|
3
|
+
s.version = '0.2.1'
|
4
|
+
s.date = '2014-03-11'
|
5
5
|
s.summary = "calculate baker's percentages"
|
6
6
|
s.description = "a gem and command-line wrapper to generate baker's
|
7
7
|
percentages from a bread recipe"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bread_calculator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Birnel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
a gem and command-line wrapper to generate baker's
|