Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahamas10/node-netscape-bookmarks
Create a netscape format bookmarks file (works with Chrome)
https://github.com/bahamas10/node-netscape-bookmarks
Last synced: about 2 months ago
JSON representation
Create a netscape format bookmarks file (works with Chrome)
- Host: GitHub
- URL: https://github.com/bahamas10/node-netscape-bookmarks
- Owner: bahamas10
- Created: 2013-01-07T08:45:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-01-14T22:21:13.000Z (almost 3 years ago)
- Last Synced: 2024-11-02T05:08:37.668Z (about 2 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 41
- Watchers: 3
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
netscape-bookmarks
==================Create a netscape format bookmarks file (works with Chrome)
Intended to be used by Node.JS.
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
Bookmarks
```
You can import this HTML into your favorite browser and it *should*
work. Consider looking into the [node urlfile](https://github.com/bahamas10/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
BookmarksBookmarks
-
Dave Eddy's Blog
Perfume Global
Unfiled
-
Second Folder
-
TekZoned
```
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