Skip to content

Commit

Permalink
Add IDENTIFIER column
Browse files Browse the repository at this point in the history
  • Loading branch information
ydkhatri committed Jun 1, 2023
1 parent 552aed6 commit 25bef41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/spotlightshortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

__Plugin_Name = "SPOTLIGHTSHORTCUTS"
__Plugin_Friendly_Name = "Spotlight shortcuts"
__Plugin_Version = "1.1"
__Plugin_Version = "1.2"
__Plugin_Description = "Gets user typed data in the spotlight bar, used to launch applications and documents"
__Plugin_Author = "Yogesh Khatri"
__Plugin_Author_Email = "[email protected]"
Expand All @@ -28,7 +28,8 @@

def PrintAll(shortcut_items, output_params, source_path):
shortcut_info = [ ('User',DataType.TEXT),('UserTyped',DataType.TEXT),('DisplayName',DataType.TEXT),
('LastUsed',DataType.DATE),('URL',DataType.TEXT),('Source',DataType.TEXT)
('LastUsed',DataType.DATE),('URL',DataType.TEXT),('Identifier',DataType.TEXT),
('Source',DataType.TEXT)
]
log.debug('Writing {} spotlight shortcut item(s)'.format(len(shortcut_items)))
WriteList("spotlight shortcut information", "SpotlightShortcuts", shortcut_items, shortcut_info, output_params, source_path)
Expand All @@ -45,13 +46,14 @@ def ReadSingleShortcutEntry(entry, value, shortcuts, uses_path, source, user):
for item, val in value.items():
if item == 'DISPLAY_NAME': sc['DisplayName'] = val
elif item == 'LAST_USED': sc['LastUsed'] = val
elif item == 'IDENTIFIER': sc['Identifier'] = val
elif (uses_path and (item == 'PATH')) or (item == 'URL'):
path = val
if path.startswith('file://'):
path = path[7:]
sc['URL'] = path
else:
log.info("Found unknown item - {}, value={} in plist".format(item, value))
log.info("Found unknown item - {}, value={} in plist".format(item, val))
shortcuts.append(sc)


Expand Down

0 comments on commit 25bef41

Please sign in to comment.