Bug 765: use load_uri to load the old tab's document to avoid crash
[elinks/miciah.git] / contrib / conv / w3m2links.awk.in
blobb5fa34afe5dcc9e03761c2568d271cd092ea2344
1 #!@AWK@ -f
3 # This converts w3m bookmarks.html to ELinks bookmarks.lst used by the Lua
4 # based bookmarks handling (NOT the internal one!).
6 # Feed it by w3m bookmarks.html on stdin.
8 # Done by Stephane Chazelas <stephane.chazelas@free.fr>
11 BEGIN {
12 FS="[<>\"]"
13 c="return {"
15 $2 == "h2" {
16 print c "\n {\n category = \""$3"\";"
17 c=" },"
19 $2 == "li" {
20 print " { name = \""$7"\", url = \""$5 "\" },"
22 END {
23 print " },\n}"