Graphiclious 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +2 -0
- data/doc/install.html +23 -23
- data/javascript/cloud.js +87 -12
- data/javascript/index.htm +3 -2
- data/lib/graphiclious/version.rb +1 -1
- metadata +4 -4
data/CHANGES.txt
CHANGED
data/doc/install.html
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<meta name="author" content="Sascha D�rdelmann">
|
6
6
|
<meta name="generator" content="Ulli Meybohms HTML EDITOR">
|
7
7
|
<meta name="keywords" lang="en"
|
8
|
-
|
8
|
+
content="Graphiclious,del.icio.us,static webpage generator">
|
9
9
|
<link rel="stylesheet" type="text/css" href="style.css">
|
10
10
|
<title>Graphiclious Installation</title>
|
11
11
|
</head>
|
@@ -13,26 +13,26 @@
|
|
13
13
|
<h1>Graphiclious Installation</h1>
|
14
14
|
<div class="main">
|
15
15
|
<ul class="menu">
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
<li class="menuitem"><a href="index.html">Homepage</a></li>
|
17
|
+
<li class="menuitem"><a href="screenshots/thumb.html">Screenshots</a></li>
|
18
|
+
<li class="menuselected">Installation</li>
|
19
|
+
<li class="menuitem"><a href="help.html">Documentation</a></li>
|
20
20
|
</ul>
|
21
21
|
<h2>Requirements & Installation</h2>
|
22
22
|
<p>Do you have an account at <a class="extern"
|
23
|
-
|
23
|
+
href="http://del.icio.us/">del.icio.us</a>? If not, there is nothing,
|
24
24
|
Graphiclious can do for you at current state of development. File a
|
25
25
|
feature request or better: join the development team and add new
|
26
26
|
features yourself.</p>
|
27
27
|
<p>Graphiclious is written in the <a class="extern"
|
28
|
-
|
28
|
+
href="http://www.ruby-lang.org/en/">Ruby programming language <a>
|
29
29
|
and needs the Ruby interpreter and <a class="extern"
|
30
|
-
|
30
|
+
href="http://www.rubygems.org/">Rubygems</a> to be installed on your
|
31
31
|
computer. </p>
|
32
32
|
<p>Graphiclious has a simple user interface that is written in <a
|
33
|
-
|
33
|
+
class="extern" href="http://www.fxruby.org/">FXRuby</a>. On Windows,
|
34
34
|
the <a class="extern"
|
35
|
-
|
35
|
+
href="http://rubyforge.org/projects/rubyinstaller/">Ruby installer</a>
|
36
36
|
has an option to install Rubygems and FXRuby for you, too.</p>
|
37
37
|
<p>Once, Rubygems is installed, things become easy: Just run each of
|
38
38
|
the following commands</p>
|
@@ -40,29 +40,29 @@ the following commands</p>
|
|
40
40
|
gem install RGL<br>
|
41
41
|
gem install Graphiclious</p>
|
42
42
|
<p>on the commandline to install <a class="extern"
|
43
|
-
|
44
|
-
|
43
|
+
href="http://pablotron.org/software/rubilicious/">Rubilicious</a>, <a
|
44
|
+
class="extern" href="http://rubyforge.org/projects/rgl/">RGL</a> and
|
45
45
|
Graphiclious. Choose Version 0.2.0 for Rubilicious and latest version of
|
46
46
|
Stream, RGL and Graphiclious when asked.</p>
|
47
47
|
<p>(Note: If your do not acess the internet directly but over a
|
48
48
|
proxy server, please set up the proxy configuration as described in the
|
49
49
|
<a class="extern"
|
50
|
-
|
50
|
+
href="http://wiki.rubyonrails.com/rails/pages/GemRails">Ruby on
|
51
51
|
Rails wiki</a>.)
|
52
52
|
<p>
|
53
53
|
<h2>Additional features</h2>
|
54
54
|
<p>Some features require additional software.</p>
|
55
55
|
<ul>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
<li>To generate html image maps showing tag relations you'll need
|
57
|
+
<a class="extern" href="http://www.graphviz.org/">Graphviz</a>.</li>
|
58
|
+
<li>To show thumbnail images of these maps in the generated web
|
59
|
+
pages you'll need <a class="extern"
|
60
|
+
href="http://rmagick.rubyforge.org/">RMagick</a>.</li>
|
61
|
+
<li>To conveniently upload the generated web-pages to your
|
62
|
+
homepage directly from the Graphiclious user interface you should try <a
|
63
|
+
class="extern" href="http://sourceforge.net/projects/piggy/">Piggy
|
64
|
+
ftp browser</a>.</li>
|
65
65
|
</ul>
|
66
66
|
</div>
|
67
67
|
</body>
|
68
|
-
</html>
|
68
|
+
</html>
|
data/javascript/cloud.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// -*-javascript-*-
|
2
|
-
// $Id: cloud.js
|
2
|
+
// $Id: cloud.js 42 2007-10-08 19:09:22Z wsdng $
|
3
3
|
//
|
4
4
|
|
5
5
|
// Cloud constructor computes everything we need
|
@@ -18,6 +18,8 @@ function Cloud(links, varname, content_id)
|
|
18
18
|
this.filtered_links = new Array();
|
19
19
|
this.num_filtered_links = 0;
|
20
20
|
this.visible_links = new Array();
|
21
|
+
this.search="";
|
22
|
+
this.change_url = true;
|
21
23
|
|
22
24
|
// init hashes
|
23
25
|
for(var i in links)
|
@@ -59,6 +61,16 @@ new Cloud(new Array());
|
|
59
61
|
|
60
62
|
Cloud.prototype.MAX_STYLES = 10;
|
61
63
|
|
64
|
+
// Unless you call this function after constructing the cloud object
|
65
|
+
// the url will change by changing the tag-filter. This default
|
66
|
+
// behaviour will make the back button of the browser work.
|
67
|
+
// Call only if you prefer it a little bit faster and don't care about the url.
|
68
|
+
function Cloud_dont_change_url()
|
69
|
+
{
|
70
|
+
this.change_url = false;
|
71
|
+
}
|
72
|
+
Cloud.prototype.dont_change_url = Cloud_dont_change_url;
|
73
|
+
|
62
74
|
// We use a logarithmic scale to compute a fixed
|
63
75
|
// number of styles depending on link counts
|
64
76
|
function Cloud_downscale(val)
|
@@ -119,7 +131,11 @@ function Cloud_get_cloud_node()
|
|
119
131
|
span.className = this.get_style(this.num_links_for_tag[tag]);
|
120
132
|
var tag_node = document.createTextNode(tag);
|
121
133
|
var ankor = document.createElement('a');
|
122
|
-
|
134
|
+
if(this.change_url){
|
135
|
+
ankor.href = "javascript:window.location.search='" + this.get_search_with(tag) + "'";
|
136
|
+
} else {
|
137
|
+
ankor.href = 'javascript:' + this.varname + ".add_filter('" + tag + "')";
|
138
|
+
}
|
123
139
|
ankor.appendChild(tag_node);
|
124
140
|
span.appendChild(ankor);
|
125
141
|
div.appendChild(span);
|
@@ -147,7 +163,11 @@ function Cloud_get_filter_node()
|
|
147
163
|
var span = document.createElement('span');
|
148
164
|
var tag_node = document.createTextNode(tag);
|
149
165
|
var ankor = document.createElement('a');
|
150
|
-
|
166
|
+
if(this.change_url){
|
167
|
+
ankor.href = "javascript:window.location.search='" + this.get_search_without(tag) + "'";
|
168
|
+
} else {
|
169
|
+
ankor.href = 'javascript:' + this.varname + ".remove_filter('" + tag + "')";
|
170
|
+
}
|
151
171
|
ankor.appendChild(tag_node);
|
152
172
|
span.appendChild(ankor);
|
153
173
|
div.appendChild(span);
|
@@ -203,7 +223,7 @@ function Cloud_subst()
|
|
203
223
|
}
|
204
224
|
var ul = document.createElement("ul");
|
205
225
|
ul.className = 'link_list';
|
206
|
-
list_to_show = list_to_show.sort(Link_compare_desc)
|
226
|
+
list_to_show = list_to_show.sort(Link_compare_desc)
|
207
227
|
for(var l in list_to_show)
|
208
228
|
{
|
209
229
|
var link = list_to_show[l];
|
@@ -216,22 +236,77 @@ function Cloud_subst()
|
|
216
236
|
}
|
217
237
|
Cloud.prototype.subst = Cloud_subst;
|
218
238
|
|
219
|
-
function
|
239
|
+
function Cloud_get_search_with(tag)
|
220
240
|
{
|
221
|
-
|
241
|
+
var new_search = '';
|
242
|
+
if(this.num_filtered > 0){
|
243
|
+
new_search = this.search + "+" + tag;
|
244
|
+
} else {
|
245
|
+
new_search = tag;
|
246
|
+
}
|
247
|
+
return new_search;
|
248
|
+
}
|
249
|
+
Cloud.prototype.get_search_with = Cloud_get_search_with;
|
250
|
+
|
251
|
+
function Cloud_set_filtered(tag)
|
252
|
+
{
|
253
|
+
if(this.filter[tag] == false){
|
254
|
+
this.search = this.get_search_with(tag);
|
222
255
|
this.num_filtered++;
|
223
256
|
this.filter[tag] = true;
|
224
|
-
|
225
|
-
|
257
|
+
}
|
258
|
+
}
|
259
|
+
Cloud.prototype.set_filtered = Cloud_set_filtered;
|
260
|
+
|
261
|
+
function Cloud_add_filter(tag)
|
262
|
+
{
|
263
|
+
this.set_filtered(tag);
|
264
|
+
this.subst();
|
226
265
|
}
|
227
266
|
Cloud.prototype.add_filter = Cloud_add_filter;
|
228
267
|
|
268
|
+
function Cloud_get_search_without(tag)
|
269
|
+
{
|
270
|
+
var new_search = '';
|
271
|
+
var search_tags = this.search.split("+");
|
272
|
+
var first = true;
|
273
|
+
for(var i in search_tags){
|
274
|
+
if(search_tags[i] != tag){
|
275
|
+
if(first){
|
276
|
+
new_search = search_tags[i];
|
277
|
+
first = false;
|
278
|
+
} else {
|
279
|
+
new_search += "+" + search_tags[i];
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
return new_search;
|
284
|
+
}
|
285
|
+
Cloud.prototype.get_search_without = Cloud_get_search_without;
|
286
|
+
|
229
287
|
function Cloud_remove_filter(tag)
|
230
288
|
{
|
231
|
-
|
289
|
+
if(this.filter[tag] == true){
|
290
|
+
this.search = this.get_search_without(tag);
|
232
291
|
this.num_filtered--;
|
233
292
|
this.filter[tag] = false;
|
234
|
-
|
235
|
-
|
293
|
+
}
|
294
|
+
this.subst();
|
295
|
+
}
|
296
|
+
Cloud.prototype.remove_filter = Cloud_remove_filter;
|
297
|
+
|
298
|
+
function Cloud_jump_to(location)
|
299
|
+
{
|
300
|
+
var location_params = location.search;
|
301
|
+
var argstr = location_params.substring(1, location_params.length);
|
302
|
+
var args = argstr.split('+');
|
303
|
+
for(var i = 0; i < args.length; i++){
|
304
|
+
var possible_tag = unescape(args[i])
|
305
|
+
this.set_filtered(possible_tag);
|
306
|
+
}
|
307
|
+
this.subst();
|
236
308
|
}
|
237
|
-
Cloud.prototype.
|
309
|
+
Cloud.prototype.jump_to = Cloud_jump_to;
|
310
|
+
|
311
|
+
|
312
|
+
|
data/javascript/index.htm
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<!-- $Id: index.htm
|
2
|
+
<!-- $Id: index.htm 42 2007-10-08 19:09:22Z wsdng $ -->
|
3
3
|
<html>
|
4
4
|
<head>
|
5
5
|
<link rel="stylesheet" type="text/css" href="style.css">
|
@@ -19,6 +19,7 @@
|
|
19
19
|
<script>
|
20
20
|
<!--
|
21
21
|
cloud = new Cloud(links, 'cloud', 'content');
|
22
|
-
cloud.
|
22
|
+
//cloud.dont_change_url();
|
23
|
+
cloud.jump_to(document.location);
|
23
24
|
//-->
|
24
25
|
</script>
|
data/lib/graphiclious/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: Graphiclious
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.1.3
|
7
|
+
date: 2007-10-08 00:00:00 +02:00
|
8
8
|
summary: Create an html image map pointing to generated static html pages from your del.icio.us links. Uses Rubilicious and Graphviz. Interface done with FXRuby
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -107,9 +107,9 @@ files:
|
|
107
107
|
- bin/graphiclious
|
108
108
|
- test/test_delicious2yaml.rb
|
109
109
|
- javascript/style.css
|
110
|
-
- javascript/index.htm
|
111
|
-
- javascript/cloud.js
|
112
110
|
- javascript/link.js
|
111
|
+
- javascript/cloud.js
|
112
|
+
- javascript/index.htm
|
113
113
|
test_files: []
|
114
114
|
|
115
115
|
rdoc_options: []
|