From d4b52d5bc4eefce3e3497c8dda856e63a9981105 Mon Sep 17 00:00:00 2001 From: jon Date: Wed, 13 Mar 2024 10:32:17 +0100 Subject: [PATCH] [bookmarks] Script to convert bookmarks from links2 to elinks --- contrib/conv/links2elinks_bookmarks.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 contrib/conv/links2elinks_bookmarks.pl diff --git a/contrib/conv/links2elinks_bookmarks.pl b/contrib/conv/links2elinks_bookmarks.pl new file mode 100755 index 00000000..d92795d2 --- /dev/null +++ b/contrib/conv/links2elinks_bookmarks.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +# Usage example: +# ./links2elinks_bookmarks.pl < ~/.links2/bookmarks.html >> ~/.config/elinks/bookmarks + +use 5.036; +while (<>) { + state $d = 0; + $d++ if m,^
$,; + $d-- if m,^
$,; + say "$1\t\t$d\tF" if m,

(.*)

,; + say "$2\t$1\t$d\t" if m,
(.*),; +}