Skip to content

Instantly share code, notes, and snippets.

@paulhandy
Created August 6, 2014 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulhandy/1c603d2987ac3ab17fd1 to your computer and use it in GitHub Desktop.
Save paulhandy/1c603d2987ac3ab17fd1 to your computer and use it in GitHub Desktop.
#!/bin/node
// purpose: get your firefox bookmarks in a format that dwb will accept. prints to stdout
// usage: node firefox2dwb.js [./bookmarks.json] [ >> $HOME/.config/dwb/default/bookmarks ]
var fs = require('fs');
fs.readFile(process.argv[2], function(err, data){
var bm, ch;
bm = JSON.parse(data);
ch = bm.children[0];
ch.children.forEach(function(child){
console.log(child.uri + ' ' + child.title);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment