Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niksy/write-safari-reading-list
Write Safari Reading List.
https://github.com/niksy/write-safari-reading-list
Last synced: 7 days ago
JSON representation
Write Safari Reading List.
- Host: GitHub
- URL: https://github.com/niksy/write-safari-reading-list
- Owner: niksy
- License: mit
- Created: 2016-08-14T05:48:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-06T17:26:35.000Z (about 8 years ago)
- Last Synced: 2024-10-18T04:05:36.475Z (28 days ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# write-safari-reading-list
[![Build Status][ci-img]][ci]
Write Safari Reading List.
## Install
```sh
npm install write-safari-reading-list --save
```## Usage
```js
var writeList = require('write-safari-reading-list');writeList('./Bookmarks.plist', [
{
title: 'https://www.npmjs.com/package/axe-core',
description: 'Accessibility engine for automated Web UI testing',
url: 'https://www.npmjs.com/package/axe-core',
dateAdded: new Date('2016-07-31T09:11:41.000Z')
},
{
title: '“Array” Methods',
description: '_.chunk(array, [size=1]) # Ⓢ Ⓝ Creates an array of elements ...',
url: 'https://lodash.com/docs',
dateAdded: new Date('2016-07-31T12:36:22.000Z')
}
])
.then(function () {
console.log('Done!');
});
```## API
### writeList(filePath, data)
Returns: `Promise`
Writes property list to file with provided data. If property list exists at the path it reuses it, otherwise uses basic template for generating property list file.
#### filePath
Type: `String`
Default: `~/Library/Safari/Bookmarks.plist`Path to property list.
#### data
Type: `Object[]`
List of Reading List links.
## License
MIT © [Ivan Nikolić](http://ivannikolic.com)
[ci]: https://travis-ci.org/niksy/write-safari-reading-list
[ci-img]: https://img.shields.io/travis/niksy/write-safari-reading-list.svg