oldnotes.js 832 B

1234567891011121314151617181920212223242526
  1. module.exports.name = 'oldnotes'
  2. module.exports.description = 'List all iOS notes (from older unused database)'
  3. // Specify this reporter requires a backup.
  4. // The second parameter to func() is now a backup instead of the path to one.
  5. module.exports.requiresBackup = true
  6. // Specify this reporter supports the promises API for allowing chaining of reports.
  7. module.exports.usesPromises = true
  8. module.exports.func = function (program, backup, resolve, reject) {
  9. backup.getOldNotes(program.dump)
  10. .then((items) => {
  11. var result = program.formatter.format(items, {
  12. program: program,
  13. columns: {
  14. 'Modified': el => el.XFORMATTEDDATESTRING,
  15. 'ID': el => el.Z_PK,
  16. 'Title': el => (el.ZTITLE + '').substring(0, 128)
  17. }
  18. })
  19. resolve(result)
  20. })
  21. .catch(reject)
  22. }