123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- module.exports.name = 'safari_bookmarks'
- module.exports.description = 'List all Safari bookmarks'
- module.exports.requiresBackup = true
- module.exports.usesPromises = true
- module.exports.supportedVersions = '>=7.0'
- module.exports.functions = {
- '>=11.0': function (program, backup, resolve, reject) {
-
- backup.getSafariBookmarks()
- .then((items) => {
- var result = program.formatter.format(items, {
- program: program,
-
-
- columns: {
- 'id': el => el.id,
- 'title': el => el.title ? el.title.trim() : '',
- 'url': el => el.url ? el.url.trim() : '',
- 'parent': el => el.parent_title
- }
- })
- resolve(result)
- })
- .catch(reject)
- },
- '>=7.0,<11.0': function (program, backup, resolve, reject) {
-
- backup.getSafariBookmarksiOS7()
- .then((items) => {
- var result = program.formatter.format(items, {
- program: program,
-
-
- columns: {
- 'id': el => el.id,
- 'title': el => el.title ? el.title.trim() : '',
- 'url': el => el.url ? el.url.trim() : '',
- 'parent': el => el.parent_title
- }
- })
- resolve(result)
- })
- .catch(reject)
- }
- }
|