Cross platform bookmark files

4

4

I spend my day at work on Windows XP and at home on OS X. I use Firefox on both. I have certain folders sync'ed where I like to drag and drop links to look at later. On XP the link files are saved as .url and on OS X they're saved as .webloc and Firefox on either OS can't use the format used by the other (.url files do at least open in Safari on OS X).

I'd like to keep using files and not have to save links in emails or on sites like delicious. I'd also like to keep using Firefox in both environments. Is there a way to make Firefox on either OS accommodate the files from the other? Maybe an extension or plugin? I'm not picky about which format works. Ideally I'd like to keep both because I like choice but either is fine.

Dinah

Posted 2009-10-12T00:56:25.907

Reputation: 241

1You might want to bold the part where you mention delicious, nobody seems to be noticing it. – John T – 2009-10-12T03:01:31.597

whats sync tool are you using ? – None – 2009-10-12T03:41:45.213

@John, Delicious is as anonymous as you want to be, and does what he needs and more. – jtimberman – 2009-10-12T03:59:33.873

@Revolter. 1st I used Foldershare (now: Windows Live Sync) which I was very happy about while I had at least 1 always-on desktop. After moving to all laptops I tried Windows Live Mesh but it didn't work as advertised on my Mac. Now I use Dropbox with which I'm also very happy. – Dinah – 2009-10-12T13:41:45.333

Answers

2

If you double-click a .url file in Snow Leopard, it will open in Safari. To get it to open in Firefox:

  1. Open the Applescript editor
  2. Paste in the Applescript below (courtesy of this Stack Overflow post)
  3. Save it as an application
  4. In the finder, select a .url file
  5. Choose Get Info from the File menu
  6. Specify this new application under Open With
  7. Click on Change All, and confirm the action

To open a .webloc file in Firefox in XP, I made a C# application:

  1. Open Visual Studio. Express versions are free from Microsoft.
  2. File menu -> New -> Project
  3. Select Console Application. Name it. Ok
  4. In the Solution Explorer, right-click on the project name -> Properties
  5. Output type: Windows Application. This is so when Windows opens your console app, no console window is displayed
  6. Paste the below C# program into Program.cs
  7. Build menu -> Build Solution
  8. Double click on a .webloc file. When it asks what program to use, select from list then browse to the new exe you just made

Applescript:

on open the_droppings

    set filePath to the_droppings

    set fileContents to read filePath

    set secondLine to paragraph 2 of fileContents

    set tid to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "="
    set URLstring to last text item of secondLine
    set AppleScript's text item delimiters to tid

    do shell script "/usr/bin/open -a Firefox.app " & quoted form of URLstring
end open

C# app:

using System;
using System.IO;
using System.Diagnostics;
using System.Xml;

class Program {
    static void Main(string[] args) {
        if (args == null || args.Length == 0 || Path.GetExtension(args[0]).ToLower() != ".webloc")
            return;

        string url = "";

        XmlTextReader reader = new XmlTextReader(args[0]);
        while (reader.Read()) {
            if (reader.NodeType == XmlNodeType.Element && reader.Name == "string") {
                reader.Read();
                url = reader.Value;
                break;
            }
        }

        // I specify Firefox because I have weird demands for my work computer.
        // To have it open in your default browser, change that line to this:
        // Process.Start(url);
        if (!String.IsNullOrEmpty(url))
            Process.Start("Firefox", url);
    }
}

Dinah

Posted 2009-10-12T00:56:25.907

Reputation: 241

4

Instead of dropping the link files into a folder, why not make another folder in your bookmarks for these links to look at later? Then you can display the folder on the bookmarks toolbar and easily drop links into it. Then you can use XMarks to manage your bookmarks cross-platform and cross-browser.

alt text

John T

Posted 2009-10-12T00:56:25.907

Reputation: 149 037

I also use XMarks. Although I did not try all of those services, this is the one that I prefer. It runs with all installations I have of Firefox, whether this is under Linux, some VM, an appliance, a server or this Windows machine that I have to use at work. – jfmessier – 2009-10-13T16:46:30.257

+1 for XMarks, fantastic service. Never failed me before. – EvilChookie – 2009-10-21T15:35:28.253

0

I'd like to expand on jtimberman's answer in favor of delicious (+1 there).

  1. You can save private bookmarks on delicious
    • You can share these bookmarks (with limited groups even when they are private)
    • Bookmarks can be exported (to your backup) and imported
      (maybe, even after some edits in the backup -- which is an XML file).
      Look at my answer at the first point for more notes.
    • You can also keep the bookmarks synced with your firefox browsers across platforms.
      Which means, they appear like local bookmarks on each browser instance (and are sync'ed in the background). Read up more at the FAQ.

nik

Posted 2009-10-12T00:56:25.907

Reputation: 50 788

On June 1st of this year (2017), Delicious was acquired by Pinboard.

– Kenny Evitt – 2017-06-24T22:27:05.030