Graphiclious 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +126 -0
- data/Rakefile +28 -0
- data/bin/graphiclious +3 -0
- data/doc/cloud.jpg +0 -0
- data/doc/index.html +32 -0
- data/doc/screenshots/default.css +44 -0
- data/doc/screenshots/original/blue-style-1.html +37 -0
- data/doc/screenshots/original/blue-style-1.jpg +0 -0
- data/doc/screenshots/original/cornflower.html +37 -0
- data/doc/screenshots/original/cornflower.jpg +0 -0
- data/doc/screenshots/original/custom-style.html +37 -0
- data/doc/screenshots/original/custom-style.jpg +0 -0
- data/doc/screenshots/original/sample-graph.html +37 -0
- data/doc/screenshots/original/sample-graph.jpg +0 -0
- data/doc/screenshots/original/user-interface.html +37 -0
- data/doc/screenshots/original/user-interface.jpg +0 -0
- data/doc/screenshots/thumb.html +46 -0
- data/doc/screenshots/thumb/t_blue-style-1.jpg +0 -0
- data/doc/screenshots/thumb/t_cornflower.jpg +0 -0
- data/doc/screenshots/thumb/t_custom-style.jpg +0 -0
- data/doc/screenshots/thumb/t_sample-graph.jpg +0 -0
- data/doc/screenshots/thumb/t_user-interface.jpg +0 -0
- data/doc/style.css +60 -0
- data/gemspec.rb +45 -0
- data/lib/graphiclious.rb +78 -0
- data/lib/graphiclious/delicious2yaml.rb +235 -0
- data/lib/graphiclious/dot_attributes.rb +35 -0
- data/lib/graphiclious/environment.rb +36 -0
- data/lib/graphiclious/gui.rb +260 -0
- data/lib/graphiclious/help.rb +22 -0
- data/lib/graphiclious/require_fox.rb +12 -0
- data/lib/graphiclious/url_graph.rb +135 -0
- data/lib/graphiclious/utf8.rb +19 -0
- data/lib/graphiclious/version.rb +8 -0
- data/lib/graphiclious/yaml-links2html.rb +476 -0
- data/options.yaml +7 -0
- data/styles/blue-style-1/dot-attributes.yaml +21 -0
- data/styles/blue-style-1/extern.gif +0 -0
- data/styles/blue-style-1/style.css +128 -0
- data/styles/cornflower/cornflower.png +0 -0
- data/styles/cornflower/dot-attributes.yaml +21 -0
- data/styles/cornflower/extern.gif +0 -0
- data/styles/cornflower/h3.gif +0 -0
- data/styles/cornflower/menuitem.png +0 -0
- data/styles/cornflower/menuselected.png +0 -0
- data/styles/cornflower/style.css +149 -0
- data/styles/cornflower/tr-edge.png +0 -0
- data/test/test_delicious2yaml.rb +97 -0
- data/wickie +249 -0
- metadata +119 -0
data/options.yaml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
--- !ruby/object:DotAttributes
|
2
|
+
edge_attributes: {}
|
3
|
+
graph_attributes:
|
4
|
+
name: UrlGraph
|
5
|
+
ranksep: "0.2"
|
6
|
+
labelloc: top
|
7
|
+
bgcolor: lightslateblue
|
8
|
+
orientation: portrait
|
9
|
+
rankdir: LR
|
10
|
+
label: tag relation graph
|
11
|
+
nodesep: "0.1"
|
12
|
+
node_attributes:
|
13
|
+
fillcolor: white
|
14
|
+
fontcolor: blue
|
15
|
+
fontname: Arial
|
16
|
+
fontsize: "10"
|
17
|
+
shape: ellipse
|
18
|
+
color: orange
|
19
|
+
height: "0.2"
|
20
|
+
width: "1"
|
21
|
+
style: filled
|
Binary file
|
@@ -0,0 +1,128 @@
|
|
1
|
+
/**
|
2
|
+
#6666CC => dunkel
|
3
|
+
#9999FF => pastell
|
4
|
+
#CCCCFF => hell
|
5
|
+
*/
|
6
|
+
|
7
|
+
/** Basic paragraph styles
|
8
|
+
*/
|
9
|
+
body {
|
10
|
+
color:#FFFFFF;
|
11
|
+
background-color:#6666CC;
|
12
|
+
border-width:medium;
|
13
|
+
border-top-color:#FFFFFF;
|
14
|
+
border-bottom-color:#000000;
|
15
|
+
border-left-color:#FFFFFF;
|
16
|
+
border-right-color:#000000;
|
17
|
+
}
|
18
|
+
div.main {
|
19
|
+
vertical-align:top;
|
20
|
+
color:#000000;
|
21
|
+
background-color:#CCCCFF;
|
22
|
+
margin:0px;
|
23
|
+
padding:1em;
|
24
|
+
}
|
25
|
+
img {
|
26
|
+
border-style:none;
|
27
|
+
}
|
28
|
+
ul {
|
29
|
+
list-style-type:circle;
|
30
|
+
}
|
31
|
+
/* Basic link style
|
32
|
+
*/
|
33
|
+
a:link {
|
34
|
+
color:black;
|
35
|
+
text-decoration:underline;
|
36
|
+
}
|
37
|
+
a:visited {
|
38
|
+
color:#555555;
|
39
|
+
text-decoration:underline;
|
40
|
+
}
|
41
|
+
a:hover {
|
42
|
+
color:black;
|
43
|
+
text-decoration:underline;
|
44
|
+
}
|
45
|
+
a:active {
|
46
|
+
color:black;
|
47
|
+
text-decoration:none;
|
48
|
+
}
|
49
|
+
|
50
|
+
.extern {
|
51
|
+
background: transparent url(extern.gif) no-repeat top left;
|
52
|
+
padding-left:12px;
|
53
|
+
}
|
54
|
+
|
55
|
+
/** Menu styles
|
56
|
+
*/
|
57
|
+
|
58
|
+
.mainmenu {
|
59
|
+
display:inline-table;
|
60
|
+
}
|
61
|
+
.menuitem {
|
62
|
+
display:inline;
|
63
|
+
background-color:#CCCCFF;
|
64
|
+
border-style:solid;
|
65
|
+
border-left-style:none;
|
66
|
+
border-bottom-style:none;
|
67
|
+
padding:2px;
|
68
|
+
}
|
69
|
+
.menuitem a:link {
|
70
|
+
color:black;
|
71
|
+
text-decoration:none;
|
72
|
+
font-weight:bold;
|
73
|
+
}
|
74
|
+
.menuitem a:visited {
|
75
|
+
color:black;
|
76
|
+
text-decoration:none;
|
77
|
+
font-weight:bold;
|
78
|
+
}
|
79
|
+
.menuitem a:active {
|
80
|
+
color:white;
|
81
|
+
text-decoration:none;
|
82
|
+
font-weight:bold;
|
83
|
+
}
|
84
|
+
.menuitem a:hover {
|
85
|
+
color:black;
|
86
|
+
text-decoration:none;
|
87
|
+
font-weight:bold;
|
88
|
+
}
|
89
|
+
.menuselected {
|
90
|
+
display:inline;
|
91
|
+
color:#FFFFFF;
|
92
|
+
background-color:#6666CC;
|
93
|
+
border-style:solid;
|
94
|
+
padding:2px;
|
95
|
+
}
|
96
|
+
|
97
|
+
/* Tag-clouds
|
98
|
+
*/
|
99
|
+
.cloud-1{
|
100
|
+
font-size:0.8em
|
101
|
+
}
|
102
|
+
.cloud-2{
|
103
|
+
font-size:0.9em
|
104
|
+
}
|
105
|
+
.cloud-3{
|
106
|
+
font-size:1.0em
|
107
|
+
}
|
108
|
+
.cloud-4{
|
109
|
+
font-size:1.1em
|
110
|
+
}
|
111
|
+
.cloud-5{
|
112
|
+
font-size:1.2em
|
113
|
+
}
|
114
|
+
.cloud-6{
|
115
|
+
font-size:1.3em
|
116
|
+
}
|
117
|
+
.cloud-7{
|
118
|
+
font-size:1.4em
|
119
|
+
}
|
120
|
+
.cloud-8{
|
121
|
+
font-size:1.5em
|
122
|
+
}
|
123
|
+
.cloud-9{
|
124
|
+
font-size:1.6em
|
125
|
+
}
|
126
|
+
.cloud-10{
|
127
|
+
font-size:1.7em
|
128
|
+
}
|
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
--- !ruby/object:DotAttributes
|
2
|
+
edge_attributes: {}
|
3
|
+
graph_attributes:
|
4
|
+
name: UrlGraph
|
5
|
+
ranksep: "0.2"
|
6
|
+
labelloc: top
|
7
|
+
bgcolor: cornflowerblue
|
8
|
+
orientation: portrait
|
9
|
+
rankdir: LR
|
10
|
+
label: tag relation graph
|
11
|
+
nodesep: "0.1"
|
12
|
+
node_attributes:
|
13
|
+
fillcolor: white
|
14
|
+
fontcolor: blue
|
15
|
+
fontname: Arial
|
16
|
+
fontsize: "10"
|
17
|
+
shape: ellipse
|
18
|
+
color: orange
|
19
|
+
height: "0.2"
|
20
|
+
width: "1"
|
21
|
+
style: filled
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,149 @@
|
|
1
|
+
/**
|
2
|
+
cornflowerblue ~ #6495ED => dunkel RGB 100/49/237
|
3
|
+
#9999FF => pastell
|
4
|
+
#CCCCFF => hell => RGB 204/204/255
|
5
|
+
*/
|
6
|
+
|
7
|
+
/** Basic paragraph styles
|
8
|
+
*/
|
9
|
+
body {
|
10
|
+
color:#FFFFFF;
|
11
|
+
background-color:cornflowerblue;
|
12
|
+
border-width:medium;
|
13
|
+
border-top-color:#FFFFFF;
|
14
|
+
border-bottom-color:#000000;
|
15
|
+
border-left-color:#FFFFFF;
|
16
|
+
border-right-color:#000000;
|
17
|
+
}
|
18
|
+
div.main {
|
19
|
+
position:absolute;
|
20
|
+
top:80px;
|
21
|
+
left:20px;
|
22
|
+
width:70%;
|
23
|
+
height:100%;
|
24
|
+
vertical-align:top;
|
25
|
+
color:#000000;
|
26
|
+
background-color:#CCCCFF;
|
27
|
+
background-image:url(tr-edge.png);
|
28
|
+
background-position:top right;
|
29
|
+
background-repeat:no-repeat;
|
30
|
+
margin:0px;
|
31
|
+
margin-left:2em;
|
32
|
+
padding:1em;
|
33
|
+
padding-left:136px;
|
34
|
+
}
|
35
|
+
img {
|
36
|
+
border-style:none;
|
37
|
+
}
|
38
|
+
/* Basic link style
|
39
|
+
*/
|
40
|
+
a:link {
|
41
|
+
color:black;
|
42
|
+
text-decoration:underline;
|
43
|
+
}
|
44
|
+
a:visited {
|
45
|
+
color:#555555;
|
46
|
+
text-decoration:underline;
|
47
|
+
}
|
48
|
+
a:hover {
|
49
|
+
color:black;
|
50
|
+
text-decoration:underline;
|
51
|
+
}
|
52
|
+
a:active {
|
53
|
+
color:black;
|
54
|
+
text-decoration:none;
|
55
|
+
}
|
56
|
+
|
57
|
+
.extern {
|
58
|
+
background: transparent url(extern.gif) no-repeat top left;
|
59
|
+
padding-left:12px;
|
60
|
+
}
|
61
|
+
|
62
|
+
/** Menu styles
|
63
|
+
*/
|
64
|
+
|
65
|
+
.mainmenu {
|
66
|
+
z-index:2;
|
67
|
+
position:absolute;
|
68
|
+
top:80px;
|
69
|
+
left:10px;
|
70
|
+
vertical-align:middle;
|
71
|
+
text-align:center;
|
72
|
+
font-size:18px;
|
73
|
+
width:166px;
|
74
|
+
padding:0px;
|
75
|
+
}
|
76
|
+
|
77
|
+
.menuitem {
|
78
|
+
position:relative;
|
79
|
+
background: transparent url(menuitem.png) no-repeat center center;
|
80
|
+
border-style:none;
|
81
|
+
height:28px;
|
82
|
+
}
|
83
|
+
.menuitem a:link {
|
84
|
+
color:black;
|
85
|
+
text-decoration:none;
|
86
|
+
font-weight:bold;
|
87
|
+
}
|
88
|
+
.menuitem a:visited {
|
89
|
+
color:black;
|
90
|
+
text-decoration:none;
|
91
|
+
font-weight:bold;
|
92
|
+
}
|
93
|
+
.menuitem a:active {
|
94
|
+
color:white;
|
95
|
+
text-decoration:none;
|
96
|
+
font-weight:bold;
|
97
|
+
}
|
98
|
+
.menuitem a:hover {
|
99
|
+
color:black;
|
100
|
+
text-decoration:none;
|
101
|
+
font-weight:bold;
|
102
|
+
}
|
103
|
+
.menuselected {
|
104
|
+
color:#FFFFFF;
|
105
|
+
position:relative;
|
106
|
+
background: transparent url(menuselected.png) no-repeat center center;
|
107
|
+
border-style:none;
|
108
|
+
height:28px;
|
109
|
+
}
|
110
|
+
|
111
|
+
h3 {
|
112
|
+
background: transparent url(h3.gif) no-repeat top left;
|
113
|
+
padding-left: 50px;
|
114
|
+
min-height:40px;
|
115
|
+
font-size:30px;
|
116
|
+
}
|
117
|
+
|
118
|
+
/* Tag-clouds
|
119
|
+
*/
|
120
|
+
.cloud-1{
|
121
|
+
font-size:0.8em
|
122
|
+
}
|
123
|
+
.cloud-2{
|
124
|
+
font-size:0.9em
|
125
|
+
}
|
126
|
+
.cloud-3{
|
127
|
+
font-size:1.0em
|
128
|
+
}
|
129
|
+
.cloud-4{
|
130
|
+
font-size:1.1em
|
131
|
+
}
|
132
|
+
.cloud-5{
|
133
|
+
font-size:1.2em
|
134
|
+
}
|
135
|
+
.cloud-6{
|
136
|
+
font-size:1.3em
|
137
|
+
}
|
138
|
+
.cloud-7{
|
139
|
+
font-size:1.4em
|
140
|
+
}
|
141
|
+
.cloud-8{
|
142
|
+
font-size:1.5em
|
143
|
+
}
|
144
|
+
.cloud-9{
|
145
|
+
font-size:1.6em
|
146
|
+
}
|
147
|
+
.cloud-10{
|
148
|
+
font-size:1.7em
|
149
|
+
}
|
Binary file
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'graphiclious/delicious2yaml'
|
3
|
+
|
4
|
+
class RubiliciousMock
|
5
|
+
attr_accessor(:links, :time, :bundles)
|
6
|
+
def initialize
|
7
|
+
@links = Hash.new
|
8
|
+
@bundles = Hash.new
|
9
|
+
@time = Time.now
|
10
|
+
end
|
11
|
+
|
12
|
+
def all
|
13
|
+
@links
|
14
|
+
end
|
15
|
+
|
16
|
+
def recent
|
17
|
+
@links
|
18
|
+
end
|
19
|
+
|
20
|
+
def update
|
21
|
+
@time
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class Delicious2YamlWithMock < Delicious2Yaml
|
26
|
+
attr_accessor(:interface, :test_cache)
|
27
|
+
def create_interface
|
28
|
+
@interface = RubiliciousMock.new
|
29
|
+
end
|
30
|
+
|
31
|
+
def update
|
32
|
+
@test_cache = Hash.new
|
33
|
+
super
|
34
|
+
end
|
35
|
+
|
36
|
+
def store_links(cache)
|
37
|
+
@test_cache = cache
|
38
|
+
super(cache)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class TestDelicious2Yaml < Test::Unit::TestCase
|
43
|
+
def setup
|
44
|
+
@user = 'dummy_user'
|
45
|
+
@importer = Delicious2YamlWithMock.new(@user, 'dummy_password')
|
46
|
+
@link = {
|
47
|
+
'href'=>'http://www.xxx.com/',
|
48
|
+
'time'=>'2006-04-01 23:42:13 +01:00',
|
49
|
+
'hash'=>'123456789',
|
50
|
+
'tags'=>['tag1', 'tag2', 'tag3'],
|
51
|
+
'description'=>'This is a test link'
|
52
|
+
}
|
53
|
+
@bundles = { 'bundle1' => ['tag2' 'tag3'] }
|
54
|
+
end
|
55
|
+
|
56
|
+
def teardown
|
57
|
+
[timestamp_file, import_file, bundle_file].each do
|
58
|
+
|file|
|
59
|
+
File.delete(file) if File.exists?(file)
|
60
|
+
end
|
61
|
+
[@user].each do
|
62
|
+
|dir|
|
63
|
+
Dir.delete(dir) if File.exists?(dir)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_basic_function
|
68
|
+
disable_time_check
|
69
|
+
timestamp_file = File.join(@user, 'delicious.time')
|
70
|
+
if(File.exists?(timestamp_file))
|
71
|
+
File.delete(timestamp_file)
|
72
|
+
end
|
73
|
+
@importer.interface.links = [@link]
|
74
|
+
@importer.update
|
75
|
+
assert(File.exists?(timestamp_file))
|
76
|
+
assert(File.exists?(import_file))
|
77
|
+
assert(@importer.test_cache.keys.size == 1)
|
78
|
+
end
|
79
|
+
|
80
|
+
def timestamp_file
|
81
|
+
File.join(@user, 'delicious.time')
|
82
|
+
end
|
83
|
+
|
84
|
+
def import_file
|
85
|
+
File.join(@user, 'delicious.yaml')
|
86
|
+
end
|
87
|
+
|
88
|
+
def bundle_file
|
89
|
+
File.join(@user, 'bundles.yaml')
|
90
|
+
end
|
91
|
+
|
92
|
+
def disable_time_check
|
93
|
+
if(File.exists?(timestamp_file))
|
94
|
+
File.delete(timestamp_file)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|