nutritious 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/compiler.xml +24 -0
- data/.idea/copyright/profiles_settings.xml +5 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +104 -0
- data/.idea/modules.xml +9 -0
- data/.idea/uiDesigner.xml +125 -0
- data/.idea/vcs.xml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +34 -0
- data/README +3 -0
- data/Rakefile +2 -0
- data/examples/load_recent.rb +11 -0
- data/lib/nutritious.rb +45 -0
- data/nutritious.gemspec +22 -0
- data/nutritious.iml +24 -0
- metadata +106 -0
data/.gitignore
ADDED
data/.idea/.name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nutritious
|
data/.idea/.rakeTasks
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
|
3
|
+
You are allowed to:
|
|
4
|
+
1. Remove rake task
|
|
5
|
+
2. Add existing rake tasks
|
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build nutritious-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install nutritious-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push nutritious-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
|
data/.idea/compiler.xml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="CompilerConfiguration">
|
|
4
|
+
<option name="DEFAULT_COMPILER" value="Javac" />
|
|
5
|
+
<resourceExtensions>
|
|
6
|
+
<entry name=".+\.(properties|xml|html|dtd|tld)" />
|
|
7
|
+
<entry name=".+\.(gif|png|jpeg|jpg)" />
|
|
8
|
+
</resourceExtensions>
|
|
9
|
+
<wildcardResourcePatterns>
|
|
10
|
+
<entry name="?*.properties" />
|
|
11
|
+
<entry name="?*.xml" />
|
|
12
|
+
<entry name="?*.gif" />
|
|
13
|
+
<entry name="?*.png" />
|
|
14
|
+
<entry name="?*.jpeg" />
|
|
15
|
+
<entry name="?*.jpg" />
|
|
16
|
+
<entry name="?*.html" />
|
|
17
|
+
<entry name="?*.dtd" />
|
|
18
|
+
<entry name="?*.tld" />
|
|
19
|
+
<entry name="?*.ftl" />
|
|
20
|
+
</wildcardResourcePatterns>
|
|
21
|
+
<annotationProcessing enabled="false" useClasspath="true" />
|
|
22
|
+
</component>
|
|
23
|
+
</project>
|
|
24
|
+
|
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="BuildJarProjectSettings">
|
|
4
|
+
<option name="BUILD_JARS_ON_MAKE" value="false" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="CppTools.Loader" reportImplicitCastToBool="false" reportNameReferencedOnce="false" version="3" compilerSelect="AUTO" />
|
|
7
|
+
<component name="DependencyValidationManager">
|
|
8
|
+
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
|
9
|
+
</component>
|
|
10
|
+
<component name="EclipseCompilerSettings">
|
|
11
|
+
<option name="GENERATE_NO_WARNINGS" value="true" />
|
|
12
|
+
<option name="DEPRECATION" value="false" />
|
|
13
|
+
</component>
|
|
14
|
+
<component name="IdProvider" IDEtalkID="473F1DDD4224C0C95C58C11CF1204FDE" />
|
|
15
|
+
<component name="JavadocGenerationManager">
|
|
16
|
+
<option name="OUTPUT_DIRECTORY" />
|
|
17
|
+
<option name="OPTION_SCOPE" value="protected" />
|
|
18
|
+
<option name="OPTION_HIERARCHY" value="true" />
|
|
19
|
+
<option name="OPTION_NAVIGATOR" value="true" />
|
|
20
|
+
<option name="OPTION_INDEX" value="true" />
|
|
21
|
+
<option name="OPTION_SEPARATE_INDEX" value="true" />
|
|
22
|
+
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
|
|
23
|
+
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
|
|
24
|
+
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
|
|
25
|
+
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
|
|
26
|
+
<option name="OPTION_DEPRECATED_LIST" value="true" />
|
|
27
|
+
<option name="OTHER_OPTIONS" value="" />
|
|
28
|
+
<option name="HEAP_SIZE" />
|
|
29
|
+
<option name="LOCALE" />
|
|
30
|
+
<option name="OPEN_IN_BROWSER" value="true" />
|
|
31
|
+
</component>
|
|
32
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
|
33
|
+
<entry key="Project Default">
|
|
34
|
+
<profile-state />
|
|
35
|
+
</entry>
|
|
36
|
+
</component>
|
|
37
|
+
<component name="ProjectKey">
|
|
38
|
+
<option name="state" value="project://default" />
|
|
39
|
+
</component>
|
|
40
|
+
<component name="ProjectResources">
|
|
41
|
+
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
|
|
42
|
+
</component>
|
|
43
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="Ruby SDK 1.9.2-p180 [global]" project-jdk-type="RUBY_SDK">
|
|
44
|
+
<output url="file://$PROJECT_DIR$/out" />
|
|
45
|
+
</component>
|
|
46
|
+
<component name="ResourceManagerContainer">
|
|
47
|
+
<option name="myResourceBundles">
|
|
48
|
+
<value>
|
|
49
|
+
<list size="0" />
|
|
50
|
+
</value>
|
|
51
|
+
</option>
|
|
52
|
+
</component>
|
|
53
|
+
<component name="StarteamConfiguration">
|
|
54
|
+
<option name="SERVER" value="" />
|
|
55
|
+
<option name="PORT" value="49201" />
|
|
56
|
+
<option name="USER" value="" />
|
|
57
|
+
<option name="PASSWORD" value="" />
|
|
58
|
+
<option name="PROJECT" value="" />
|
|
59
|
+
<option name="VIEW" value="" />
|
|
60
|
+
<option name="ALTERNATIVE_WORKING_PATH" value="" />
|
|
61
|
+
<option name="LOCK_ON_CHECKOUT" value="false" />
|
|
62
|
+
<option name="UNLOCK_ON_CHECKIN" value="false" />
|
|
63
|
+
</component>
|
|
64
|
+
<component name="VssConfiguration">
|
|
65
|
+
<option name="CLIENT_PATH" value="" />
|
|
66
|
+
<option name="SRCSAFEINI_PATH" value="" />
|
|
67
|
+
<option name="USER_NAME" value="" />
|
|
68
|
+
<option name="PWD" value="" />
|
|
69
|
+
<CheckoutOptions>
|
|
70
|
+
<option name="COMMENT" value="" />
|
|
71
|
+
<option name="DO_NOT_GET_LATEST_VERSION" value="false" />
|
|
72
|
+
<option name="REPLACE_WRITABLE" value="false" />
|
|
73
|
+
<option name="RECURSIVE" value="false" />
|
|
74
|
+
</CheckoutOptions>
|
|
75
|
+
<CheckinOptions>
|
|
76
|
+
<option name="COMMENT" value="" />
|
|
77
|
+
<option name="KEEP_CHECKED_OUT" value="false" />
|
|
78
|
+
<option name="RECURSIVE" value="false" />
|
|
79
|
+
</CheckinOptions>
|
|
80
|
+
<AddOptions>
|
|
81
|
+
<option name="STORE_ONLY_LATEST_VERSION" value="false" />
|
|
82
|
+
<option name="CHECK_OUT_IMMEDIATELY" value="false" />
|
|
83
|
+
</AddOptions>
|
|
84
|
+
<UndocheckoutOptions>
|
|
85
|
+
<option name="MAKE_WRITABLE" value="false" />
|
|
86
|
+
<option name="REPLACE_LOCAL_COPY" value="2" />
|
|
87
|
+
<option name="RECURSIVE" value="false" />
|
|
88
|
+
</UndocheckoutOptions>
|
|
89
|
+
<GetOptions>
|
|
90
|
+
<option name="REPLACE_WRITABLE" value="0" />
|
|
91
|
+
<option name="MAKE_WRITABLE" value="false" />
|
|
92
|
+
<option name="ANSWER_NEGATIVELY" value="false" />
|
|
93
|
+
<option name="ANSWER_POSITIVELY" value="false" />
|
|
94
|
+
<option name="RECURSIVE" value="false" />
|
|
95
|
+
<option name="VERSION" />
|
|
96
|
+
</GetOptions>
|
|
97
|
+
</component>
|
|
98
|
+
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
|
99
|
+
<component name="XPathView.XPathProjectComponent">
|
|
100
|
+
<history />
|
|
101
|
+
<find-history />
|
|
102
|
+
</component>
|
|
103
|
+
</project>
|
|
104
|
+
|
data/.idea/modules.xml
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="Palette2">
|
|
4
|
+
<group name="Swing">
|
|
5
|
+
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
6
|
+
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
|
7
|
+
</item>
|
|
8
|
+
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
9
|
+
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
|
10
|
+
</item>
|
|
11
|
+
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
12
|
+
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
|
13
|
+
</item>
|
|
14
|
+
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
|
15
|
+
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
|
16
|
+
</item>
|
|
17
|
+
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
18
|
+
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
|
19
|
+
<initial-values>
|
|
20
|
+
<property name="text" value="Button" />
|
|
21
|
+
</initial-values>
|
|
22
|
+
</item>
|
|
23
|
+
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
24
|
+
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
25
|
+
<initial-values>
|
|
26
|
+
<property name="text" value="RadioButton" />
|
|
27
|
+
</initial-values>
|
|
28
|
+
</item>
|
|
29
|
+
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
30
|
+
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
31
|
+
<initial-values>
|
|
32
|
+
<property name="text" value="CheckBox" />
|
|
33
|
+
</initial-values>
|
|
34
|
+
</item>
|
|
35
|
+
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
36
|
+
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
|
37
|
+
<initial-values>
|
|
38
|
+
<property name="text" value="Label" />
|
|
39
|
+
</initial-values>
|
|
40
|
+
</item>
|
|
41
|
+
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
42
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
43
|
+
<preferred-size width="150" height="-1" />
|
|
44
|
+
</default-constraints>
|
|
45
|
+
</item>
|
|
46
|
+
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
47
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
48
|
+
<preferred-size width="150" height="-1" />
|
|
49
|
+
</default-constraints>
|
|
50
|
+
</item>
|
|
51
|
+
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
52
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
53
|
+
<preferred-size width="150" height="-1" />
|
|
54
|
+
</default-constraints>
|
|
55
|
+
</item>
|
|
56
|
+
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
57
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
58
|
+
<preferred-size width="150" height="50" />
|
|
59
|
+
</default-constraints>
|
|
60
|
+
</item>
|
|
61
|
+
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
62
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
63
|
+
<preferred-size width="150" height="50" />
|
|
64
|
+
</default-constraints>
|
|
65
|
+
</item>
|
|
66
|
+
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
67
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
68
|
+
<preferred-size width="150" height="50" />
|
|
69
|
+
</default-constraints>
|
|
70
|
+
</item>
|
|
71
|
+
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
72
|
+
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
|
73
|
+
</item>
|
|
74
|
+
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
75
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
76
|
+
<preferred-size width="150" height="50" />
|
|
77
|
+
</default-constraints>
|
|
78
|
+
</item>
|
|
79
|
+
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
80
|
+
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
|
81
|
+
<preferred-size width="150" height="50" />
|
|
82
|
+
</default-constraints>
|
|
83
|
+
</item>
|
|
84
|
+
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
85
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
86
|
+
<preferred-size width="150" height="50" />
|
|
87
|
+
</default-constraints>
|
|
88
|
+
</item>
|
|
89
|
+
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
90
|
+
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
91
|
+
<preferred-size width="200" height="200" />
|
|
92
|
+
</default-constraints>
|
|
93
|
+
</item>
|
|
94
|
+
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
95
|
+
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
96
|
+
<preferred-size width="200" height="200" />
|
|
97
|
+
</default-constraints>
|
|
98
|
+
</item>
|
|
99
|
+
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
100
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
101
|
+
</item>
|
|
102
|
+
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
103
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
104
|
+
</item>
|
|
105
|
+
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
106
|
+
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
|
107
|
+
</item>
|
|
108
|
+
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
109
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
|
110
|
+
</item>
|
|
111
|
+
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
112
|
+
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
|
113
|
+
<preferred-size width="-1" height="20" />
|
|
114
|
+
</default-constraints>
|
|
115
|
+
</item>
|
|
116
|
+
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
117
|
+
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
|
118
|
+
</item>
|
|
119
|
+
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
120
|
+
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
|
121
|
+
</item>
|
|
122
|
+
</group>
|
|
123
|
+
</component>
|
|
124
|
+
</project>
|
|
125
|
+
|
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
nutritious (0.0.1)
|
|
5
|
+
feedzirra
|
|
6
|
+
hpricot
|
|
7
|
+
i18n
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: http://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activesupport (3.0.5)
|
|
13
|
+
builder (3.0.0)
|
|
14
|
+
curb (0.7.15)
|
|
15
|
+
feedzirra (0.0.24)
|
|
16
|
+
activesupport (>= 2.3.8)
|
|
17
|
+
builder (>= 2.1.2)
|
|
18
|
+
curb (>= 0.2.3)
|
|
19
|
+
loofah (>= 0.3.1)
|
|
20
|
+
nokogiri (> 0.0.0)
|
|
21
|
+
sax-machine (>= 0.0.12)
|
|
22
|
+
hpricot (0.8.4)
|
|
23
|
+
i18n (0.5.0)
|
|
24
|
+
loofah (1.0.0)
|
|
25
|
+
nokogiri (>= 1.3.3)
|
|
26
|
+
nokogiri (1.4.4)
|
|
27
|
+
sax-machine (0.0.16)
|
|
28
|
+
nokogiri (> 0.0.0)
|
|
29
|
+
|
|
30
|
+
PLATFORMS
|
|
31
|
+
ruby
|
|
32
|
+
|
|
33
|
+
DEPENDENCIES
|
|
34
|
+
nutritious!
|
data/README
ADDED
data/Rakefile
ADDED
data/lib/nutritious.rb
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
require 'open-uri'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
require 'feedzirra'
|
|
5
|
+
require 'hpricot'
|
|
6
|
+
|
|
7
|
+
module Nutritious
|
|
8
|
+
|
|
9
|
+
def self.process_single_bookmark(e)
|
|
10
|
+
# entry id example: @entry_id="http://www.delicious.com/url/db62a351ed098a6d8acc42a620d4cfde#quilombosam"
|
|
11
|
+
entry_id = $1 if e.entry_id =~ /.*url\/(.+)#/
|
|
12
|
+
|
|
13
|
+
# load 20 latest tags
|
|
14
|
+
all_tags = Hash.new(0)
|
|
15
|
+
e.categories.each { |cat| all_tags[cat] += 1 }
|
|
16
|
+
detailed_feed = Feedzirra::Feed.fetch_and_parse("http://feeds.delicious.com/v2/rss/url/#{entry_id}?count=20")
|
|
17
|
+
detailed_feed.entries.each { |p| p.categories.each { |cat| all_tags[cat] += 1 } }
|
|
18
|
+
|
|
19
|
+
# take only best tags
|
|
20
|
+
consensus_tags = all_tags.to_a.sort{ |a,b| a[1] <=> b[1]}.reverse.slice(0,5).reject { |t| t[1]<3 }
|
|
21
|
+
if consensus_tags.empty?
|
|
22
|
+
return nil
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# load doc body
|
|
26
|
+
doc = open(e.url) { |f| Hpricot(f) }
|
|
27
|
+
doc.search("script").remove
|
|
28
|
+
doc.search("style").remove
|
|
29
|
+
body = doc.search("body").text.gsub(/\s+/, ' ')
|
|
30
|
+
|
|
31
|
+
#collect
|
|
32
|
+
{:url => e.url, :title =>e.title, :tags => consensus_tags.map { |t| t[0] }, :body => body}
|
|
33
|
+
rescue
|
|
34
|
+
nil
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.load_recent(count)
|
|
38
|
+
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.delicious.com/v2/rss/recent?min=2&count=#{count}")
|
|
39
|
+
feed.entries.each do |e|
|
|
40
|
+
rr = process_single_bookmark(e)
|
|
41
|
+
yield rr if rr && block_given?
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
data/nutritious.gemspec
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
Gem::Specification.new do |s|
|
|
3
|
+
s.name = "nutritious"
|
|
4
|
+
s.version = '0.0.1'
|
|
5
|
+
s.platform = Gem::Platform::RUBY
|
|
6
|
+
s.authors = ["Gregory Mostizky"]
|
|
7
|
+
s.email = ["gregory.mostizky@gmail.com"]
|
|
8
|
+
s.homepage = "http://arubyguy.com"
|
|
9
|
+
s.summary = %q{Reads bookmark stream from del.icio.us}
|
|
10
|
+
s.description = %q{Reads bookmark stream from del.icio.us}
|
|
11
|
+
|
|
12
|
+
s.rubyforge_project = "nutritious"
|
|
13
|
+
|
|
14
|
+
s.add_dependency('i18n')
|
|
15
|
+
s.add_dependency('hpricot')
|
|
16
|
+
s.add_dependency('feedzirra')
|
|
17
|
+
|
|
18
|
+
s.files = `git ls-files`.split("\n")
|
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
21
|
+
s.require_paths = ["lib"]
|
|
22
|
+
end
|
data/nutritious.iml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
|
|
7
|
+
</content>
|
|
8
|
+
<orderEntry type="jdk" jdkName="Ruby SDK 1.9.2-p180" jdkType="RUBY_SDK" />
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] bundler (v1.0.10, /home/builder/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.10)" level="application" />
|
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] feedzirra (v0.0.24, /home/builder/.rvm/gems/ruby-1.9.2-p180/bundler/gems/feedzirra-07fd6aaeec09)" level="application" />
|
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] builder (v3.0.0, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/builder-3.0.0)" level="application" />
|
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] activesupport (v3.0.5, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.5)" level="application" />
|
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] nokogiri (v1.4.4, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/nokogiri-1.4.4)" level="application" />
|
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] loofah (v1.0.0, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/loofah-1.0.0)" level="application" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] curb (v0.7.15, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/curb-0.7.15)" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] sax-machine (v0.0.16, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/sax-machine-0.0.16)" level="application" />
|
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] nokogiri (v1.4.4, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/nokogiri-1.4.4)" level="application" />
|
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] i18n (v0.5.0, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/i18n-0.5.0)" level="application" />
|
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] hpricot (v0.8.4, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/hpricot-0.8.4)" level="application" />
|
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] nutritious (v0.0.1, /home/builder/.rvm/gems/ruby-1.9.2-p180/gems/nutritious-0.0.1)" level="application" />
|
|
22
|
+
</component>
|
|
23
|
+
</module>
|
|
24
|
+
|
metadata
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: nutritious
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
prerelease:
|
|
5
|
+
version: 0.0.1
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Gregory Mostizky
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
|
|
13
|
+
date: 2011-03-30 00:00:00 +02:00
|
|
14
|
+
default_executable:
|
|
15
|
+
dependencies:
|
|
16
|
+
- !ruby/object:Gem::Dependency
|
|
17
|
+
name: i18n
|
|
18
|
+
prerelease: false
|
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
20
|
+
none: false
|
|
21
|
+
requirements:
|
|
22
|
+
- - ">="
|
|
23
|
+
- !ruby/object:Gem::Version
|
|
24
|
+
version: "0"
|
|
25
|
+
type: :runtime
|
|
26
|
+
version_requirements: *id001
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: hpricot
|
|
29
|
+
prerelease: false
|
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
31
|
+
none: false
|
|
32
|
+
requirements:
|
|
33
|
+
- - ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: "0"
|
|
36
|
+
type: :runtime
|
|
37
|
+
version_requirements: *id002
|
|
38
|
+
- !ruby/object:Gem::Dependency
|
|
39
|
+
name: feedzirra
|
|
40
|
+
prerelease: false
|
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
42
|
+
none: false
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: "0"
|
|
47
|
+
type: :runtime
|
|
48
|
+
version_requirements: *id003
|
|
49
|
+
description: Reads bookmark stream from del.icio.us
|
|
50
|
+
email:
|
|
51
|
+
- gregory.mostizky@gmail.com
|
|
52
|
+
executables: []
|
|
53
|
+
|
|
54
|
+
extensions: []
|
|
55
|
+
|
|
56
|
+
extra_rdoc_files: []
|
|
57
|
+
|
|
58
|
+
files:
|
|
59
|
+
- .gitignore
|
|
60
|
+
- .idea/.name
|
|
61
|
+
- .idea/.rakeTasks
|
|
62
|
+
- .idea/compiler.xml
|
|
63
|
+
- .idea/copyright/profiles_settings.xml
|
|
64
|
+
- .idea/encodings.xml
|
|
65
|
+
- .idea/misc.xml
|
|
66
|
+
- .idea/modules.xml
|
|
67
|
+
- .idea/uiDesigner.xml
|
|
68
|
+
- .idea/vcs.xml
|
|
69
|
+
- Gemfile
|
|
70
|
+
- Gemfile.lock
|
|
71
|
+
- README
|
|
72
|
+
- Rakefile
|
|
73
|
+
- examples/load_recent.rb
|
|
74
|
+
- lib/nutritious.rb
|
|
75
|
+
- nutritious.gemspec
|
|
76
|
+
- nutritious.iml
|
|
77
|
+
has_rdoc: true
|
|
78
|
+
homepage: http://arubyguy.com
|
|
79
|
+
licenses: []
|
|
80
|
+
|
|
81
|
+
post_install_message:
|
|
82
|
+
rdoc_options: []
|
|
83
|
+
|
|
84
|
+
require_paths:
|
|
85
|
+
- lib
|
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
|
+
none: false
|
|
88
|
+
requirements:
|
|
89
|
+
- - ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: "0"
|
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
|
+
none: false
|
|
94
|
+
requirements:
|
|
95
|
+
- - ">="
|
|
96
|
+
- !ruby/object:Gem::Version
|
|
97
|
+
version: "0"
|
|
98
|
+
requirements: []
|
|
99
|
+
|
|
100
|
+
rubyforge_project: nutritious
|
|
101
|
+
rubygems_version: 1.6.2
|
|
102
|
+
signing_key:
|
|
103
|
+
specification_version: 3
|
|
104
|
+
summary: Reads bookmark stream from del.icio.us
|
|
105
|
+
test_files: []
|
|
106
|
+
|