notedown 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +73 -0
- data/bin/notedown +7 -0
- data/lib/notedown.rb +22 -0
- data/lib/notedown/document.rb +21 -0
- data/lib/notedown/helpers.rb +25 -0
- data/lib/notedown/node.rb +148 -0
- data/test/fixtures/first.debug +16 -0
- data/test/fixtures/first.html +20 -0
- data/test/fixtures/first.nd +11 -0
- data/test/fixtures/sugar.debug +214 -0
- data/test/fixtures/sugar.html +283 -0
- data/test/fixtures/sugar.nd +179 -0
- data/test/gen +7 -0
- data/test/test_notedown.rb +29 -0
- metadata +70 -0
data/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Notedown
|
2
|
+
#### Markup language designed for taking notes
|
3
|
+
|
4
|
+
Notedown is a markup language designed for outliner-style documents. It is
|
5
|
+
optimized to be inputted fast (like when you're taking notes), yet still
|
6
|
+
retain the ability to export the documents as nicely-formatted HTML.
|
7
|
+
|
8
|
+
### Usage
|
9
|
+
|
10
|
+
Install:
|
11
|
+
|
12
|
+
$ gem install notedown
|
13
|
+
|
14
|
+
Pass filename(s) as arguments:
|
15
|
+
|
16
|
+
$ notedown file.nd > file.html
|
17
|
+
|
18
|
+
Or pipe via STDIN:
|
19
|
+
|
20
|
+
$ cat file.nd | notedown - > file.html
|
21
|
+
|
22
|
+
### Example
|
23
|
+
|
24
|
+
This is a perfectly-valid Notedown document:
|
25
|
+
|
26
|
+
# Headings begin with a pound sign
|
27
|
+
|
28
|
+
Paragraphs always end with a period.
|
29
|
+
|
30
|
+
Anything else is a list item
|
31
|
+
This is also a list item
|
32
|
+
This is a sub-item, because of its indentation
|
33
|
+
|
34
|
+
You may group items by putting empty lines on them
|
35
|
+
|
36
|
+
----
|
37
|
+
|
38
|
+
Horizontal rules are done with 4 or more dashes.
|
39
|
+
|
40
|
+
----
|
41
|
+
|
42
|
+
Lists with headings:
|
43
|
+
If a list item ends with a colon (like above), it's a list item heading (bold)
|
44
|
+
|
45
|
+
This example translates to the following HTML:
|
46
|
+
|
47
|
+
```html
|
48
|
+
<h1>Headings begin with a pound sign</h1>
|
49
|
+
<p>Paragraphs always end with a period.</p>
|
50
|
+
|
51
|
+
<ul>
|
52
|
+
<li>Anything else is a list item</li>
|
53
|
+
<li>This is also a list item
|
54
|
+
<ul>
|
55
|
+
<li>This is a sub-item, because of its indentation</li>
|
56
|
+
</ul>
|
57
|
+
</li>
|
58
|
+
</ul>
|
59
|
+
|
60
|
+
<ul>
|
61
|
+
<li>You may group items by putting empty lines on them</li>
|
62
|
+
</ul>
|
63
|
+
|
64
|
+
<hr />
|
65
|
+
<p>Horizontal rules are done with 4 or more dashes.</p>
|
66
|
+
<hr />
|
67
|
+
|
68
|
+
<ul>
|
69
|
+
<li><strong>Lists with headings</strong>
|
70
|
+
<li>If a list item ends with a colon (like above), it's a list item heading (bold)</li>
|
71
|
+
</li>
|
72
|
+
</ul>
|
73
|
+
```
|
data/bin/notedown
ADDED
data/lib/notedown.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Notedown markup.
|
2
|
+
#
|
3
|
+
# == Usage
|
4
|
+
#
|
5
|
+
# nd = Notedown.parse("string here")
|
6
|
+
# nd.to_html
|
7
|
+
#
|
8
|
+
module Notedown
|
9
|
+
VERSION = "0.0.1"
|
10
|
+
|
11
|
+
autoload :Helpers, File.expand_path('../notedown/helpers', __FILE__)
|
12
|
+
autoload :Node, File.expand_path('../notedown/node', __FILE__)
|
13
|
+
autoload :Document, File.expand_path('../notedown/document', __FILE__)
|
14
|
+
|
15
|
+
def self.parse(str)
|
16
|
+
Document.new(str)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.version
|
20
|
+
VERSION
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Notedown
|
2
|
+
class Document
|
3
|
+
attr_reader :source
|
4
|
+
|
5
|
+
def initialize(source)
|
6
|
+
@source = source
|
7
|
+
end
|
8
|
+
|
9
|
+
def root
|
10
|
+
@root ||= Node.new(nil, '', source.split("\n"))
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_html
|
14
|
+
root.to_html
|
15
|
+
end
|
16
|
+
|
17
|
+
def inspect
|
18
|
+
root.inspect
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Notedown::Helpers
|
2
|
+
# Returns the indexes of items in a given +arr+ match the criteria
|
3
|
+
# in a given block.
|
4
|
+
#
|
5
|
+
# indexes([15, 90, 25, 42]) { |i| i % 2 } #=> [1, 3]
|
6
|
+
#
|
7
|
+
def indexes(arr, &blk) # :nodoc:
|
8
|
+
re = Array.new
|
9
|
+
arr.each_with_index { |item, i| re << i if blk.call(item) }
|
10
|
+
re
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns the indentation level for a string.
|
14
|
+
#
|
15
|
+
# level_of " hello" #=> 2
|
16
|
+
#
|
17
|
+
def level_of(str) # :nodoc:
|
18
|
+
str.scan(/^ */).first.length
|
19
|
+
end
|
20
|
+
|
21
|
+
# Checks if a given element is in all sublists in a list.
|
22
|
+
def all_include?(list, what) # :nodoc:
|
23
|
+
list.select { |item| ! item.include?(what) }.empty?
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
module Notedown
|
2
|
+
class Node
|
3
|
+
FIRST_HEADING = 2
|
4
|
+
|
5
|
+
attr_reader :parent
|
6
|
+
attr_reader :children
|
7
|
+
|
8
|
+
include Helpers
|
9
|
+
|
10
|
+
def initialize(parent=nil, content='', lines=Array.new)
|
11
|
+
@content = content.strip
|
12
|
+
@parent = parent
|
13
|
+
@children = get_children(lines)
|
14
|
+
end
|
15
|
+
|
16
|
+
def empty?
|
17
|
+
children.empty?
|
18
|
+
end
|
19
|
+
|
20
|
+
def heading_level
|
21
|
+
level = parent ? parent.heading_level : (FIRST_HEADING-1)
|
22
|
+
level += 1 if heading?
|
23
|
+
level
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns the group types
|
27
|
+
def group_types
|
28
|
+
subtypes = children.map { |node| node.types }
|
29
|
+
|
30
|
+
re = Array.new
|
31
|
+
|
32
|
+
if subtypes.any?
|
33
|
+
[:paragraph, :heading, :item].each do |type|
|
34
|
+
if all_include?(subtypes, type)
|
35
|
+
re << :"#{type}_group"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
re
|
41
|
+
end
|
42
|
+
|
43
|
+
def types
|
44
|
+
types = Array.new
|
45
|
+
|
46
|
+
if @content.empty?
|
47
|
+
types << :group
|
48
|
+
elsif @content[0] == '#'
|
49
|
+
types << :heading
|
50
|
+
elsif text[-2..-1] =~ /[^\.]\./ || @content[0] == '%'
|
51
|
+
types << :paragraph
|
52
|
+
elsif text.match(/^-{4,}$/)
|
53
|
+
types << :hr
|
54
|
+
else
|
55
|
+
types << :item
|
56
|
+
end
|
57
|
+
|
58
|
+
types << :leaf if children.empty?
|
59
|
+
types << :bold if @content[-1] == ':'
|
60
|
+
|
61
|
+
types + group_types
|
62
|
+
end
|
63
|
+
|
64
|
+
def text
|
65
|
+
@content.gsub(/^[#%] */, '').gsub(/:$/, '')
|
66
|
+
end
|
67
|
+
|
68
|
+
def inspect
|
69
|
+
s = "<%s> \"%s\"" % [types.join('.'), text]
|
70
|
+
|
71
|
+
([s] + children.map { |l| "#{l.inspect.gsub(/^/, ' ')}" }).join("\n")
|
72
|
+
end
|
73
|
+
|
74
|
+
def paragraph?() types.include?(:paragraph) end
|
75
|
+
def item?() types.include?(:item) end
|
76
|
+
def bold?() types.include?(:bold) end
|
77
|
+
def heading?() types.include?(:heading) end
|
78
|
+
def hr?() types.include?(:hr) end
|
79
|
+
def group?() types.include?(:group) end
|
80
|
+
|
81
|
+
def to_html
|
82
|
+
(content_html + children_html).squeeze("\n")
|
83
|
+
end
|
84
|
+
|
85
|
+
def content_html
|
86
|
+
text = self.text
|
87
|
+
text = "<strong>#{text}</strong>" if bold?
|
88
|
+
|
89
|
+
if group?
|
90
|
+
""
|
91
|
+
elsif paragraph?
|
92
|
+
"<p>#{text}</p>\n"
|
93
|
+
elsif item?
|
94
|
+
"<li>#{text}</li>\n"
|
95
|
+
elsif heading?
|
96
|
+
n = heading_level
|
97
|
+
"<h#{n}>#{text}</h#{n}>\n"
|
98
|
+
elsif hr?
|
99
|
+
"<hr>\n"
|
100
|
+
else
|
101
|
+
text #???
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def children_html
|
106
|
+
html = children.map { |node| node.to_html }.join("\n")
|
107
|
+
return "" if html.empty?
|
108
|
+
|
109
|
+
if types.include?(:item_group)
|
110
|
+
"<ul>\n#{html}\n</ul>\n"
|
111
|
+
elsif types.include?(:heading_group)
|
112
|
+
"<section>\n#{html}\n</section>\n"
|
113
|
+
else
|
114
|
+
html
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
private
|
119
|
+
def get_children(lines)
|
120
|
+
first_meat = lines.reject { |l| l.strip.empty? }.first
|
121
|
+
|
122
|
+
if first_meat == nil
|
123
|
+
Array.new
|
124
|
+
else
|
125
|
+
indent = level_of(first_meat)
|
126
|
+
|
127
|
+
firsts = indexes(lines) { |s| level_of(s) == indent && !s.strip.empty? }
|
128
|
+
|
129
|
+
sections = Array.new
|
130
|
+
(firsts+[0]).each_cons(2) { |line, next_line|
|
131
|
+
new_group = !! lines[line-1].to_s.strip.empty?
|
132
|
+
range = line..(next_line-1)
|
133
|
+
|
134
|
+
sections << [lines[range], new_group]
|
135
|
+
}
|
136
|
+
|
137
|
+
groups = Array.new
|
138
|
+
|
139
|
+
sections.each { |(lines, new_group)|
|
140
|
+
groups << Node.new(self) if groups.empty? || (new_group && !groups.last.empty?)
|
141
|
+
groups.last.children << Node.new(self, lines.shift, lines)
|
142
|
+
}
|
143
|
+
|
144
|
+
groups
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<group> ""
|
2
|
+
<group.heading_group> ""
|
3
|
+
<heading> "Hello"
|
4
|
+
<group.paragraph_group> ""
|
5
|
+
<paragraph.leaf> "Yes."
|
6
|
+
<group.item_group> ""
|
7
|
+
<item> "So and so"
|
8
|
+
<group.item_group> ""
|
9
|
+
<item.leaf> "Yada"
|
10
|
+
<item> "So and so"
|
11
|
+
<group.item_group> ""
|
12
|
+
<item.leaf> "Yada"
|
13
|
+
<group.heading_group> ""
|
14
|
+
<heading> "Again"
|
15
|
+
<group.item_group> ""
|
16
|
+
<item.leaf> "Yes"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<section>
|
2
|
+
<h2>Hello</h2>
|
3
|
+
<p>Yes.</p>
|
4
|
+
<ul>
|
5
|
+
<li>So and so</li>
|
6
|
+
<ul>
|
7
|
+
<li>Yada</li>
|
8
|
+
</ul>
|
9
|
+
<li>So and so</li>
|
10
|
+
<ul>
|
11
|
+
<li>Yada</li>
|
12
|
+
</ul>
|
13
|
+
</ul>
|
14
|
+
</section>
|
15
|
+
<section>
|
16
|
+
<h2>Again</h2>
|
17
|
+
<ul>
|
18
|
+
<li>Yes</li>
|
19
|
+
</ul>
|
20
|
+
</section>
|
@@ -0,0 +1,214 @@
|
|
1
|
+
<group> ""
|
2
|
+
<group.heading_group> ""
|
3
|
+
<heading> "Cholesterol"
|
4
|
+
<group.item_group> ""
|
5
|
+
<item> "LDL = Low density lipoprotein ("bad cholesterol")"
|
6
|
+
<group.item_group> ""
|
7
|
+
<item.leaf> "LDL(a) = Pattern A = Large, buouyant LDL (neutral)"
|
8
|
+
<item> "LDL(b) = Pattern B = VLDL = Small, dense, Very low density (actually bad)"
|
9
|
+
<group.item_group> ""
|
10
|
+
<item.leaf> "Raised by carbohydrates consumption"
|
11
|
+
<item.leaf> "HDL = High density lipoprotein ("good cholesterol")"
|
12
|
+
<group.heading_group> ""
|
13
|
+
<heading> "How to check for LDL type"
|
14
|
+
<group.paragraph_group> ""
|
15
|
+
<paragraph.leaf> "Triglyceride-to-HDL ratio."
|
16
|
+
<group.item_group> ""
|
17
|
+
<item.leaf> "Predicts heart disease risk better than cholesterol levels"
|
18
|
+
<item.leaf> "Triglyceride low, high HDL == OK (you have neutral LDL)"
|
19
|
+
<item.leaf> "Triglyceride high, low HDL == Bad"
|
20
|
+
<group.heading_group> ""
|
21
|
+
<heading.bold> "1982 low-fat diet craze increased carbohydrate consumption"
|
22
|
+
<group.item_group> ""
|
23
|
+
<item.bold> "Low-fat processed food"
|
24
|
+
<group.item_group> ""
|
25
|
+
<item.leaf> "tastes like crap, so it's sugared to taste better"
|
26
|
+
<group.item_group> ""
|
27
|
+
<item.bold> "Adulteration of our food supply"
|
28
|
+
<group.item_group> ""
|
29
|
+
<item> "Fat is substituted by carbohydrates by"
|
30
|
+
<group.item_group> ""
|
31
|
+
<item.leaf> "Either HFCL (55% fructose),"
|
32
|
+
<item.leaf> "or Sucrose (50% fructose)"
|
33
|
+
<group.item_group> ""
|
34
|
+
<item.bold> "Changes done"
|
35
|
+
<group.item_group> ""
|
36
|
+
<item> "Fructose is added for..."
|
37
|
+
<group.item_group> ""
|
38
|
+
<item.leaf> "Palatability"
|
39
|
+
<item> "Browning agent"
|
40
|
+
<group.item_group> ""
|
41
|
+
<item.leaf> "It browns better because of protein glycation"
|
42
|
+
<item.leaf> "Protein glycation leads to athleroscrelosis"
|
43
|
+
<item.leaf> "(What happens in your steak, also happens in your arteries)"
|
44
|
+
<group.item_group> ""
|
45
|
+
<item> "Removed fiber..."
|
46
|
+
<group.item_group> ""
|
47
|
+
<item.leaf> "For shelf life"
|
48
|
+
<item> "Freezing"
|
49
|
+
<group.item_group> ""
|
50
|
+
<item.leaf> "(Fast food = fibreless food)"
|
51
|
+
<group.item_group> ""
|
52
|
+
<item> "Substitution of trans-fats..."
|
53
|
+
<group.item_group> ""
|
54
|
+
<item.leaf> "Hardening agent, shelf life"
|
55
|
+
<item.leaf> "Now being removed for CVD risk"
|
56
|
+
<group.heading_group> ""
|
57
|
+
<heading> "Fructose vs glucose"
|
58
|
+
<group.item_group> ""
|
59
|
+
<item.leaf> "Fructose browns 7x better than glucose to form Advanced Glycation End Products (AGEs)"
|
60
|
+
<item> "Fructose does not suppress ghrelin (hunger hormone)"
|
61
|
+
<group.item_group> ""
|
62
|
+
<item.leaf> "(If you drink soda before buying food, you eat more)"
|
63
|
+
<item> "Acute fructose does not stimulate insulin, or leptin"
|
64
|
+
<group.item_group> ""
|
65
|
+
<item.leaf> "Your brain doesn't see that you ate something"
|
66
|
+
<item.leaf> "No transport for fructose on the beta cell"
|
67
|
+
<item.leaf> "Hepatic fructose metabolism is different"
|
68
|
+
<item> "Chronic fructose exposure promotes the Metabolic Syndrome"
|
69
|
+
<group.item_group> ""
|
70
|
+
<item.leaf> "Obesity, Type 2, lipid problems, hypertension, CVD"
|
71
|
+
<group.heading_group> ""
|
72
|
+
<heading> "Glucose metabolism"
|
73
|
+
<group.paragraph_group> ""
|
74
|
+
<paragraph.leaf> "So what happens when you eat 120cal of glucose (2 slices of bread)?"
|
75
|
+
<group.item_group> ""
|
76
|
+
<item> "80% will be used by all organs of the body"
|
77
|
+
<group.item_group> ""
|
78
|
+
<item.leaf> "Every cell in the body can use glucose"
|
79
|
+
<item.leaf> "(Glucose = energy of life)"
|
80
|
+
<item> "20% will be on the liver"
|
81
|
+
<group.item_group> ""
|
82
|
+
<item.leaf> "Goes through Glu2 transport"
|
83
|
+
<item.leaf> "Pancreas creates Insulin"
|
84
|
+
<item.leaf> "Glucose-6-P will be in the liver"
|
85
|
+
<item.leaf> "Will be converted to Glycogen in the liver"
|
86
|
+
<item.leaf> "Liver can store as much glycogen as it can!"
|
87
|
+
<item.leaf> "Eventually becomes VLDL (probably 0.5 cal of it)"
|
88
|
+
<item.leaf> "Insulin went up => tells brain to stop eating"
|
89
|
+
<group.heading_group> ""
|
90
|
+
<heading> "Ethanol metabolism"
|
91
|
+
<group.item_group> ""
|
92
|
+
<item> "Ethanol (CH(3)-CH(2)-OH) is a carbohydrate and a toxin"
|
93
|
+
<group.item_group> ""
|
94
|
+
<item.leaf> "Ethanol is metabolised in the brain which causes weird things"
|
95
|
+
<item.leaf> "Ethanol is fermented sugar?"
|
96
|
+
<group.paragraph_group> ""
|
97
|
+
<paragraph.leaf> "So what happens when you ingest 120cal of ethanol?"
|
98
|
+
<group.item_group> ""
|
99
|
+
<item.leaf> "10% stomach/intestines (first pass effect)"
|
100
|
+
<item.leaf> "10% kidney, muscle, brain"
|
101
|
+
<item> "80% liver (4 times of glucose)"
|
102
|
+
<group.item_group> ""
|
103
|
+
<item.leaf> "Becomes acetaldahyde (gets you sirhosis by damaging proteins in the liver)"
|
104
|
+
<item.leaf> "FFA in muscles (causing insulin resistance in your muscles)"
|
105
|
+
<group.heading_group> ""
|
106
|
+
<heading> "Sucrose metabolism"
|
107
|
+
<group.item_group> ""
|
108
|
+
<item> "What happens when you ingest 120cal of sucrose (glass of orange juice)?"
|
109
|
+
<group.item_group> ""
|
110
|
+
<item> "60cal glucose"
|
111
|
+
<group.item_group> ""
|
112
|
+
<item.leaf> "20% on liver ... (see above)"
|
113
|
+
<group.item_group> ""
|
114
|
+
<item> "60cal fructose"
|
115
|
+
<group.item_group> ""
|
116
|
+
<item.leaf> "100% on liver (!)"
|
117
|
+
<item.leaf> "Glu5 transport (instead of Glu2)"
|
118
|
+
<item> "ATP (and shit) becomes uric acid"
|
119
|
+
<group.item_group> ""
|
120
|
+
<item.leaf> "Causes gout and hypertension"
|
121
|
+
<group.heading_group> ""
|
122
|
+
<heading> "Intervention"
|
123
|
+
<group.item_group> ""
|
124
|
+
<item.leaf> "Remove sugared liquids aside from milk"
|
125
|
+
<item> "Wait 20 minutes for second portions"
|
126
|
+
<group.item_group> ""
|
127
|
+
<item.leaf> "To get a satiety signal"
|
128
|
+
<item> "Eat your carbohydrate with fiber (can nullify bad fructose effects)"
|
129
|
+
<group.item_group> ""
|
130
|
+
<item.leaf> "Fiber is supposed to be an essential nutrient"
|
131
|
+
<item.leaf> "Buy your screen time for physical activity"
|
132
|
+
<group.heading_group> ""
|
133
|
+
<heading> "Why is exercise good for obese people?"
|
134
|
+
<group.item_group> ""
|
135
|
+
<item.leaf> "Improves skeletal muscle insulin sensitivity"
|
136
|
+
<item.leaf> "Reduces stress"
|
137
|
+
<item> "It makes the TCA cycle (krebs cycle) run faster (!)"
|
138
|
+
<group.item_group> ""
|
139
|
+
<item.leaf> "Citrate doesn't leave mitochondria (and turn into fat)"
|
140
|
+
<item.leaf> "This is what they mean by 'higher metabolism'"
|
141
|
+
<group.heading_group> ""
|
142
|
+
<heading> "Why is fiber important in obesity?"
|
143
|
+
<group.item_group> ""
|
144
|
+
<item> "**Eat your carbohydrate with fiber**"
|
145
|
+
<group.item_group> ""
|
146
|
+
<item.leaf> ""When God made the poison, he packaged it with an antidote.""
|
147
|
+
<item.leaf> "Whenever fructose is found in nature, it comes with fiber"
|
148
|
+
<group.item_group> ""
|
149
|
+
<item> "Reduces intestinal carbohydrate absorption rate"
|
150
|
+
<group.item_group> ""
|
151
|
+
<item.leaf> "Reduced rate => bacteria gets to it"
|
152
|
+
<item.leaf> "(Life gives you 2 choices: fat, or fart)"
|
153
|
+
<item.leaf> "Increases speed of transit of ntestinal contents to insulin"
|
154
|
+
<item.leaf> "Inhibits absorption of some FFA to the colon"
|
155
|
+
<group.item_group> ""
|
156
|
+
<item.leaf> "Paleolithic diet cures type 2 diabetes! Fiber! :D"
|
157
|
+
<group.heading_group> ""
|
158
|
+
<heading> "Fructosification of America and the world"
|
159
|
+
<group.item_group> ""
|
160
|
+
<item.bold> "McDo doesn't have HFCS in"
|
161
|
+
<group.item_group> ""
|
162
|
+
<item.leaf> "French fries (salt, starch and fat)"
|
163
|
+
<item.leaf> "Hash browns (same)"
|
164
|
+
<item.leaf> "Chicken McNuggets (same)"
|
165
|
+
<item.leaf> "Sausage"
|
166
|
+
<item.leaf> "Diet coke"
|
167
|
+
<item.leaf> "Coffee"
|
168
|
+
<item.leaf> "Iced tea (without sugar)"
|
169
|
+
<group.item_group> ""
|
170
|
+
<item.leaf> "None of the elite athletes drink Gatorade"
|
171
|
+
<group.item_group> ""
|
172
|
+
<item> "Low fat milk (1%)"
|
173
|
+
<group.item_group> ""
|
174
|
+
<item.leaf> "Has HFCS! Wtf?"
|
175
|
+
<group.item_group> ""
|
176
|
+
<item> "Isomic (milk formula)"
|
177
|
+
<group.item_group> ""
|
178
|
+
<item.leaf> "has 43% corn syrup solids (Coke has 10.5% sucrose)"
|
179
|
+
<item.leaf> "The more sugar you use as a kid, the more you crave for it later"
|
180
|
+
<group.item_group> ""
|
181
|
+
<item> "Can of Coke vs can of beer"
|
182
|
+
<group.item_group> ""
|
183
|
+
<item.leaf> "150cal vs 150cal"
|
184
|
+
<item.leaf> "10.5% sucrose vs 3.6% alcohol"
|
185
|
+
<item.leaf> "90cal to liver vs 92cal"
|
186
|
+
<group.heading_group> ""
|
187
|
+
<heading> "Conclusion"
|
188
|
+
<group.item_group> ""
|
189
|
+
<item.bold> "Fructose is"
|
190
|
+
<group.item_group> ""
|
191
|
+
<item.leaf> "a carb"
|
192
|
+
<item> "metabolized like fat"
|
193
|
+
<group.item_group> ""
|
194
|
+
<item.leaf> "Corollary: a high-fat diet is a high-fructose diet"
|
195
|
+
<item> "a chronic hepatotoxin"
|
196
|
+
<group.item_group> ""
|
197
|
+
<item.leaf> ""Fructose is alcohol without the buzz""
|
198
|
+
<item.leaf> "you get sick after 1000 fructose meals, not 1"
|
199
|
+
<group> ""
|
200
|
+
<hr.leaf> "----"
|
201
|
+
<group.heading_group> ""
|
202
|
+
<heading> "References"
|
203
|
+
<group.item_group> ""
|
204
|
+
<item.bold> "Sugar: the bitter truth"
|
205
|
+
<group.item_group> ""
|
206
|
+
<item.leaf> "http://www.youtube.com/watch?v=dBnniua6-oM"
|
207
|
+
<item.leaf> "http://www.reddit.com/r/Paleo/comments/h8ob1/absolutely_amazing_lecture_on_how_sugar_is/"
|
208
|
+
<group> ""
|
209
|
+
<hr.leaf> "----"
|
210
|
+
<group.heading_group> ""
|
211
|
+
<heading> "Glossary"
|
212
|
+
<group.item_group> ""
|
213
|
+
<item.leaf> "CVD :: cardio vascular disease"
|
214
|
+
<item.leaf> "FFA :: free fatty acids"
|
@@ -0,0 +1,283 @@
|
|
1
|
+
<section>
|
2
|
+
<h2>Cholesterol</h2>
|
3
|
+
<ul>
|
4
|
+
<li>LDL = Low density lipoprotein ("bad cholesterol")</li>
|
5
|
+
<ul>
|
6
|
+
<li>LDL(a) = Pattern A = Large, buouyant LDL (neutral)</li>
|
7
|
+
<li>LDL(b) = Pattern B = VLDL = Small, dense, Very low density (actually bad)</li>
|
8
|
+
<ul>
|
9
|
+
<li>Raised by carbohydrates consumption</li>
|
10
|
+
</ul>
|
11
|
+
</ul>
|
12
|
+
<li>HDL = High density lipoprotein ("good cholesterol")</li>
|
13
|
+
</ul>
|
14
|
+
</section>
|
15
|
+
<section>
|
16
|
+
<h2>How to check for LDL type</h2>
|
17
|
+
<p>Triglyceride-to-HDL ratio.</p>
|
18
|
+
<ul>
|
19
|
+
<li>Predicts heart disease risk better than cholesterol levels</li>
|
20
|
+
<li>Triglyceride low, high HDL == OK (you have neutral LDL)</li>
|
21
|
+
<li>Triglyceride high, low HDL == Bad</li>
|
22
|
+
</ul>
|
23
|
+
</section>
|
24
|
+
<section>
|
25
|
+
<h2><strong>1982 low-fat diet craze increased carbohydrate consumption</strong></h2>
|
26
|
+
<ul>
|
27
|
+
<li><strong>Low-fat processed food</strong></li>
|
28
|
+
<ul>
|
29
|
+
<li>tastes like crap, so it's sugared to taste better</li>
|
30
|
+
</ul>
|
31
|
+
</ul>
|
32
|
+
<ul>
|
33
|
+
<li><strong>Adulteration of our food supply</strong></li>
|
34
|
+
<ul>
|
35
|
+
<li>Fat is substituted by carbohydrates by</li>
|
36
|
+
<ul>
|
37
|
+
<li>Either HFCL (55% fructose),</li>
|
38
|
+
<li>or Sucrose (50% fructose)</li>
|
39
|
+
</ul>
|
40
|
+
</ul>
|
41
|
+
<ul>
|
42
|
+
<li><strong>Changes done</strong></li>
|
43
|
+
<ul>
|
44
|
+
<li>Fructose is added for...</li>
|
45
|
+
<ul>
|
46
|
+
<li>Palatability</li>
|
47
|
+
<li>Browning agent</li>
|
48
|
+
<ul>
|
49
|
+
<li>It browns better because of protein glycation</li>
|
50
|
+
<li>Protein glycation leads to athleroscrelosis</li>
|
51
|
+
<li>(What happens in your steak, also happens in your arteries)</li>
|
52
|
+
</ul>
|
53
|
+
</ul>
|
54
|
+
</ul>
|
55
|
+
<ul>
|
56
|
+
<li>Removed fiber...</li>
|
57
|
+
<ul>
|
58
|
+
<li>For shelf life</li>
|
59
|
+
<li>Freezing</li>
|
60
|
+
<ul>
|
61
|
+
<li>(Fast food = fibreless food)</li>
|
62
|
+
</ul>
|
63
|
+
</ul>
|
64
|
+
</ul>
|
65
|
+
<ul>
|
66
|
+
<li>Substitution of trans-fats...</li>
|
67
|
+
<ul>
|
68
|
+
<li>Hardening agent, shelf life</li>
|
69
|
+
<li>Now being removed for CVD risk</li>
|
70
|
+
</ul>
|
71
|
+
</ul>
|
72
|
+
</ul>
|
73
|
+
</ul>
|
74
|
+
</section>
|
75
|
+
<section>
|
76
|
+
<h2>Fructose vs glucose</h2>
|
77
|
+
<ul>
|
78
|
+
<li>Fructose browns 7x better than glucose to form Advanced Glycation End Products (AGEs)</li>
|
79
|
+
<li>Fructose does not suppress ghrelin (hunger hormone)</li>
|
80
|
+
<ul>
|
81
|
+
<li>(If you drink soda before buying food, you eat more)</li>
|
82
|
+
</ul>
|
83
|
+
<li>Acute fructose does not stimulate insulin, or leptin</li>
|
84
|
+
<ul>
|
85
|
+
<li>Your brain doesn't see that you ate something</li>
|
86
|
+
<li>No transport for fructose on the beta cell</li>
|
87
|
+
</ul>
|
88
|
+
<li>Hepatic fructose metabolism is different</li>
|
89
|
+
<li>Chronic fructose exposure promotes the Metabolic Syndrome</li>
|
90
|
+
<ul>
|
91
|
+
<li>Obesity, Type 2, lipid problems, hypertension, CVD</li>
|
92
|
+
</ul>
|
93
|
+
</ul>
|
94
|
+
</section>
|
95
|
+
<section>
|
96
|
+
<h2>Glucose metabolism</h2>
|
97
|
+
<p>So what happens when you eat 120cal of glucose (2 slices of bread)?</p>
|
98
|
+
<ul>
|
99
|
+
<li>80% will be used by all organs of the body</li>
|
100
|
+
<ul>
|
101
|
+
<li>Every cell in the body can use glucose</li>
|
102
|
+
<li>(Glucose = energy of life)</li>
|
103
|
+
</ul>
|
104
|
+
<li>20% will be on the liver</li>
|
105
|
+
<ul>
|
106
|
+
<li>Goes through Glu2 transport</li>
|
107
|
+
<li>Pancreas creates Insulin</li>
|
108
|
+
<li>Glucose-6-P will be in the liver</li>
|
109
|
+
<li>Will be converted to Glycogen in the liver</li>
|
110
|
+
<li>Liver can store as much glycogen as it can!</li>
|
111
|
+
<li>Eventually becomes VLDL (probably 0.5 cal of it)</li>
|
112
|
+
<li>Insulin went up => tells brain to stop eating</li>
|
113
|
+
</ul>
|
114
|
+
</ul>
|
115
|
+
</section>
|
116
|
+
<section>
|
117
|
+
<h2>Ethanol metabolism</h2>
|
118
|
+
<ul>
|
119
|
+
<li>Ethanol (CH(3)-CH(2)-OH) is a carbohydrate and a toxin</li>
|
120
|
+
<ul>
|
121
|
+
<li>Ethanol is metabolised in the brain which causes weird things</li>
|
122
|
+
<li>Ethanol is fermented sugar?</li>
|
123
|
+
</ul>
|
124
|
+
</ul>
|
125
|
+
<p>So what happens when you ingest 120cal of ethanol?</p>
|
126
|
+
<ul>
|
127
|
+
<li>10% stomach/intestines (first pass effect)</li>
|
128
|
+
<li>10% kidney, muscle, brain</li>
|
129
|
+
<li>80% liver (4 times of glucose)</li>
|
130
|
+
<ul>
|
131
|
+
<li>Becomes acetaldahyde (gets you sirhosis by damaging proteins in the liver)</li>
|
132
|
+
<li>FFA in muscles (causing insulin resistance in your muscles)</li>
|
133
|
+
</ul>
|
134
|
+
</ul>
|
135
|
+
</section>
|
136
|
+
<section>
|
137
|
+
<h2>Sucrose metabolism</h2>
|
138
|
+
<ul>
|
139
|
+
<li>What happens when you ingest 120cal of sucrose (glass of orange juice)?</li>
|
140
|
+
<ul>
|
141
|
+
<li>60cal glucose</li>
|
142
|
+
<ul>
|
143
|
+
<li>20% on liver ... (see above)</li>
|
144
|
+
</ul>
|
145
|
+
</ul>
|
146
|
+
<ul>
|
147
|
+
<li>60cal fructose</li>
|
148
|
+
<ul>
|
149
|
+
<li>100% on liver (!)</li>
|
150
|
+
<li>Glu5 transport (instead of Glu2)</li>
|
151
|
+
<li>ATP (and shit) becomes uric acid</li>
|
152
|
+
<ul>
|
153
|
+
<li>Causes gout and hypertension</li>
|
154
|
+
</ul>
|
155
|
+
</ul>
|
156
|
+
</ul>
|
157
|
+
</ul>
|
158
|
+
</section>
|
159
|
+
<section>
|
160
|
+
<h2>Intervention</h2>
|
161
|
+
<ul>
|
162
|
+
<li>Remove sugared liquids aside from milk</li>
|
163
|
+
<li>Wait 20 minutes for second portions</li>
|
164
|
+
<ul>
|
165
|
+
<li>To get a satiety signal</li>
|
166
|
+
</ul>
|
167
|
+
<li>Eat your carbohydrate with fiber (can nullify bad fructose effects)</li>
|
168
|
+
<ul>
|
169
|
+
<li>Fiber is supposed to be an essential nutrient</li>
|
170
|
+
</ul>
|
171
|
+
<li>Buy your screen time for physical activity</li>
|
172
|
+
</ul>
|
173
|
+
</section>
|
174
|
+
<section>
|
175
|
+
<h2>Why is exercise good for obese people?</h2>
|
176
|
+
<ul>
|
177
|
+
<li>Improves skeletal muscle insulin sensitivity</li>
|
178
|
+
<li>Reduces stress</li>
|
179
|
+
<li>It makes the TCA cycle (krebs cycle) run faster (!)</li>
|
180
|
+
<ul>
|
181
|
+
<li>Citrate doesn't leave mitochondria (and turn into fat)</li>
|
182
|
+
<li>This is what they mean by 'higher metabolism'</li>
|
183
|
+
</ul>
|
184
|
+
</ul>
|
185
|
+
</section>
|
186
|
+
<section>
|
187
|
+
<h2>Why is fiber important in obesity?</h2>
|
188
|
+
<ul>
|
189
|
+
<li>**Eat your carbohydrate with fiber**</li>
|
190
|
+
<ul>
|
191
|
+
<li>"When God made the poison, he packaged it with an antidote."</li>
|
192
|
+
<li>Whenever fructose is found in nature, it comes with fiber</li>
|
193
|
+
</ul>
|
194
|
+
</ul>
|
195
|
+
<ul>
|
196
|
+
<li>Reduces intestinal carbohydrate absorption rate</li>
|
197
|
+
<ul>
|
198
|
+
<li>Reduced rate => bacteria gets to it</li>
|
199
|
+
<li>(Life gives you 2 choices: fat, or fart)</li>
|
200
|
+
</ul>
|
201
|
+
<li>Increases speed of transit of ntestinal contents to insulin</li>
|
202
|
+
<li>Inhibits absorption of some FFA to the colon</li>
|
203
|
+
</ul>
|
204
|
+
<ul>
|
205
|
+
<li>Paleolithic diet cures type 2 diabetes! Fiber! :D</li>
|
206
|
+
</ul>
|
207
|
+
</section>
|
208
|
+
<section>
|
209
|
+
<h2>Fructosification of America and the world</h2>
|
210
|
+
<ul>
|
211
|
+
<li><strong>McDo doesn't have HFCS in</strong></li>
|
212
|
+
<ul>
|
213
|
+
<li>French fries (salt, starch and fat)</li>
|
214
|
+
<li>Hash browns (same)</li>
|
215
|
+
<li>Chicken McNuggets (same)</li>
|
216
|
+
<li>Sausage</li>
|
217
|
+
<li>Diet coke</li>
|
218
|
+
<li>Coffee</li>
|
219
|
+
<li>Iced tea (without sugar)</li>
|
220
|
+
</ul>
|
221
|
+
</ul>
|
222
|
+
<ul>
|
223
|
+
<li>None of the elite athletes drink Gatorade</li>
|
224
|
+
</ul>
|
225
|
+
<ul>
|
226
|
+
<li>Low fat milk (1%)</li>
|
227
|
+
<ul>
|
228
|
+
<li>Has HFCS! Wtf?</li>
|
229
|
+
</ul>
|
230
|
+
</ul>
|
231
|
+
<ul>
|
232
|
+
<li>Isomic (milk formula)</li>
|
233
|
+
<ul>
|
234
|
+
<li>has 43% corn syrup solids (Coke has 10.5% sucrose)</li>
|
235
|
+
<li>The more sugar you use as a kid, the more you crave for it later</li>
|
236
|
+
</ul>
|
237
|
+
</ul>
|
238
|
+
<ul>
|
239
|
+
<li>Can of Coke vs can of beer</li>
|
240
|
+
<ul>
|
241
|
+
<li>150cal vs 150cal</li>
|
242
|
+
<li>10.5% sucrose vs 3.6% alcohol</li>
|
243
|
+
<li>90cal to liver vs 92cal</li>
|
244
|
+
</ul>
|
245
|
+
</ul>
|
246
|
+
</section>
|
247
|
+
<section>
|
248
|
+
<h2>Conclusion</h2>
|
249
|
+
<ul>
|
250
|
+
<li><strong>Fructose is</strong></li>
|
251
|
+
<ul>
|
252
|
+
<li>a carb</li>
|
253
|
+
<li>metabolized like fat</li>
|
254
|
+
<ul>
|
255
|
+
<li>Corollary: a high-fat diet is a high-fructose diet</li>
|
256
|
+
</ul>
|
257
|
+
<li>a chronic hepatotoxin</li>
|
258
|
+
<ul>
|
259
|
+
<li>"Fructose is alcohol without the buzz"</li>
|
260
|
+
<li>you get sick after 1000 fructose meals, not 1</li>
|
261
|
+
</ul>
|
262
|
+
</ul>
|
263
|
+
</ul>
|
264
|
+
</section>
|
265
|
+
<hr>
|
266
|
+
<section>
|
267
|
+
<h2>References</h2>
|
268
|
+
<ul>
|
269
|
+
<li><strong>Sugar: the bitter truth</strong></li>
|
270
|
+
<ul>
|
271
|
+
<li>http://www.youtube.com/watch?v=dBnniua6-oM</li>
|
272
|
+
<li>http://www.reddit.com/r/Paleo/comments/h8ob1/absolutely_amazing_lecture_on_how_sugar_is/</li>
|
273
|
+
</ul>
|
274
|
+
</ul>
|
275
|
+
</section>
|
276
|
+
<hr>
|
277
|
+
<section>
|
278
|
+
<h2>Glossary</h2>
|
279
|
+
<ul>
|
280
|
+
<li>CVD :: cardio vascular disease</li>
|
281
|
+
<li>FFA :: free fatty acids</li>
|
282
|
+
</ul>
|
283
|
+
</section>
|
@@ -0,0 +1,179 @@
|
|
1
|
+
# Cholesterol
|
2
|
+
|
3
|
+
LDL = Low density lipoprotein ("bad cholesterol")
|
4
|
+
LDL(a) = Pattern A = Large, buouyant LDL (neutral)
|
5
|
+
LDL(b) = Pattern B = VLDL = Small, dense, Very low density (actually bad)
|
6
|
+
Raised by carbohydrates consumption
|
7
|
+
HDL = High density lipoprotein ("good cholesterol")
|
8
|
+
|
9
|
+
# How to check for LDL type
|
10
|
+
|
11
|
+
Triglyceride-to-HDL ratio.
|
12
|
+
|
13
|
+
Predicts heart disease risk better than cholesterol levels
|
14
|
+
Triglyceride low, high HDL == OK (you have neutral LDL)
|
15
|
+
Triglyceride high, low HDL == Bad
|
16
|
+
|
17
|
+
# 1982 low-fat diet craze increased carbohydrate consumption:
|
18
|
+
|
19
|
+
Low-fat processed food:
|
20
|
+
tastes like crap, so it's sugared to taste better
|
21
|
+
|
22
|
+
Adulteration of our food supply:
|
23
|
+
Fat is substituted by carbohydrates by
|
24
|
+
Either HFCL (55% fructose),
|
25
|
+
or Sucrose (50% fructose)
|
26
|
+
|
27
|
+
Changes done:
|
28
|
+
Fructose is added for...
|
29
|
+
Palatability
|
30
|
+
Browning agent
|
31
|
+
It browns better because of protein glycation
|
32
|
+
Protein glycation leads to athleroscrelosis
|
33
|
+
(What happens in your steak, also happens in your arteries)
|
34
|
+
|
35
|
+
Removed fiber...
|
36
|
+
For shelf life
|
37
|
+
Freezing
|
38
|
+
(Fast food = fibreless food)
|
39
|
+
|
40
|
+
Substitution of trans-fats...
|
41
|
+
Hardening agent, shelf life
|
42
|
+
Now being removed for CVD risk
|
43
|
+
|
44
|
+
# Fructose vs glucose
|
45
|
+
|
46
|
+
Fructose browns 7x better than glucose to form Advanced Glycation End Products (AGEs)
|
47
|
+
Fructose does not suppress ghrelin (hunger hormone)
|
48
|
+
(If you drink soda before buying food, you eat more)
|
49
|
+
Acute fructose does not stimulate insulin, or leptin
|
50
|
+
Your brain doesn't see that you ate something
|
51
|
+
No transport for fructose on the beta cell
|
52
|
+
Hepatic fructose metabolism is different
|
53
|
+
Chronic fructose exposure promotes the Metabolic Syndrome
|
54
|
+
Obesity, Type 2, lipid problems, hypertension, CVD
|
55
|
+
|
56
|
+
# Glucose metabolism
|
57
|
+
|
58
|
+
% So what happens when you eat 120cal of glucose (2 slices of bread)?
|
59
|
+
|
60
|
+
80% will be used by all organs of the body
|
61
|
+
Every cell in the body can use glucose
|
62
|
+
(Glucose = energy of life)
|
63
|
+
20% will be on the liver
|
64
|
+
Goes through Glu2 transport
|
65
|
+
Pancreas creates Insulin
|
66
|
+
Glucose-6-P will be in the liver
|
67
|
+
Will be converted to Glycogen in the liver
|
68
|
+
Liver can store as much glycogen as it can!
|
69
|
+
Eventually becomes VLDL (probably 0.5 cal of it)
|
70
|
+
Insulin went up => tells brain to stop eating
|
71
|
+
|
72
|
+
# Ethanol metabolism
|
73
|
+
|
74
|
+
Ethanol (CH(3)-CH(2)-OH) is a carbohydrate and a toxin
|
75
|
+
Ethanol is metabolised in the brain which causes weird things
|
76
|
+
Ethanol is fermented sugar?
|
77
|
+
|
78
|
+
% So what happens when you ingest 120cal of ethanol?
|
79
|
+
|
80
|
+
10% stomach/intestines (first pass effect)
|
81
|
+
10% kidney, muscle, brain
|
82
|
+
80% liver (4 times of glucose)
|
83
|
+
Becomes acetaldahyde (gets you sirhosis by damaging proteins in the liver)
|
84
|
+
FFA in muscles (causing insulin resistance in your muscles)
|
85
|
+
|
86
|
+
# Sucrose metabolism
|
87
|
+
|
88
|
+
What happens when you ingest 120cal of sucrose (glass of orange juice)?
|
89
|
+
|
90
|
+
60cal glucose
|
91
|
+
20% on liver ... (see above)
|
92
|
+
|
93
|
+
60cal fructose
|
94
|
+
100% on liver (!)
|
95
|
+
Glu5 transport (instead of Glu2)
|
96
|
+
ATP (and shit) becomes uric acid
|
97
|
+
Causes gout and hypertension
|
98
|
+
|
99
|
+
# Intervention
|
100
|
+
|
101
|
+
Remove sugared liquids aside from milk
|
102
|
+
Wait 20 minutes for second portions
|
103
|
+
To get a satiety signal
|
104
|
+
Eat your carbohydrate with fiber (can nullify bad fructose effects)
|
105
|
+
Fiber is supposed to be an essential nutrient
|
106
|
+
Buy your screen time for physical activity
|
107
|
+
|
108
|
+
# Why is exercise good for obese people?
|
109
|
+
|
110
|
+
Improves skeletal muscle insulin sensitivity
|
111
|
+
Reduces stress
|
112
|
+
It makes the TCA cycle (krebs cycle) run faster (!)
|
113
|
+
Citrate doesn't leave mitochondria (and turn into fat)
|
114
|
+
This is what they mean by 'higher metabolism'
|
115
|
+
|
116
|
+
# Why is fiber important in obesity?
|
117
|
+
|
118
|
+
**Eat your carbohydrate with fiber**
|
119
|
+
"When God made the poison, he packaged it with an antidote."
|
120
|
+
Whenever fructose is found in nature, it comes with fiber
|
121
|
+
|
122
|
+
Reduces intestinal carbohydrate absorption rate
|
123
|
+
Reduced rate => bacteria gets to it
|
124
|
+
(Life gives you 2 choices: fat, or fart)
|
125
|
+
Increases speed of transit of ntestinal contents to insulin
|
126
|
+
Inhibits absorption of some FFA to the colon
|
127
|
+
|
128
|
+
Paleolithic diet cures type 2 diabetes! Fiber! :D
|
129
|
+
|
130
|
+
# Fructosification of America and the world
|
131
|
+
|
132
|
+
McDo doesn't have HFCS in:
|
133
|
+
French fries (salt, starch and fat)
|
134
|
+
Hash browns (same)
|
135
|
+
Chicken McNuggets (same)
|
136
|
+
Sausage
|
137
|
+
Diet coke
|
138
|
+
Coffee
|
139
|
+
Iced tea (without sugar)
|
140
|
+
|
141
|
+
None of the elite athletes drink Gatorade
|
142
|
+
|
143
|
+
Low fat milk (1%)
|
144
|
+
Has HFCS! Wtf?
|
145
|
+
|
146
|
+
Isomic (milk formula)
|
147
|
+
has 43% corn syrup solids (Coke has 10.5% sucrose)
|
148
|
+
The more sugar you use as a kid, the more you crave for it later
|
149
|
+
|
150
|
+
Can of Coke vs can of beer
|
151
|
+
150cal vs 150cal
|
152
|
+
10.5% sucrose vs 3.6% alcohol
|
153
|
+
90cal to liver vs 92cal
|
154
|
+
|
155
|
+
# Conclusion
|
156
|
+
|
157
|
+
Fructose is:
|
158
|
+
a carb
|
159
|
+
metabolized like fat
|
160
|
+
Corollary: a high-fat diet is a high-fructose diet
|
161
|
+
a chronic hepatotoxin
|
162
|
+
"Fructose is alcohol without the buzz"
|
163
|
+
you get sick after 1000 fructose meals, not 1
|
164
|
+
|
165
|
+
----
|
166
|
+
|
167
|
+
# References
|
168
|
+
|
169
|
+
Sugar: the bitter truth:
|
170
|
+
http://www.youtube.com/watch?v=dBnniua6-oM
|
171
|
+
http://www.reddit.com/r/Paleo/comments/h8ob1/absolutely_amazing_lecture_on_how_sugar_is/
|
172
|
+
|
173
|
+
----
|
174
|
+
|
175
|
+
# Glossary
|
176
|
+
|
177
|
+
CVD :: cardio vascular disease
|
178
|
+
FFA :: free fatty acids
|
179
|
+
|
data/test/gen
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'contest'
|
3
|
+
require 'yaml'
|
4
|
+
require File.expand_path('../../lib/notedown', __FILE__)
|
5
|
+
|
6
|
+
class NTest < Test::Unit::TestCase
|
7
|
+
def fixture(file)
|
8
|
+
File.expand_path("../fixtures/#{file}", __FILE__)
|
9
|
+
end
|
10
|
+
|
11
|
+
def assert_fixture(name)
|
12
|
+
from = File.read(fixture("#{name}.nd"))
|
13
|
+
to = File.read(fixture("#{name}.html"))
|
14
|
+
ins = File.read(fixture("#{name}.debug"))
|
15
|
+
|
16
|
+
doc = Notedown.parse(from)
|
17
|
+
|
18
|
+
#assert_equal to, doc.to_html
|
19
|
+
assert_equal ins.strip, doc.inspect.strip
|
20
|
+
end
|
21
|
+
|
22
|
+
test "first" do
|
23
|
+
assert_fixture 'first'
|
24
|
+
end
|
25
|
+
|
26
|
+
test "sugar" do
|
27
|
+
assert_fixture 'sugar'
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: notedown
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Rico Sta. Cruz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-05-13 00:00:00 +08:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Notedown is a markup language designed for outliner-style documents. It is optimized to be inputted fast (like when you're taking notes), yet still retain the ability to export the documents as nicely-formatted HTML.
|
18
|
+
email:
|
19
|
+
- rico@sinefunc.com
|
20
|
+
executables:
|
21
|
+
- notedown
|
22
|
+
extensions: []
|
23
|
+
|
24
|
+
extra_rdoc_files: []
|
25
|
+
|
26
|
+
files:
|
27
|
+
- bin/notedown
|
28
|
+
- lib/notedown/document.rb
|
29
|
+
- lib/notedown/helpers.rb
|
30
|
+
- lib/notedown/node.rb
|
31
|
+
- lib/notedown.rb
|
32
|
+
- test/fixtures/first.debug
|
33
|
+
- test/fixtures/first.html
|
34
|
+
- test/fixtures/first.nd
|
35
|
+
- test/fixtures/sugar.debug
|
36
|
+
- test/fixtures/sugar.html
|
37
|
+
- test/fixtures/sugar.nd
|
38
|
+
- test/gen
|
39
|
+
- test/test_notedown.rb
|
40
|
+
- README.md
|
41
|
+
has_rdoc: true
|
42
|
+
homepage: http://github.com/rstacruz/notedown
|
43
|
+
licenses: []
|
44
|
+
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options: []
|
47
|
+
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: "0"
|
62
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.6.2
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: Markup language designed for taking notes.
|
69
|
+
test_files: []
|
70
|
+
|