alfred-bear icon indicating copy to clipboard operation
alfred-bear copied to clipboard

Autocomplete Tags in Search and Create, and List Recent

Open drgrib opened this issue 7 years ago • 13 comments
trafficstars

Features added, as detailed in #12.

My one uncertainty on this PR is whether I've done clipboard dependency correctly. I've never added third-party pip installs to an Alfred workflow before and don't know if I got the process right. If you see anything I need to add or change in that regard, let me know and I'll add and commit it before you accept the PR.

drgrib avatar Jan 16 '18 02:01 drgrib

Thanks for setting it up! I'll review this week when I can after work.

chrisbro avatar Jan 16 '18 13:01 chrisbro

@chrisbro Great. Now, I just added a new commit that reduces the behavior to the following:

  • bs
    • will list the most recent notes when given no query or a whitespace query
    • will autocomplete tags
    • if given a query, it will
      • sort notes title-match first, text-match second
      • restrict to notes containing all of the entered tags
  • bn will create notes with tag autocomplete, using the clipboard for note text content if the clipboard contains text

I understand that this aggressively minimizes your original design. I think it is intuitive but I understand if it is too extreme of a change for you.

Also, I can fix the clipboard dependency if it is incorrect and you see what I need to do to fix it. It is probably easier to fix from my side.

drgrib avatar Jan 16 '18 19:01 drgrib

@drgrib Let me play around with it some to see how it acts - my initial reaction is to leave in bst as a "legacy" thing just in case people have it in their muscle memory already and it's probably not hurting usability.

Thanks again!

chrisbro avatar Jan 16 '18 23:01 chrisbro

@chrisbro No worries. You are of course welcome to accept the merge and modify as you see fit.

drgrib avatar Jan 16 '18 23:01 drgrib

@drgrib Mind getting me the exported workflow package binary? Currently fighting trying to re-package it and would rather spend that time checking this out :)

chrisbro avatar Jan 22 '18 13:01 chrisbro

@chrisbro Sure thing. I've never done that before. Is there something you have packaged in to the workflow that I can run to generate the binary?

drgrib avatar Jan 22 '18 21:01 drgrib

@drgrib Just realized it might just be for Powerpack users, so if you're not one I'll figure something out. If you are though, instructions here (ctrl-f "Sharing Your Workflow").

chrisbro avatar Jan 22 '18 23:01 chrisbro

@chrisbro It's okay. I am a Powerpack user. However, I'm finding it impossible to import my workflow without overwriting your workflow. Know what setting I need to change to prevent that? Otherwise you could create an additional "Test" user on your own macOS.

drgrib avatar Jan 22 '18 23:01 drgrib

@drgrib No worries, I'll just export mine first so I can restore whenever I need to.

chrisbro avatar Jan 22 '18 23:01 chrisbro

@chrisbro Cool. You can get the .workflow here. I've made some minor modifications since the PR but it is backwards compatible with the commands I talk about here in the PR.

drgrib avatar Jan 22 '18 23:01 drgrib

@drgrib OK, finally got my busy (lazy) butt on the path to checking this out!

'bn' does indeed throw an ImportError regarding the clipboard module. Trying to see if I can get that figured out.

What do you think about the comments here? Thinking that's the right way to go.

chrisbro avatar Jan 25 '18 00:01 chrisbro

@chrisbro Good to know. I'll take a look at it and try to fix and install it on a test account on my Mac. Thanks for checking it out.

drgrib avatar Jan 25 '18 22:01 drgrib

@chrisbro, (Just checking out your handy package) I've run across an ImportError for Mac libraries (like the clipboard) before. It probably means you are somehow not using the default python that came with macOS but one you installed later.

robwalton avatar Apr 01 '18 18:04 robwalton