jekyll-cooklang-converter 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/clash/test-site/_expected/recipes/baked-ziti.html +2 -2
- data/clash/test-site/_recipes/baked-ziti.cook +1 -1
- data/clash/test-site/_site/recipes/baked-ziti.html +2 -2
- data/lib/jekyll/converters/cooklang.rb +30 -7
- data/lib/jekyll-cooklang-converter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12645bcaffa4192f683b66dba99bab13816c443e95bfc230aefe1300b3a34cb6
|
4
|
+
data.tar.gz: e41ce8b50f24b7ca9f78eb74016dc2a5802b90e7a87f05c95577ccfa2a2b9bf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4a582b365abf71907ca9b219835738be2a03339390e840a0cadb3d35c66b4686e6a75e86476c8749c55e6ed48cf9e20a8b4fec0209e76a6bbf07c09fe94645
|
7
|
+
data.tar.gz: 21e44551283bd5a9e2f4a01670a885bd19a654b7279a20e4910d2e7d8897f2392a42603903621983873319a706beabbbcf4c23a6846976dd420face48fda39fe
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h2>Ingredients</h2>
|
2
2
|
<ul>
|
3
|
-
<li><em>1 box</em> mushrooms</li>
|
3
|
+
<li><em>1/2 box</em> mushrooms</li>
|
4
4
|
<li><em>1 pound</em> ground sausage</li>
|
5
5
|
<li><em>some</em> garlic powder</li>
|
6
6
|
<li><em>some</em> italian seasoning</li>
|
@@ -47,6 +47,6 @@
|
|
47
47
|
<p>layer half of the cooked pasta into the bottom of a greased casserole dish. Ladle half of the meat + veggie mixture on top. Then, spread the cheese mixture from the previous step on top of everything. Layer sliced provolone on that, followed by the rest of the sauce, the rest of the pasta, and a final layer of mozarella cheese. Sprinkle the top with italian seasoning</p>
|
48
48
|
</li>
|
49
49
|
<li>
|
50
|
-
<p>put the dish in the preheated oven for . Then it's all ready!</p>
|
50
|
+
<p>put the dish in the preheated oven for 25 minutes. Then it's all ready!</p>
|
51
51
|
</li>
|
52
52
|
</ol>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
---
|
3
3
|
set a #pot of water on the stove, to boil (you'll need for pasta later), and preheat the oven to 350
|
4
4
|
|
5
|
-
cut @mushrooms{1%box} into slices, and sautee (no oil) in a pan over medium high heat until browned. Set aside
|
5
|
+
cut @mushrooms{1/2%box} into slices, and sautee (no oil) in a pan over medium high heat until browned. Set aside
|
6
6
|
|
7
7
|
brown @ground sausage{1%pound} in the same pan, seasoning with @garlic powder{}, @italian seasoning{}, and @chili powder{} set aside
|
8
8
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h2>Ingredients</h2>
|
2
2
|
<ul>
|
3
|
-
<li><em>1 box</em> mushrooms</li>
|
3
|
+
<li><em>1/2 box</em> mushrooms</li>
|
4
4
|
<li><em>1 pound</em> ground sausage</li>
|
5
5
|
<li><em>some</em> garlic powder</li>
|
6
6
|
<li><em>some</em> italian seasoning</li>
|
@@ -47,6 +47,6 @@
|
|
47
47
|
<p>layer half of the cooked pasta into the bottom of a greased casserole dish. Ladle half of the meat + veggie mixture on top. Then, spread the cheese mixture from the previous step on top of everything. Layer sliced provolone on that, followed by the rest of the sauce, the rest of the pasta, and a final layer of mozarella cheese. Sprinkle the top with italian seasoning</p>
|
48
48
|
</li>
|
49
49
|
<li>
|
50
|
-
<p>put the dish in the preheated oven for . Then it's all ready!</p>
|
50
|
+
<p>put the dish in the preheated oven for 25 minutes. Then it's all ready!</p>
|
51
51
|
</li>
|
52
52
|
</ol>
|
@@ -12,9 +12,17 @@ module Jekyll
|
|
12
12
|
|
13
13
|
class Ingredient < ToHTML
|
14
14
|
def initialize(quantity, unit, name)
|
15
|
-
@name = name
|
16
|
-
@unit = unit
|
17
|
-
@quantity = quantity
|
15
|
+
@name = name.to_s
|
16
|
+
@unit = unit.to_s
|
17
|
+
@quantity = if quantity.respond_to? :rationalize
|
18
|
+
if quantity.rationalize(0.1).denominator == 1
|
19
|
+
quantity.to_s
|
20
|
+
else
|
21
|
+
quantity.rationalize(0.1).to_s
|
22
|
+
end
|
23
|
+
else
|
24
|
+
quantity.to_s
|
25
|
+
end
|
18
26
|
end
|
19
27
|
|
20
28
|
def to_html
|
@@ -23,10 +31,23 @@ module Jekyll
|
|
23
31
|
end
|
24
32
|
end
|
25
33
|
|
34
|
+
class Timer < ToHTML
|
35
|
+
def initialize(quantity, unit, name)
|
36
|
+
@name = name.to_s
|
37
|
+
@unit = unit.to_s
|
38
|
+
@quantity = quantity.to_s
|
39
|
+
end
|
40
|
+
|
41
|
+
def to_html
|
42
|
+
return "<em>#{@quantity} #{@unit}</em>" if @unit.empty?
|
43
|
+
"<em>#{@quantity} #{@unit}</em> (#{@name})"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
26
47
|
class CookWare < ToHTML
|
27
48
|
def initialize(quantity, name)
|
28
|
-
@name = name
|
29
|
-
@quantity = quantity
|
49
|
+
@name = name.to_s
|
50
|
+
@quantity = quantity.to_s
|
30
51
|
end
|
31
52
|
|
32
53
|
def to_html
|
@@ -69,6 +90,8 @@ module Jekyll
|
|
69
90
|
substep["name"]
|
70
91
|
when "ingredient"
|
71
92
|
substep["name"]
|
93
|
+
when "timer"
|
94
|
+
"#{substep["quantity"]} #{substep["units"]}"
|
72
95
|
when "text"
|
73
96
|
substep["value"]
|
74
97
|
end
|
@@ -97,13 +120,13 @@ module Jekyll
|
|
97
120
|
ingredients = recipe["steps"].flatten.select { |item|
|
98
121
|
item["type"] == "ingredient"
|
99
122
|
}.map { |item|
|
100
|
-
Ingredient.new(item["quantity"]
|
123
|
+
Ingredient.new(item["quantity"], item["units"], item["name"])
|
101
124
|
}
|
102
125
|
|
103
126
|
cookware = recipe["steps"].flatten.select { |item|
|
104
127
|
item["type"] == "cookware"
|
105
128
|
}.map { |item|
|
106
|
-
CookWare.new(item["quantity"]
|
129
|
+
CookWare.new(item["quantity"], item["name"])
|
107
130
|
}
|
108
131
|
|
109
132
|
steps = recipe["steps"].map do |step|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-cooklang-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BraeTroutman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|