Created
August 6, 2014 19:32
-
-
Save paulhandy/1c603d2987ac3ab17fd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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