Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bomberstudios/7285386fa10b4fa9aaa41222bfbbbb55 to your computer and use it in GitHub Desktop.
Save bomberstudios/7285386fa10b4fa9aaa41222bfbbbb55 to your computer and use it in GitHub Desktop.
Install multiple RSS Libraries at once
// Install multiple RSS Libraries at once
var Library = require('sketch/dom').Library
var UI = require('sketch').UI
var feeds = [
'https://foobar.com/feed1.xml',
'https://foobar.com/feed2.xml',
'https://foobar.com/feed3.xml'
]
feeds.forEach(rss => {
var lib = Library.getRemoteLibraryWithRSS(rss, (err, library) => {
if (err) {
// oh no, failed to load the library
} else {
UI.message(`${library.name} installed`)
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment