Cannonfodder Posted April 24, 2003 Report Share Posted April 24, 2003 Here's a nifty little program. http://nelson.oit.unc.edu/~alanh/operahotlist2html/ To use it, 1. mkdir opera2html and copy targz file into it. 2. tar xzf oph2h.tar.gz 3. mv opera2html /usr/lib 4. ln -s /usr/lib/opera2html/opera2html /usr/bin/opera2html The last puts it on the path so that you can opera2html < Opera6.adr > bookmark.html Then you can open the file with opera.. Quote Link to comment Share on other sites More sharing options...
aru Posted April 24, 2003 Report Share Posted April 24, 2003 More or less like this :mrgreen: : ~$ awk 'BEGIN {RS="#URL"; FS="n"} $3 ~ /URL=/ {print gensub("^.+NAME=(.+).+URL=(.+)","<a href="2">1</a><br />","g",$2 $3)}' < opera6.adr | tee bookmark.html <a href="http://tldp.org/LDP/abs/html/index.html">Advanced Bash-Scripting Guide</a><br /> <a href="http://www.opera.com/order/">Buy Opera</a><br /> [...] <a href="http://www.linux.org/">linux.org</a><br /> <a href="http://linuxapps.com/">linuxapps.com</a><br /> <a href="http://kt.linuxcare.com/">Linuxcare</a><br /> <a href="http://www.linuxcentral.com/">linuxcentral.com</a><br /> <a href="http://www.linuxhq.com/">linuxhq</a><br /> <a href="http://linuxiso.org/">linuxiso.org</a><br /> <a href="http://www.linuxmafia.org/">linuxmafia</a><br /> <a href="http://www.linuxnewbie.org/">linuxnewbie.org</a><br /> <a href="http://www.linuxprogramming.com/">linuxprogramming</a><br /> <a href="http://www.linuxstart.com/">linuxstart</a><br /> <a href="http://linuxtoday.com/">linuxtoday.com</a><br /> <a href="http://www.lutelinux.com/">lutelinux.com</a><br /> ~$ Ofcourse, if you want also dates, sections, headers... just add a few bits of code... linux is so cool! :P Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted April 25, 2003 Author Report Share Posted April 25, 2003 Very neat :) What is awk, a text processer? Quote Link to comment Share on other sites More sharing options...
aru Posted April 25, 2003 Report Share Posted April 25, 2003 and a programming language itself. It is one of the *most classical* Unix Power tools ;) Quote Link to comment Share on other sites More sharing options...
aru Posted April 25, 2003 Report Share Posted April 25, 2003 In case you are interested in, here is a link to an EXCELLENT introduction to awk written by Daniel Robbins (the creator of gentoo): http://www-106.ibm.com/developerworks/linu...ary/l-awk1.html http://www-106.ibm.com/developerworks/linu...ary/l-awk2.html ]http://www-106.ibm.com/developerworks/linu...awk3.html Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 6, 2003 Author Report Share Posted May 6, 2003 Ok, thanks! Quote Link to comment Share on other sites More sharing options...
kmack Posted June 6, 2003 Report Share Posted June 6, 2003 Tried to follow Cannonfodder's steps above but so far no joy. Can someone please help me learn what I am doing wrong? I want to import my Opera 6.12 bookmarks to Mozilla. I made a temp directory opera2html and expanded the file. Then I think my problems began with following steps 3 & 4 3. mv opera2html /usr/lib4. ln -s /usr/lib/opera2html/opera2html /usr/bin/opera2html Does this mean I should move the newly created directory opera2html or just the file opera2html? I copied the directory because step 4 makes it look like a directory is involved since opera2html is doubled in the first part... Is that an error or do I need to transfer the directory? This is where I am a bit confused . :? I tried to run the command from within the /home/kelly/opera directory opera2html < Opera6.adr > bookmark.html but get the error "no such command" as both root and user... I figured out the Opera6.adr is a typo as the file is opera6.adr (no cap) but get same error after correcting that. What am I missing? :) Quote Link to comment Share on other sites More sharing options...
kmack Posted June 6, 2003 Report Share Posted June 6, 2003 DUH... getting closer. Just realized the file name is NOT opera2html after all so going to eat dinner and try to redo this with the right filename. Guess I was just being too literal. :) Quote Link to comment Share on other sites More sharing options...
kmack Posted June 6, 2003 Report Share Posted June 6, 2003 Yahoo! Got it! Took a bit of trying, but helped me learn a bit in the process. :lol: Problem was the file names and syntax things. I'll try to recap Steps 1 & 2 are Ok... might need to explain the downloaded is .tgz and needs to be uncompressed twice. Step 3: I am still not sure why, but I moved the whole directory since the sym link suggested in step 4 refers to it. QUESTION: couldn't you just move the operahotlist2html script file rather than the directory? or is there a safety/convenience reason for this? Step 4: I followed it as per above. The last step though I changed and followed the instructions on the author's webpage. Instead of opera2html < Opera6.adr > bookmark.html I did [kelly@localhost opera2html]$ opera2html -i $HOME/.opera/opera6.adr -o htmlfile.html --mozilla --include-dates and got an error message (no problem just info) Warning: -m or --mozilla option breaks HTML 4.01 compliance. Then I used Bookmark Manager in Mozilla to import the htmlfile.html into Mozilla. Seemed to work fine after I made these minor changes. This works for the 2.7 version of operahotlist2html and might be different for earlier versions. Author says this one also works on Opera 7. HTH someone else that wants to do the same. Thanks for the point in the right direction Cannonfodder. One of these days I'll be able to do it aru's way! :) Quote Link to comment Share on other sites More sharing options...
Guest johnKFT Posted June 6, 2003 Report Share Posted June 6, 2003 I have just discovered this too, having recently gone to Opera 7 and discovered that the 'export bookmarks to html' facility produces an html file that is a bit different from the Netscape bookmark layout - Mozilla Firebird can only see the first couple of bookmarks. So on a recommendation I tried opera2html. It worked much better but scrambled a few bits, javascript bookmarks especially. Anyone else come across this problem? Quote Link to comment Share on other sites More sharing options...
kmack Posted June 7, 2003 Report Share Posted June 7, 2003 That might be why the script author put the warning into the mix when you use the -m option to make a Mozilla bookmark readable file. Maybe the Firebird needs html 4.01 version which this script breaks? I had same experience as you did. Opera exports bookmarks to html, but Mozilla cannot read them except for the first few. Think it is due to the spaces and indentation Opera uses. Seems it worked ok on my 6.12 version bookmark conversion, but I have over 100 bookmarks so haven't checked each one. :) Guess I could have tried the Konqueror route and imported Opera bookmarks then exported to Mozilla format. Wonder how that works? Anyone tried it? Quote Link to comment Share on other sites More sharing options...
Uiler Posted August 7, 2003 Report Share Posted August 7, 2003 Guess I could have tried the Konqueror route and imported Opera bookmarks then exported to Mozilla format. Wonder how that works? Anyone tried it? I've tried it and it works. I have tons of bookmarks nested in lots of folders and it seems to work fine. Quote Link to comment Share on other sites More sharing options...
Guest johnKFT Posted August 7, 2003 Report Share Posted August 7, 2003 Another option is a GUI program called bkedit, which converts back and forth between all manner of different bookmark folder types just at the click of the mouse. http://www2.fht-esslingen.de/~clfuit00/sasnt/bk_edit/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.