toji 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bb2c0d3045f4f5106baff4e11e3e68e929fc61bd9367001e262d40176a340ae
4
- data.tar.gz: c1749c3d61a4e71632a9856a686aa441fef7103ab8ae1d02bc69fef753261eaa
3
+ metadata.gz: 49e614ba76556c1a4bca653e4653f683aad26d13b44ca2e2fcd112671c556104
4
+ data.tar.gz: 7eb635c7a7f566e85b1144c63ddb725b8bb7d103482efd7b73dd79ae6ab6fbb7
5
5
  SHA512:
6
- metadata.gz: 77c23ecf85fa60d7d37eae8dc1d937f1f5b636dc4dc28ac87d3614dbe7d94a072734463d2ab86f3d52152e6dea0de5e82921b5ba753b3ab07be9fd1ace93a7a5
7
- data.tar.gz: c075aee25381874ff10298801a0a5b75d0b2a4801fc244ecfeb7cbe60a4ce2f0e5b28f5a344a10165adf98631f2e4f54c278099d3372128a73e6c6d005522814
6
+ metadata.gz: 0e375faf007e1eb65146a575321b82ced96b917399cec703e96d0c563a27c9af4ffffc18d5cbfd3e792ff6b31c72ab3077c0d0924124e6f3842c449c742339b5
7
+ data.tar.gz: c43f3becbb5e7e45bb25a3da75c478911aea408c0003a19bbfa4ed09552269bfd4df0a807f3d86b34496bde2ea0a083dce33520320bd31227316bde7baaf4e0e
data/README.md CHANGED
@@ -1,8 +1,15 @@
1
1
  # Toji
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/toji`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Management tools for brewing japanese sake.
4
+
5
+ - Koji making recipe and weight estimation.
6
+ - Koji making progress graph.
7
+ - Step mashing recipe and weight estimation.
8
+ - Shubo progress graph.
9
+ - Moromi progress graph.
10
+ - Moromi BMD graph.
11
+ - Moromi A-B graph.
4
12
 
5
- TODO: Delete this and the text above, and describe your gem
6
13
 
7
14
  ## Installation
8
15
 
@@ -24,15 +31,10 @@ Or install it yourself as:
24
31
 
25
32
  TODO: Write usage instructions here
26
33
 
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
34
 
33
35
  ## Contributing
34
36
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/toji.
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yoshida-eth0/ruby-toji.
36
38
 
37
39
  ## License
38
40
 
@@ -6,11 +6,11 @@ koji = Toji::Ingredient::Koji.expected(100, rice_rate: Toji::Recipe::RiceRate::S
6
6
  table = Terminal::Table.new do |t|
7
7
  t << ["", "分量", "白米を基準とした歩合"]
8
8
  t << :separator
9
- t << ["麹", koji.dekoji, 1.0 + koji.dekoji_rate]
10
- t << [" 蒸米", koji.steamed, 1.0 + koji.steamed_rate]
11
- t << [" 白米", koji.raw, 1.0]
12
- t << [" 汲水", koji.soaking_water, koji.soaked_rate]
13
- t << [" 種麹", koji.tanekoji, koji.tanekoji_rate]
9
+ t << ["麹", koji.dekoji&.round(2), (1.0 + koji.dekoji_rate)&.round(2)]
10
+ t << [" 蒸米", koji.steamed&.round(2), (1.0 + koji.steamed_rate)&.round(2)]
11
+ t << [" 白米", koji.raw&.round(2), 1.0]
12
+ t << [" 汲水", koji.soaking_water&.round(2), koji.soaked_rate&.round(2)]
13
+ t << [" 種麹", koji.tanekoji&.round(2), koji.tanekoji_rate&.round(2)]
14
14
  end
15
15
  puts table
16
16
  puts
@@ -18,17 +18,17 @@ puts
18
18
  table = Terminal::Table.new do |t|
19
19
  t << ["工程", "原料", "分量"]
20
20
  t << :separator
21
- t << ["洗米・浸漬", "白米", koji.raw]
22
- t << ["", "吸水増加量", koji.soaking_water]
21
+ t << ["洗米・浸漬", "白米", koji.raw&.round(2)]
22
+ t << ["", "吸水増加量", koji.soaking_water&.round(2)]
23
23
  t << :separator
24
- t << ["水切り", "浸漬米", koji.soaked]
25
- t << ["", "蒸発・炊飯前の汲水", koji.steaming_water]
24
+ t << ["水切り", "浸漬米", koji.soaked&.round(2)]
25
+ t << ["", "蒸発・炊飯前の汲水", koji.steaming_water&.round(2)]
26
26
  t << :separator
27
- t << ["蒸し", "蒸米", koji.steamed]
27
+ t << ["蒸し", "蒸米", koji.steamed&.round(2)]
28
28
  t << :separator
29
- t << ["放冷・引込み", "蒸米", koji.cooled]
30
- t << ["", "種麹", koji.tanekoji]
29
+ t << ["放冷・引込み", "蒸米", koji.cooled&.round(2)]
30
+ t << ["", "種麹", koji.tanekoji&.round(2)]
31
31
  t << :separator
32
- t << ["製麹", "麹", koji.dekoji]
32
+ t << ["製麹", "麹", koji.dekoji&.round(2)]
33
33
  end
34
34
  puts table
data/example/moromi.ipynb CHANGED
@@ -2,7 +2,7 @@
2
2
  "cells": [
3
3
  {
4
4
  "cell_type": "code",
5
- "execution_count": 1,
5
+ "execution_count": 2,
6
6
  "metadata": {
7
7
  "scrolled": false
8
8
  },
@@ -16,25 +16,25 @@
16
16
  " </script>\n",
17
17
  "\n",
18
18
  "\n",
19
- "<div id=\"95271cc2-db63-48a2-a6db-986b18f19135\" style=\"height: 100%; width: 100%;\"></div>\n",
19
+ "<div id=\"c10430b3-2705-4de4-9852-7c5c48ca3285\" style=\"height: 100%; width: 100%;\"></div>\n",
20
20
  "\n",
21
21
  "<script>\n",
22
22
  " require(['plotly'], function(Plotly) { \n",
23
23
  "Plotly.newPlot(\n",
24
- " '95271cc2-db63-48a2-a6db-986b18f19135',\n",
24
+ " 'c10430b3-2705-4de4-9852-7c5c48ca3285',\n",
25
25
  " [{\"x\":[0.0,1.0,86400.0,172800.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[14.8,11.0,14.3,11.3,6.9,10.6,7.5,8.0,9.1,10.4,11.9,12.3,13.1,13.1,12.9,12.8,12.9,12.6,12.0,11.2,10.2,9.7,9.8,9.1,8.4,8.1,8.3,8.1],\"text\":[\"01/16 00:00\",\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"temps\",\"line\":{\"shape\":\"linear\"}},{\"x\":[0.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[9,9,8.5,9,6,7,7,8,8,7.5,7.5,7.5,7.0,8.0,8.0,7.0,7.0,6.5,7.0,8.0,6.0,5.0,5.0,7.0,6.0],\"text\":[\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"room_temp\",\"line\":{\"shape\":\"linear\"}},{\"x\":[604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0],\"y\":[8.6,8.0,7.2,5.8,4.8,4.0,3.4,2.7,2.1,1.7000000000000002,1.3,0.8,0.5,0.30000000000000004,0.2,-0.0],\"text\":[\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\"],\"name\":\"baume\",\"line\":{\"shape\":\"linear\"}},{\"x\":[691200.0,777600.0,864000.0,1036800.0,1123200.0,1209600.0,1296000.0,1641600.0,1814400.0],\"y\":[4.8,6.75,7.992,10.7,11.6,12.7,13.7,16.0,16.3],\"text\":[\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/04 00:00\",\"02/06 00:00\"],\"name\":\"alcohol\",\"line\":{\"shape\":\"linear\"}}],\n",
26
- " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600,1728000,1814400,1900800,1987200,2073600],\"ticktext\":[\"soe\",\"odori\",\"odori\",\"naka\",\"tome\",2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]},\"annotations\":[{\"x\":0.0,\"y\":14.8,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"soe\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":259200.0,\"y\":6.9,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"naka\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":345600.0,\"y\":7.5,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"tome\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\n",
26
+ " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600,1728000,1814400,1900800,1987200,2073600],\"ticktext\":[\"soe\",\"odori\",\"odori\",\"naka\",\"tome\",2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]},\"annotations\":[]},\n",
27
27
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
28
28
  ")\n",
29
29
  "\n",
30
30
  "window.addEventListener('resize', function() {\n",
31
- " Plotly.Plots.resize(document.getElementById('95271cc2-db63-48a2-a6db-986b18f19135'))\n",
31
+ " Plotly.Plots.resize(document.getElementById('c10430b3-2705-4de4-9852-7c5c48ca3285'))\n",
32
32
  "})\n",
33
33
  " }) \n",
34
34
  "</script>"
35
35
  ],
36
36
  "text/plain": [
37
- "#<Plotly::Offline::HTML:0x00007ff8ff12bf10 @id=\"95271cc2-db63-48a2-a6db-986b18f19135\", @data=[{:x=>[0.0, 1.0, 86400.0, 172800.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[14.8, 11.0, 14.3, 11.3, 6.9, 10.6, 7.5, 8.0, 9.1, 10.4, 11.9, 12.3, 13.1, 13.1, 12.9, 12.8, 12.9, 12.6, 12.0, 11.2, 10.2, 9.7, 9.8, 9.1, 8.4, 8.1, 8.3, 8.1], :text=>[\"01/16 00:00\", \"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>:temps, :line=>{:shape=>:linear}}, {:x=>[0.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[9, 9, 8.5, 9, 6, 7, 7, 8, 8, 7.5, 7.5, 7.5, 7.0, 8.0, 8.0, 7.0, 7.0, 6.5, 7.0, 8.0, 6.0, 5.0, 5.0, 7.0, 6.0], :text=>[\"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>:room_temp, :line=>{:shape=>:linear}}, {:x=>[604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0], :y=>[8.6, 8.0, 7.2, 5.8, 4.8, 4.0, 3.4, 2.7, 2.1, 1.7000000000000002, 1.3, 0.8, 0.5, 0.30000000000000004, 0.2, -0.0], :text=>[\"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\"], :name=>:baume, :line=>{:shape=>:linear}}, {:x=>[691200.0, 777600.0, 864000.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1641600.0, 1814400.0], :y=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :text=>[\"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/04 00:00\", \"02/06 00:00\"], :name=>:alcohol, :line=>{:shape=>:linear}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600, 1728000, 1814400, 1900800, 1987200, 2073600], :ticktext=>[:soe, :odori, :odori, :naka, :tome, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}, :annotations=>[{:x=>0.0, :y=>14.8, :xref=>\"x\", :yref=>\"y\", :text=>:soe, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>259200.0, :y=>6.9, :xref=>\"x\", :yref=>\"y\", :text=>:naka, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>345600.0, :y=>7.5, :xref=>\"x\", :yref=>\"y\", :text=>:tome, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
37
+ "#<Plotly::Offline::HTML:0x00007fdaf30c3c50 @id=\"c10430b3-2705-4de4-9852-7c5c48ca3285\", @data=[{:x=>[0.0, 1.0, 86400.0, 172800.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[14.8, 11.0, 14.3, 11.3, 6.9, 10.6, 7.5, 8.0, 9.1, 10.4, 11.9, 12.3, 13.1, 13.1, 12.9, 12.8, 12.9, 12.6, 12.0, 11.2, 10.2, 9.7, 9.8, 9.1, 8.4, 8.1, 8.3, 8.1], :text=>[\"01/16 00:00\", \"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>:temps, :line=>{:shape=>:linear}}, {:x=>[0.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[9, 9, 8.5, 9, 6, 7, 7, 8, 8, 7.5, 7.5, 7.5, 7.0, 8.0, 8.0, 7.0, 7.0, 6.5, 7.0, 8.0, 6.0, 5.0, 5.0, 7.0, 6.0], :text=>[\"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>:room_temp, :line=>{:shape=>:linear}}, {:x=>[604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0], :y=>[8.6, 8.0, 7.2, 5.8, 4.8, 4.0, 3.4, 2.7, 2.1, 1.7000000000000002, 1.3, 0.8, 0.5, 0.30000000000000004, 0.2, -0.0], :text=>[\"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\"], :name=>:baume, :line=>{:shape=>:linear}}, {:x=>[691200.0, 777600.0, 864000.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1641600.0, 1814400.0], :y=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :text=>[\"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/04 00:00\", \"02/06 00:00\"], :name=>:alcohol, :line=>{:shape=>:linear}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600, 1728000, 1814400, 1900800, 1987200, 2073600], :ticktext=>[:soe, :odori, :odori, :naka, :tome, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
38
38
  ]
39
39
  },
40
40
  "metadata": {},
@@ -49,25 +49,25 @@
49
49
  " </script>\n",
50
50
  "\n",
51
51
  "\n",
52
- "<div id=\"9771971d-6961-4ef2-ab8e-b8e0e5c410a4\" style=\"height: 100%; width: 100%;\"></div>\n",
52
+ "<div id=\"afa53933-7db0-4dab-a85d-ebe4a405c08b\" style=\"height: 100%; width: 100%;\"></div>\n",
53
53
  "\n",
54
54
  "<script>\n",
55
55
  " require(['plotly'], function(Plotly) { \n",
56
56
  "Plotly.newPlot(\n",
57
- " '9771971d-6961-4ef2-ab8e-b8e0e5c410a4',\n",
57
+ " 'afa53933-7db0-4dab-a85d-ebe4a405c08b',\n",
58
58
  " [{\"x\":[259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1296000,1382400,1468800,1555200,1641600],\"y\":[34.4,40.0,43.2,40.6,38.4,36.0,34.0,29.700000000000003,25.200000000000003,22.1,18.2,12.8,8.5,5.4,3.8000000000000003,-0.0],\"text\":[\"2019-01-23 00:00:00 +0900\\u003cbr /\\u003emoromi day=4, be=8.6, bmd=34.4\",\"2019-01-24 00:00:00 +0900\\u003cbr /\\u003emoromi day=5, be=8.0, bmd=40.0\",\"2019-01-25 00:00:00 +0900\\u003cbr /\\u003emoromi day=6, be=7.2, bmd=43.2\",\"2019-01-26 00:00:00 +0900\\u003cbr /\\u003emoromi day=7, be=5.8, bmd=40.6\",\"2019-01-27 00:00:00 +0900\\u003cbr /\\u003emoromi day=8, be=4.8, bmd=38.4\",\"2019-01-28 00:00:00 +0900\\u003cbr /\\u003emoromi day=9, be=4.0, bmd=36.0\",\"2019-01-29 00:00:00 +0900\\u003cbr /\\u003emoromi day=10, be=3.4, bmd=34.0\",\"2019-01-30 00:00:00 +0900\\u003cbr /\\u003emoromi day=11, be=2.7, bmd=29.700000000000003\",\"2019-01-31 00:00:00 +0900\\u003cbr /\\u003emoromi day=12, be=2.1, bmd=25.200000000000003\",\"2019-02-01 00:00:00 +0900\\u003cbr /\\u003emoromi day=13, be=1.7000000000000002, bmd=22.1\",\"2019-02-02 00:00:00 +0900\\u003cbr /\\u003emoromi day=14, be=1.3, bmd=18.2\",\"2019-02-04 00:00:00 +0900\\u003cbr /\\u003emoromi day=16, be=0.8, bmd=12.8\",\"2019-02-05 00:00:00 +0900\\u003cbr /\\u003emoromi day=17, be=0.5, bmd=8.5\",\"2019-02-06 00:00:00 +0900\\u003cbr /\\u003emoromi day=18, be=0.30000000000000004, bmd=5.4\",\"2019-02-07 00:00:00 +0900\\u003cbr /\\u003emoromi day=19, be=0.2, bmd=3.8000000000000003\",\"2019-02-08 00:00:00 +0900\\u003cbr /\\u003emoromi day=20, be=-0.0, bmd=-0.0\"],\"name\":\"actual\"}],\n",
59
59
  " {\"xaxis\":{\"title\":\"Moromi day\",\"dtick\":86400,\"range\":[86400,1728000],\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600],\"ticktext\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]},\"yaxis\":{\"title\":\"BMD\"}},\n",
60
60
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
61
61
  ")\n",
62
62
  "\n",
63
63
  "window.addEventListener('resize', function() {\n",
64
- " Plotly.Plots.resize(document.getElementById('9771971d-6961-4ef2-ab8e-b8e0e5c410a4'))\n",
64
+ " Plotly.Plots.resize(document.getElementById('afa53933-7db0-4dab-a85d-ebe4a405c08b'))\n",
65
65
  "})\n",
66
66
  " }) \n",
67
67
  "</script>"
68
68
  ],
69
69
  "text/plain": [
70
- "#<Plotly::Offline::HTML:0x00007ff8fd9e4488 @id=\"9771971d-6961-4ef2-ab8e-b8e0e5c410a4\", @data=[{:x=>[259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1296000, 1382400, 1468800, 1555200, 1641600], :y=>[34.4, 40.0, 43.2, 40.6, 38.4, 36.0, 34.0, 29.700000000000003, 25.200000000000003, 22.1, 18.2, 12.8, 8.5, 5.4, 3.8000000000000003, -0.0], :text=>[\"2019-01-23 00:00:00 +0900<br />moromi day=4, be=8.6, bmd=34.4\", \"2019-01-24 00:00:00 +0900<br />moromi day=5, be=8.0, bmd=40.0\", \"2019-01-25 00:00:00 +0900<br />moromi day=6, be=7.2, bmd=43.2\", \"2019-01-26 00:00:00 +0900<br />moromi day=7, be=5.8, bmd=40.6\", \"2019-01-27 00:00:00 +0900<br />moromi day=8, be=4.8, bmd=38.4\", \"2019-01-28 00:00:00 +0900<br />moromi day=9, be=4.0, bmd=36.0\", \"2019-01-29 00:00:00 +0900<br />moromi day=10, be=3.4, bmd=34.0\", \"2019-01-30 00:00:00 +0900<br />moromi day=11, be=2.7, bmd=29.700000000000003\", \"2019-01-31 00:00:00 +0900<br />moromi day=12, be=2.1, bmd=25.200000000000003\", \"2019-02-01 00:00:00 +0900<br />moromi day=13, be=1.7000000000000002, bmd=22.1\", \"2019-02-02 00:00:00 +0900<br />moromi day=14, be=1.3, bmd=18.2\", \"2019-02-04 00:00:00 +0900<br />moromi day=16, be=0.8, bmd=12.8\", \"2019-02-05 00:00:00 +0900<br />moromi day=17, be=0.5, bmd=8.5\", \"2019-02-06 00:00:00 +0900<br />moromi day=18, be=0.30000000000000004, bmd=5.4\", \"2019-02-07 00:00:00 +0900<br />moromi day=19, be=0.2, bmd=3.8000000000000003\", \"2019-02-08 00:00:00 +0900<br />moromi day=20, be=-0.0, bmd=-0.0\"], :name=>:actual}], @layout={:xaxis=>{:title=>\"Moromi day\", :dtick=>86400, :range=>[86400, 1728000], :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, :yaxis=>{:title=>\"BMD\"}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
70
+ "#<Plotly::Offline::HTML:0x00007fdaf4506370 @id=\"afa53933-7db0-4dab-a85d-ebe4a405c08b\", @data=[{:x=>[259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1296000, 1382400, 1468800, 1555200, 1641600], :y=>[34.4, 40.0, 43.2, 40.6, 38.4, 36.0, 34.0, 29.700000000000003, 25.200000000000003, 22.1, 18.2, 12.8, 8.5, 5.4, 3.8000000000000003, -0.0], :text=>[\"2019-01-23 00:00:00 +0900<br />moromi day=4, be=8.6, bmd=34.4\", \"2019-01-24 00:00:00 +0900<br />moromi day=5, be=8.0, bmd=40.0\", \"2019-01-25 00:00:00 +0900<br />moromi day=6, be=7.2, bmd=43.2\", \"2019-01-26 00:00:00 +0900<br />moromi day=7, be=5.8, bmd=40.6\", \"2019-01-27 00:00:00 +0900<br />moromi day=8, be=4.8, bmd=38.4\", \"2019-01-28 00:00:00 +0900<br />moromi day=9, be=4.0, bmd=36.0\", \"2019-01-29 00:00:00 +0900<br />moromi day=10, be=3.4, bmd=34.0\", \"2019-01-30 00:00:00 +0900<br />moromi day=11, be=2.7, bmd=29.700000000000003\", \"2019-01-31 00:00:00 +0900<br />moromi day=12, be=2.1, bmd=25.200000000000003\", \"2019-02-01 00:00:00 +0900<br />moromi day=13, be=1.7000000000000002, bmd=22.1\", \"2019-02-02 00:00:00 +0900<br />moromi day=14, be=1.3, bmd=18.2\", \"2019-02-04 00:00:00 +0900<br />moromi day=16, be=0.8, bmd=12.8\", \"2019-02-05 00:00:00 +0900<br />moromi day=17, be=0.5, bmd=8.5\", \"2019-02-06 00:00:00 +0900<br />moromi day=18, be=0.30000000000000004, bmd=5.4\", \"2019-02-07 00:00:00 +0900<br />moromi day=19, be=0.2, bmd=3.8000000000000003\", \"2019-02-08 00:00:00 +0900<br />moromi day=20, be=-0.0, bmd=-0.0\"], :name=>:actual}], @layout={:xaxis=>{:title=>\"Moromi day\", :dtick=>86400, :range=>[86400, 1728000], :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, :yaxis=>{:title=>\"BMD\"}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
71
71
  ]
72
72
  },
73
73
  "metadata": {},
@@ -82,25 +82,25 @@
82
82
  " </script>\n",
83
83
  "\n",
84
84
  "\n",
85
- "<div id=\"0e4dc488-7896-4278-8904-6ad2a4e29b8c\" style=\"height: 100%; width: 100%;\"></div>\n",
85
+ "<div id=\"26a57095-09b3-4249-9eb3-3b3901d31e36\" style=\"height: 100%; width: 100%;\"></div>\n",
86
86
  "\n",
87
87
  "<script>\n",
88
88
  " require(['plotly'], function(Plotly) { \n",
89
89
  "Plotly.newPlot(\n",
90
- " '0e4dc488-7896-4278-8904-6ad2a4e29b8c',\n",
90
+ " '26a57095-09b3-4249-9eb3-3b3901d31e36',\n",
91
91
  " [{\"x\":[4.8,6.75,7.992,10.7,11.6,12.7,13.7,16.0,16.3],\"y\":[8.0,7.2,5.8,4.0,3.4,2.7,2.1,0.8,0.30000000000000004],\"text\":[\"2019-01-24 00:00:00 +0900\\u003cbr /\\u003ealc=4.8, be=8.0\",\"2019-01-25 00:00:00 +0900\\u003cbr /\\u003ealc=6.75, be=7.2\",\"2019-01-26 00:00:00 +0900\\u003cbr /\\u003ealc=7.992, be=5.8\",\"2019-01-28 00:00:00 +0900\\u003cbr /\\u003ealc=10.7, be=4.0\",\"2019-01-29 00:00:00 +0900\\u003cbr /\\u003ealc=11.6, be=3.4\",\"2019-01-30 00:00:00 +0900\\u003cbr /\\u003ealc=12.7, be=2.7\",\"2019-01-31 00:00:00 +0900\\u003cbr /\\u003ealc=13.7, be=2.1\",\"2019-02-04 00:00:00 +0900\\u003cbr /\\u003ealc=16.0, be=0.8\",\"2019-02-06 00:00:00 +0900\\u003cbr /\\u003ealc=16.3, be=0.30000000000000004\"],\"name\":\"actual\"},{\"x\":[16.05,4.049999999999999],\"y\":[0.0,8.0],\"name\":\"+3.0 16.5\"},{\"x\":[16.55,4.549999999999999],\"y\":[0.0,8.0],\"name\":\"+3.0 17.0\"},{\"x\":[16.5,4.5],\"y\":[0.0,8.0],\"name\":\"+0.0 16.5\"}],\n",
92
92
  " {\"xaxis\":{\"title\":\"Alcohol\",\"dtick\":2,\"range\":[0,20]},\"yaxis\":{\"title\":\"Baume\",\"dtick\":1,\"range\":[0,10]}},\n",
93
93
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
94
94
  ")\n",
95
95
  "\n",
96
96
  "window.addEventListener('resize', function() {\n",
97
- " Plotly.Plots.resize(document.getElementById('0e4dc488-7896-4278-8904-6ad2a4e29b8c'))\n",
97
+ " Plotly.Plots.resize(document.getElementById('26a57095-09b3-4249-9eb3-3b3901d31e36'))\n",
98
98
  "})\n",
99
99
  " }) \n",
100
100
  "</script>"
101
101
  ],
102
102
  "text/plain": [
103
- "#<Plotly::Offline::HTML:0x00007ff8ff143908 @id=\"0e4dc488-7896-4278-8904-6ad2a4e29b8c\", @data=[{:x=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :y=>[8.0, 7.2, 5.8, 4.0, 3.4, 2.7, 2.1, 0.8, 0.30000000000000004], :text=>[\"2019-01-24 00:00:00 +0900<br />alc=4.8, be=8.0\", \"2019-01-25 00:00:00 +0900<br />alc=6.75, be=7.2\", \"2019-01-26 00:00:00 +0900<br />alc=7.992, be=5.8\", \"2019-01-28 00:00:00 +0900<br />alc=10.7, be=4.0\", \"2019-01-29 00:00:00 +0900<br />alc=11.6, be=3.4\", \"2019-01-30 00:00:00 +0900<br />alc=12.7, be=2.7\", \"2019-01-31 00:00:00 +0900<br />alc=13.7, be=2.1\", \"2019-02-04 00:00:00 +0900<br />alc=16.0, be=0.8\", \"2019-02-06 00:00:00 +0900<br />alc=16.3, be=0.30000000000000004\"], :name=>:actual}, {:x=>[16.05, 4.049999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 16.5\"}, {:x=>[16.55, 4.549999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 17.0\"}, {:x=>[16.5, 4.5], :y=>[0.0, 8.0], :name=>\"+0.0 16.5\"}], @layout={:xaxis=>{:title=>\"Alcohol\", :dtick=>2, :range=>[0, 20]}, :yaxis=>{:title=>\"Baume\", :dtick=>1, :range=>[0, 10]}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
103
+ "#<Plotly::Offline::HTML:0x00007fdaf452f590 @id=\"26a57095-09b3-4249-9eb3-3b3901d31e36\", @data=[{:x=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :y=>[8.0, 7.2, 5.8, 4.0, 3.4, 2.7, 2.1, 0.8, 0.30000000000000004], :text=>[\"2019-01-24 00:00:00 +0900<br />alc=4.8, be=8.0\", \"2019-01-25 00:00:00 +0900<br />alc=6.75, be=7.2\", \"2019-01-26 00:00:00 +0900<br />alc=7.992, be=5.8\", \"2019-01-28 00:00:00 +0900<br />alc=10.7, be=4.0\", \"2019-01-29 00:00:00 +0900<br />alc=11.6, be=3.4\", \"2019-01-30 00:00:00 +0900<br />alc=12.7, be=2.7\", \"2019-01-31 00:00:00 +0900<br />alc=13.7, be=2.1\", \"2019-02-04 00:00:00 +0900<br />alc=16.0, be=0.8\", \"2019-02-06 00:00:00 +0900<br />alc=16.3, be=0.30000000000000004\"], :name=>:actual}, {:x=>[16.05, 4.049999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 16.5\"}, {:x=>[16.55, 4.549999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 17.0\"}, {:x=>[16.5, 4.5], :y=>[0.0, 8.0], :name=>\"+0.0 16.5\"}], @layout={:xaxis=>{:title=>\"Alcohol\", :dtick=>2, :range=>[0, 20]}, :yaxis=>{:title=>\"Baume\", :dtick=>1, :range=>[0, 10]}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
104
104
  ]
105
105
  },
106
106
  "metadata": {},
@@ -109,10 +109,10 @@
109
109
  {
110
110
  "data": {
111
111
  "text/plain": [
112
- "#<CZTop::Socket::PUB:0x7ff9018ebce0 last_endpoint=\"tcp://127.0.0.1:62137\">"
112
+ "#<CZTop::Socket::PUB:0x7fdaf259d730 last_endpoint=\"tcp://127.0.0.1:62137\">"
113
113
  ]
114
114
  },
115
- "execution_count": 1,
115
+ "execution_count": 2,
116
116
  "metadata": {},
117
117
  "output_type": "execute_result"
118
118
  }
@@ -123,7 +123,7 @@
123
123
  "require 'rbplotly'\n",
124
124
  "\n",
125
125
  "moromi = Toji::Product::Moromi.template\n",
126
- "moromi.progress.plot.show\n",
126
+ "moromi.progress(enable_annotations: false).plot.show\n",
127
127
  "moromi.bmd.plot.show\n",
128
128
  "\n",
129
129
  "moromi.ab(1.5)\n",
@@ -7,9 +7,9 @@ rice = Toji::Ingredient::Rice.expected(100, rice_rate: Toji::Recipe::RiceRate::C
7
7
  table = Terminal::Table.new do |t|
8
8
  t << ["", "分量", "白米を基準とした歩合"]
9
9
  t << :separator
10
- t << ["蒸米", rice.steamed, 1.0 + rice.steamed_rate]
11
- t << [" 白米", rice.raw, 1.0]
12
- t << [" 汲水", rice.soaking_water, rice.soaked_rate]
10
+ t << ["蒸米", rice.steamed&.round(2), (1.0 + rice.steamed_rate)&.round(2)]
11
+ t << [" 白米", rice.raw&.round(2), 1.0]
12
+ t << [" 汲水", rice.soaking_water&.round(2), rice.soaked_rate&.round(2)]
13
13
  end
14
14
  puts table
15
15
  puts
@@ -17,12 +17,12 @@ puts
17
17
  table = Terminal::Table.new do |t|
18
18
  t << ["工程", "原料", "分量"]
19
19
  t << :separator
20
- t << ["洗米・浸漬", "白米", rice.raw]
21
- t << ["", "吸水増加量", rice.soaking_water]
20
+ t << ["洗米・浸漬", "白米", rice.raw&.round(2)]
21
+ t << ["", "吸水増加量", rice.soaking_water&.round(2)]
22
22
  t << :separator
23
- t << ["水切り", "浸漬米", rice.soaked]
24
- t << ["", "蒸発・炊飯前の汲水", rice.steaming_water]
23
+ t << ["水切り", "浸漬米", rice.soaked&.round(2)]
24
+ t << ["", "蒸発・炊飯前の汲水", rice.steaming_water&.round(2)]
25
25
  t << :separator
26
- t << ["蒸し", "蒸米", rice.steamed]
26
+ t << ["蒸し", "蒸米", rice.steamed&.round(2)]
27
27
  end
28
28
  puts table
@@ -2,8 +2,11 @@ module Toji
2
2
  module Graph
3
3
  class Progress
4
4
 
5
- def initialize(product)
5
+ attr_accessor :enable_annotations
6
+
7
+ def initialize(product, enable_annotations: true)
6
8
  @product = product
9
+ @enable_annotations = enable_annotations
7
10
  end
8
11
 
9
12
  def data(keys=nil)
@@ -75,7 +78,7 @@ module Toji
75
78
  tickvals: @product.days.times.map{|d| d*Product::Job::DAY},
76
79
  ticktext: @product.day_labels
77
80
  },
78
- annotations: annotations,
81
+ annotations: @enable_annotations ? annotations : [],
79
82
  }
80
83
  )
81
84
  end
@@ -4,7 +4,7 @@ module Toji
4
4
  def job_reader(*args)
5
5
  args.each {|arg|
6
6
  define_method(arg) {
7
- @jobs[arg]
7
+ self[arg]
8
8
  }
9
9
  }
10
10
  end
@@ -82,8 +82,8 @@ module Toji
82
82
  days.times.map(&:succ)
83
83
  end
84
84
 
85
- def progress
86
- Graph::Progress.new(self)
85
+ def progress(enable_annotations: true)
86
+ Graph::Progress.new(self, enable_annotations: enable_annotations)
87
87
  end
88
88
 
89
89
  def self.template(key=:default)
@@ -216,8 +216,8 @@ module Toji
216
216
  end
217
217
  end
218
218
 
219
- def progress
220
- Graph::Progress.new(self)
219
+ def progress(enable_annotations: true)
220
+ Graph::Progress.new(self, enable_annotations: enable_annotations)
221
221
  end
222
222
 
223
223
  def bmd
@@ -118,8 +118,8 @@ module Toji
118
118
  days.times.map(&:succ)
119
119
  end
120
120
 
121
- def progress
122
- Graph::Progress.new(self)
121
+ def progress(enable_annotations: true)
122
+ Graph::Progress.new(self, enable_annotations: enable_annotations)
123
123
  end
124
124
 
125
125
  def self.template(key=:default)
@@ -5,17 +5,47 @@ module Toji
5
5
  include Base
6
6
 
7
7
  # 炊飯器を使う場合
8
+ #
9
+ # 浸漬。
10
+ # 25〜30分くらい浸漬させないと中心部まで水を吸わない。
11
+ # => 吸水歩合 約1.30。
12
+ #
13
+ # 炊飯。
14
+ # 吸水と炊く用の水を合わせて歩合1.50くらいにしないと中心部まで火が通らない、且つ側面が焦げる。
15
+ # 圧力がかかる熟成炊きみたいな長めの炊飯が良い。
16
+ # => 蒸米歩合 約1.40。
17
+ #
8
18
  # 白米の60%の水で炊くと蒸米吸水率はだいたい38%くらいになる
9
19
  # 炊飯、放冷の過程で水分のうち36%程度は蒸発する
20
+ #
21
+ # 放冷。
22
+ # 歩合1.36〜1.37くらいになる。
23
+ # 更に歩合を下げたければ炊飯までは同じで、放冷に注力するのが良い。
10
24
 
11
- # 蒸す前
12
- # ・白米(無洗米コシヒカリ) 85g
13
- # ・水 50g
14
- # ・浸漬米吸水率 58.82%
15
- #
16
- # 蒸した後
17
- # ・蒸米 117.5g
18
- # ・蒸米吸水率 38.24%
25
+ # 重量推移の例
26
+ #
27
+ # 浸漬
28
+ # before
29
+ # 白米(無洗米コシヒカリ) 100g
30
+ # after
31
+ # 吸水後白米 130g
32
+ # (吸水歩合 30%)
33
+ #
34
+ # 炊飯
35
+ # before
36
+ # 吸水後白米 130g
37
+ # 炊飯用水 20g
38
+ # (吸水歩合+炊飯水率 50%)
39
+ # after
40
+ # 炊飯米 140g
41
+ # (炊飯米吸水率 40%)
42
+ #
43
+ # 放冷
44
+ # before
45
+ # 炊飯米 140g
46
+ # after
47
+ # 放冷後炊飯米 136g
48
+ # (放冷後炊飯米吸水率 36%)
19
49
 
20
50
  def initialize(soaked_rate, before_steaming_rate, steamed_rate, cooled_rate)
21
51
  @soaked_rate = soaked_rate
data/lib/toji/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Toji
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
data/toji.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Yoshida Tetsuya"]
9
9
  spec.email = ["yoshida.eth0@gmail.com"]
10
10
 
11
- spec.summary = %q{}
12
- spec.description = %q{}
11
+ spec.summary = %q{Management tools for brewing japanese sake.}
12
+ spec.description = %q{Management tools for brewing japanese sake.}
13
13
  spec.homepage = "https://github.com/yoshida-eth0/ruby-toji"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toji
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshida Tetsuya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-28 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '5.0'
97
- description: ''
97
+ description: Management tools for brewing japanese sake.
98
98
  email:
99
99
  - yoshida.eth0@gmail.com
100
100
  executables: []
@@ -111,7 +111,6 @@ files:
111
111
  - bin/setup
112
112
  - example/koji_making.ipynb
113
113
  - example/koji_making.rb
114
- - example/koji_making2.rb
115
114
  - example/koji_recipe.rb
116
115
  - example/moromi.ipynb
117
116
  - example/moromi.rb
@@ -182,5 +181,5 @@ requirements: []
182
181
  rubygems_version: 3.0.3
183
182
  signing_key:
184
183
  specification_version: 4
185
- summary: ''
184
+ summary: Management tools for brewing japanese sake.
186
185
  test_files: []
@@ -1,69 +0,0 @@
1
- require 'toji'
2
- require 'terminal-table'
3
-
4
- rice_rate = Toji::Recipe::RiceRate.cooked(0.30, 0.45, 0.40, 0.37)
5
- koji = Toji::Ingredient::Koji.expected(200.0, rice_rate: rice_rate)
6
- #koji = Toji::Ingredient::Koji.actual(200.0, 266.0, 24.0, 280.0, 270, 0.2, 0.0)
7
-
8
- table = Terminal::Table.new do |t|
9
- t << ["", "分量", "白米を基準とした歩合"]
10
- t << :separator
11
- t << ["麹", koji.dekoji, 1.0 + koji.dekoji_rate]
12
- t << [" 蒸米", koji.steamed, 1.0 + koji.steamed_rate]
13
- t << [" 白米", koji.raw, 1.0]
14
- t << [" 汲水", koji.soaking_water, koji.soaked_rate]
15
- t << [" 種麹", koji.tanekoji, koji.tanekoji_rate]
16
- end
17
- puts table
18
- puts
19
-
20
- table = Terminal::Table.new do |t|
21
- t << ["工程", "原料", "分量"]
22
- t << :separator
23
- t << ["洗米・浸漬", "白米", koji.raw&.round(2)]
24
- t << ["", "吸水増加量", koji.soaking_water&.round(2)]
25
- t << :separator
26
- t << ["水切り", "浸漬米", koji.soaked&.round(2)]
27
- t << ["", "蒸発・炊飯前の汲水", koji.steaming_water&.round(2)]
28
- t << :separator
29
- t << ["蒸し", "蒸米", koji.steamed&.round(2)]
30
- t << :separator
31
- t << ["放冷・引込み", "蒸米", koji.cooled&.round(2)]
32
- t << ["", "種麹", koji.tanekoji&.round(2)]
33
- t << :separator
34
- t << ["製麹", "麹", koji.dekoji&.round(2)]
35
- end
36
- puts table
37
-
38
-
39
- koji_making = Toji::Product::KojiMaking.template
40
-
41
- table = Terminal::Table.new do |t|
42
- t << ["作業", "品温(度)", "操作室温", "乾湿差(度)", "経過時間", "日時"]
43
- t << :separator
44
- koji_making.each {|j|
45
- temp = j.temps.map(&:to_s).join(" / ")
46
- t << [j.id, temp, j.room_temp, j.room_psychrometry, j.elapsed_time, j.display_time]
47
- }
48
- end
49
- puts table
50
-
51
-
52
- koji_making = Toji::Product::KojiMaking.template
53
- koji_making.add(Toji::Product::Job.new(
54
- time: Time.mktime(2020, 1, 15, 13, 15),
55
- id: :hikikomi,
56
- temps: 31.2,
57
- preset_temp: 35,
58
- room_temp: 25,
59
- ))
60
-
61
- table = Terminal::Table.new do |t|
62
- t << ["作業", "品温(度)", "操作室温", "設定温度", "経過時間", "日時"]
63
- t << :separator
64
- koji_making.each {|j|
65
- temp = j.temps.map(&:to_s).join(" / ")
66
- t << [j.id, temp, j.room_temp, j.preset_temp, j.elapsed_time, j.display_time]
67
- }
68
- end
69
- puts table