Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to import dillo bookmarks into Firefox etc, Run this script< Next Oldest | Next Newest >
WoofyDugfock Offline





Group: Members
Posts: 146
Joined: Sep. 2004
Posted: Mar. 17 2005,16:36 QUOTE

If like me you use dillo a lot and have accumulated heaps of useful bookmarks, you may have noticed that the dillo bookmarks file /home/dsl/.dillo/bm.txt cannot be imported into your Firefox bookmarks - it's in the wrong format. Grrrr!!!

Opening your bookmarks page within dillo and saving as html won't help either.

Frustrated that I couldn't get Gnobog to import dillo bookmarks either and not able to google an existing remedy anywhere, I took some inspiration from Dawid Michalczyk's urlext.sh (GNU GPL), and wrote the little convert_dillobm.sh (see below).

To convert dillo bookmarks into a standard format & import into Firefox:

1. Open a shell, cd to the directory containing the script and enter ./convert_dillobm.sh ~/.dillo/bm.txt
2. This will output the converted file dillobm_converted.html in the directory in which you ran the script.
3. In Firefox, go bookmarks menu --> manage bookmarks -->file --> Import...-->from file -->(browse to dillobm_converted.html and select). That's it.

The dillo bookmarks are now incorporated into your Firefox bookmarks.

Hope this is useful.

----------------------------------------------------------------
#! /bin/bash

# Title: convert_dillobm.sh
# Author: WoofyDugfock on dsl forum
# Date: 2005.03.17 Amended: 2005.03.18
# Purpose: Converts  dillo bookmarks file (bm.txt) argument into a standard bookmarks html file
#- suitable for importing into Firefox etc
# Distribution: GNU GPL

{
echo "<html><head><title>Bookmarks converted from: $1 </title></head><body>"
awk '/http/{$1="";print}' $1 | while read ADR TIT; do
echo "<a href=\""${ADR}\"">"$TIT"</a><br>"
done
echo "</body></html>"
} >dillobm_converted.html #output file

exit 0


--------------
"We don't need no stinkin' Windows"

http://news.zdnet.co.uk/software/linuxunix/0,39020390,39149796,00.htm
Back to top
Profile PM 
gunnix
Unregistered






Posted: Mar. 22 2005,22:07 QUOTE

very nice, have you contacted the dillo developers? Maybe they could put it on their site as well?

grtz
Back to top
WoofyDugfock Offline





Group: Members
Posts: 146
Joined: Sep. 2004
Posted: Mar. 24 2005,16:03 QUOTE

Thx Gunnix.

While the above does import into FF ok, at least one bookmarks management program barfs & complains that the output from convert_dillobm.sh is not EXACTLY Mozilla format ie it's corrupted.

Below is a modified version that produces something a bit closer to a Firefox bookmarks clone. It may still give a "bad signature" message (because it doesn't have the FF comment lines!) but should be imported anyway.

RE: Dillo people - I haven't contacted them because they'd be well aware that their bm file is in non-standard format and this script is pretty basic  - they'd produce it themselves if they felt like it.  But by all means you should email them if you wish - maybe they'd get the message that they need to make their bm file importable in future releases.

Code Sample


#! /bin/bash

# Title: convert_dillobm.sh
# Author: WoofyDugfock on dsl forum
# Date: 2005.03.17 Updated 2005.03.24
# Purpose: Converts  dillo bookmarks file (bm.txt) argument into a standard  html format akin to Firefox bookmarks
#- suitable for importing into Firefox etc
# Distribution: GNU GPL

{
cat <<EOF
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>

<DL><p>
   <DT><H3 ADD_DATE="1111700525" LAST_MODIFIED="1111701745" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$XZzXO3">Bookmarks Toolbar Folder</H3>
   <DL><p>
EOF

awk '/http/{$1="";print}' $1 | while read ADR TIT; do
echo "        <DT><A HREF=\""${ADR}\"" ADD_DATE="1111701745" LAST_CHARSET="UTF-8" ID="rdf:#$nsWFX">"$TIT"</A>"
done

cat <<EOF2
   </DL><p>
</DL><p>
EOF2
} >dillobm_converted.html #output file

exit 0


--------------
"We don't need no stinkin' Windows"

http://news.zdnet.co.uk/software/linuxunix/0,39020390,39149796,00.htm
Back to top
Profile PM 
2 replies since Mar. 17 2005,16:36 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: How to import dillo bookmarks into Firefox etc

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code