Exemplo n.º 1
0
            alf.setItem(
                title=url_title,
                subtitle=subtitle,
                arg=url,
                quicklookurl=url
            )
            alf.addMod(
                'cmd',
                note_path,
                'Open MD Note',
                icon_path='icons/markdown.png',
                icon_type='image'
            )
            alf.addMod(
                'alt',
                url,
                "Copy URL to Clipboard",
                icon_path='icons/clipboard.png',
                icon_type='image'
            )
            alf.addModsToItem()
            alf.addItem()
else:
    alf.setItem(
        title='No Bookmarks found...',
        subtitle='try again',
        valid=False
    )
    alf.addItem()
alf.write()
Exemplo n.º 2
0
    wf.setItem(
        title="3rd Party Integration in 1Password is disabled!",
        subtitle=
        u'1Password > Preferences > Advanced > Integratons > [x] Enable Spotlight and 3rd party app integrations',
        valid=False)
    wf.addItem()
    passwords = list()

for p in passwords:
    # Add Password item if no vaultNames are defined OR item's vault name in valutName config
    # AND
    # query empty OR query match item title
    if ((vaults[0] == str() or p.get('vaultName') in vaults) and
        (query == str() or query.lower() in p.get('itemTitle').lower())):
        uuid = p.get('uuid')
        itemTitle = p.get('itemTitle')
        itemDesc = p.get('itemDescription')

        url = p.get('websiteURLs')[0] if p.get('websiteURLs') else str()

        wf.setItem(title=itemTitle,
                   subtitle=itemDesc,
                   arg=uuid,
                   quicklookurl=url)
        if url:
            wf.setIcon('purl.png', "image")
            wf.addMod(key="cmd", subtitle='OPEN: {0}'.format(url), arg=url)
            wf.addModsToItem()
        wf.addItem()
wf.write()