#! perl # # convert pocket html export to a netscape html compatible format to make it importable in linkwarden # the script is pretty sloppy, it will likely break for some lines # # alexlehm/at/gmail.com # # https://wiki.creativecommons.org/wiki/CC0 # print qq[ Bookmarks

Bookmarks Menu

]; print qq[


Pocket bookmarks

]; while(<>) { chop; if(m@

  • (.*)
  • @) { $msg=$1; if($msg=~m@([^<]+)@) { $link=$1; $added=$2; $tags=$3; $desc=$4; print qq[
    $desc ]; } else { warn "failed to match line\n"; } } } print qq[

    ];