Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2010/02/01

I Like Chrome

And I think I'm about to switch from Firefox as my go-to browser.

I apt-get installed it a while ago, and Chrome's insistence on looking like Chrome when I wanted it to look and act like Ubuntu was an early problem. If I can't move a window like any other window, I can't use that window, and thus that program.

This was a problem until I realized you could tell it to use the system's Title Bar, which means when I double-clicked, it rolled up like any other window, and a right-click on the bar meant I could kick it to whatever virtual desktop I wanted. That was enough for me to take away most of my dislike.

But not all. I had been using Delicious as my online bookmarks storage. I had used Google Bookmarks before, but something kicked me off that a while ago. For the life of me, I cannot remember what. But I went to Delicious. Chrome doesn't sync with Delicious, but it does sync with Google Bookmarks. ::SHOCK!::

Delicious exports RSS. Chrome imports a special type of HTML. You need to convert. For this purpose, I wrote rss2bookmarks.

  1. #!/usr/bin/perl  
  2. use 5.010 ;  
  3. use strict ;  
  4. use warnings ;  
  5. use XML::RSS ;  
  6.   
  7. # USAGE: rss2bookmarks.pl < input.rss > output.html  
  8.   
  9. my %bookmarks ;  
  10.   
  11. my $data ;  
  12. while (<STDIN>) { $data .= $_ }  
  13. my $rss = XML::RSS->new() ;  
  14. $rss->parse( $data ) ;  
  15.   
  16. for my $item ( @{ $rss->{items} } ) {  
  17.     my $title = $$item{title} ;  
  18.     my $link  = $$item{link} ;  
  19.     $bookmarks{$title} = $link ;  
  20.     }  
  21.   
  22. say '#<DL><p>' ;  
  23. say '    <DT><H3>Bookmarks Bar</H3>' ;  
  24. say '    <DL><p>' ;  
  25. for my $bookmark ( sort keys %bookmarks ) {  
  26.     my $link = $bookmarks$bookmark } ;  
  27.     say qq{    <DT><A HREF="$link"$bookmark </A>} ;  
  28.     }  
  29. say '    </DL><p>' ;  
  30. say '</DL><p>' ;  

Use it in good health.

No comments:

Post a Comment