How to Copy PC Bookmarks to UCWEB

Over at the UCWEB Forums,  JBpseudo has come up with a way to transfer your PC bookmarks to the S60 native version of UCWEB6.  It’s not nearly as simple and elegant as using Opera Link to keep your Opera Mini bookmarks synchronized across multiple browsers but it is a time saver if you have a lot of bookmarks. It works with any browser that can export bookmarks in the de facto standard Mozilla format including Opera, Firefox, Chrome, Safari and IE.

HtmlAsText Utility

The files and some (rather cryptic) instructions can be found at forum.ucweb.com/viewthread.php?tid=1063.  The instructions assume you know what you are doing and I obviously didn’t as I struggled a little bit to get it working. I though I’d try to document the process in a little more detail.  First of all there are a couple of limitations:

  • Your bookmarks folder structure is not preserved, all bookmarks are dumped into the root folder in UCWEB.
  • UCWEB uses the pipe symbol (|) as a field separator in its import and export files so any bookmarks with a pipe symbol (|) in either their name. or target URL get imported as multiple non-functional bookmarks.

Neither of these are show stoppers ,it just means you have a little cleanup to do. Plus UCWEB lets you back up and restore your original bookmarks in case you don’t like the result and want to revert.

Converting Bookmarks with Python

Here’s a step by step guide  to importing bookmarks from your PC to UCWEB.

  1. Prerequisites: You will need the Open Source Python interpreter on your phone. Python  can be downloaded from the project repository on Sourceforge.  That page is big and a little daunting if you are using a mobile browser.  Here are some slightly more mobile friendly direct links to the installable .sis/.sisx files for the various S60 versions that Python runs on: S60 3rd EditionS60 2nd Edition Feature Pack 3S60 2nd Edition Feature Pack 2S60 2nd Edition If you don’t know which version of S60 your phone uses, you can look it up on S60.com
  2. Export your bookmarks as an html file.
    1. In Opera go to the Bookmarks Menu > Manage Bookmarks. Right click the Trash folder and Choose “Empty Trash”  otherwise you will end up importing your deleted bookmarks! Then choose  File > Export as HTML… from the Bookmark Manager’s menu
    2. In Firefox it’s Bookmarks Menu > Organize Bookmarks > Import and Backup > Export HTML…
    3. IE6: File Menu > Import and Export > Next > Export Favorites > Next > Select the bookmarks folder > Next > Export to a File or Address > Finish
    4. Chrome: Click the wrench icon in the upper right corner of the screen, choose Bookmark Manager > Tools > Export Bookmarks
    5. Safari: File Menu > Export Bookmarks
  3. Download My_UCFavorites.zip and extract the single  file, My_UCFavorites.py to a folder.
  4. S60 2nd edtion users can send My_UCFavorites.py to the phone with Bluetooth or infrared and the phone will automatically install it.  In S60 3rd edition, Nokia made it harder to install Python scripts for some reason.  Using PC Suite, Data Transfer Mode or a card reader create a Python folder in the root of the SD card. Then copy My_UCFavorites.py to the Python directory you created on the  phone’s memory card.
  5. Download htmlAsText.zip to your PC and extract the files to a folder.  Execute the extracted HtmlAsText.exe file.
  6. Change the following two options as shown in the first screenshot:
    1. Characters Per Line: change to 400
    2. Links Display Format: change to %T [%L]
  7. Browse to the html bookmarks file that you created in step 2, specify an output .txt file and hit Convert.
  8. You may want to clean up the converted file a little in a text editor.  Each bookmark in the file is the format Name[Link] For example: Facebook [http://www.facebook.com] Using an editor you can delete duplicates and replace pipe (|) characters in names with a dash or a space.  If you have bookmarklets with pipes in their JavaScript you might as well delete them as they won’t import correctly and removing the pipe will break the bookmarklet.  Also, if you have a lot of bookmarks you may want to delete some them.  I had over 2000 bookmarks in Opera, UCWEB imported them all but the browser became extremely sluggish. A few hundred bookmarks seems to be the practical limit.
  9. Transfer the text file to the phone’s memory card using any available method.
  10. Run UCWEB63, go to the bookmarks page and choose Menu > Advanced > Export.  The export file will be overwritten in the import process so export your bookmarks twice using two different file names so that you have a backup in case you want to restore.
  11. Launch Python on the phone and choose Options > Run Script. Select My_UCFavorites.py and press OK
  12. Press Options > Convert to UCFavorites, browse to the E: drive and select the text file you copied there in step 9.
  13. At the promt “Add the new bookmarks to the original UCFavorites file” (bottom image – left), click OK and browse to the exported bookmark file from step 10.
  14. Exit Python and launch UCWEB, go to the bookmarks page and choose Menu > Advanced > Import. Browse to the UCFavorites file that you updated using Python.

That’s it, at this point your bookmarks should be loaded in UCWEB! Pretty cool hack, thanks JBpseudo.

Importing converted bookmarks

Related Posts:
Opera Mini Tip – Easy Bookmark Management
Mobile Browser Test – UCWEB6
New SkyFire and UCWEB Betas
UCWEB 6.3 Official Signed English Version Released for S60

One thought on “How to Copy PC Bookmarks to UCWEB

  1. Pingback: VisionMobile :: blog :: Carnival of the Mobilists #165

Comments are closed.