mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[bookmarks] Script to convert bookmarks from links2 to elinks
This commit is contained in:
parent
5db5d33911
commit
d4b52d5bc4
13
contrib/conv/links2elinks_bookmarks.pl
Executable file
13
contrib/conv/links2elinks_bookmarks.pl
Executable file
@ -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,^<DL>$,;
|
||||
$d-- if m,^</DL>$,;
|
||||
say "$1\t\t$d\tF" if m,<DT><H3>(.*)</H3>,;
|
||||
say "$2\t$1\t$d\t" if m,<DT><A HREF="(.*)">(.*)</A>,;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user