diff options
author | dakkar <dakkar@luxion> | 2005-10-20 13:41:27 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2005-10-20 13:41:27 +0000 |
commit | 4e380e6e3fb55cdb63e2399614184a85e4475e30 (patch) | |
tree | 492643ebc1daad16e41cf958d54af53f9f6e1a5c /script | |
parent | ancora non inserisce le icone: se si fa bind_param($pos,$blob_data,DBI::SQL_B... (diff) | |
download | Bookmarks-4e380e6e3fb55cdb63e2399614184a85e4475e30.tar.gz Bookmarks-4e380e6e3fb55cdb63e2399614184a85e4475e30.tar.bz2 Bookmarks-4e380e6e3fb55cdb63e2399614184a85e4475e30.zip |
ora gestisce le icone, ma devo tenerle in un TEXT, base64, causa bug in DBD::SQLite
Diffstat (limited to 'script')
-rwxr-xr-x | script/bookmarks_load.pl | 16 | ||||
-rw-r--r-- | script/bookmarks_makedb.pl | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/script/bookmarks_load.pl b/script/bookmarks_load.pl index 8535348..9862f87 100755 --- a/script/bookmarks_load.pl +++ b/script/bookmarks_load.pl @@ -14,8 +14,6 @@ my $links; $yaml = <>; $links=YAML::Load($yaml); } -my $icon=do {local $/;open my $fh,'<:raw','favicon.ico';<$fh>}; -print "Icon is $icon\n"; my %fields=( description => 'title', @@ -32,20 +30,18 @@ for my $link (@$links) { my $dblink=Bookmarks::M::DB::Links->find_or_create({ url => $link->{href}, }); -# if (!Bookmarks::Utils::check_link($link->{href})) { -# warn "Link $link->{href} non valido, marco come tale\n"; -# $link->{title}.=' [INVALID]'; -# } + if (!Bookmarks::Utils::check_link($link->{href})) { + warn "Link $link->{href} non valido, marco come tale\n"; + $link->{title}.=' [INVALID]'; + } $link->{created}||=time(); $link->{modified}||=time(); while (my ($f1,$f2) = each %fields) { $dblink->$f2($link->{$f1}); } -# $dblink->icon(Bookmarks::Utils::get_site_icon($link->{href})); - $dblink->icon($icon); - print 'Set icon to: ',$dblink->icon(),"\n"; + $dblink->set_icon(Bookmarks::Utils::get_site_icon($link->{href})); $dblink->update(); - print 'Set icon to: ',$dblink->icon(),"\n"; + for my $tagname (@{$link->{tags}}) { my $dbtag=Bookmarks::M::DB::Tags->find_or_create({ name => $tagname, diff --git a/script/bookmarks_makedb.pl b/script/bookmarks_makedb.pl index 93027a7..7b3ee1c 100644 --- a/script/bookmarks_makedb.pl +++ b/script/bookmarks_makedb.pl @@ -27,7 +27,7 @@ create table links ( url text unique, title text, descr text, - icon blob, + icon text, add_date integer, last_access_date integer, access_count integer |