Create a netscape format bookmarks file (works with Chrome)
npm install netscape-bookmarksnetscape-bookmarks
==================
Create a netscape format bookmarks file (works with Chrome)
Installation
------------
npm install netscape-bookmarks
Usage
-----
`` js
var netscape = require('netscape-bookmarks');
var bookmarks = {
'Dave Eddy': 'http://www.daveeddy.com',
'Perfume Global': 'http://www.perfume-global.com'
};
var html = netscape(bookmarks));
console.log(html);
`
results in this awful looking, netscape-compatible, html
` html`Bookmarks
You can import this HTML into your favorite browser and it should
work. Consider looking into the node urlfile
module I've written for further bookmark processing.
Examples
--------
Given
` json`
{
"Dave Eddy's Blog": "http://www.daveeddy.com",
"Perfume Global": "http://www.perfume-global.com/",
"Unfiled": {
"contents": {
"Twitter": "http://twitter.com"
}
},
"Second Folder": {
"contents": {
"Nested Folders!": {
"contents": {
"YouTube": "http://www.youtube.com",
"GitHub": "https://github.com"
}
}
}
},
"TekZoned": {
"url": "http://www.tekzoned.com",
"add_date": 1357547237,
"last_visit": 1357547238,
"last_modified": 1357547239
}
}
you get
` html`Bookmarks
Unfiled
Second Folder
Notes
-----
A website can either be a string containing the URL only, or an object with
the url attribute present. If the contents` attribute is found, it is
assumed to be a folder containing more folders or websites.
License
-------
MIT License