Code Monkey home page Code Monkey logo

alfred-bear's People

Contributors

dependabot[bot] avatar drgrib avatar itsyohan avatar kudrykv avatar neo-anderson avatar rogiervandenberg avatar verginer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-bear's Issues

Infinite wait state

Searching for notes in Bear using bs results in an infinite search with no results, as shown in the following debugging image.
Just out of curiosity, I've uninstalled and reinstalled Workflow and am seeing the same thing.

Note that this is the same for bn as well as bs

image

Could I Copy Title with `ctrl`?

Hi :D

I appreciate your nice sharing.
I know that I can get link of search result(notes) with shift key.
I just see link/main.go file and found that there is code to extract title data.

So.. Could I get only title data and copy it into clipboard?
I mean I search and copy the title of note with ctrl key.

Thank you!!

Feature request — open a tag

First of all, I just switched over to this extension from the former one I used. Great work, really enjoying it so far.

Feature request: it would be awesome to be able to quickly open a tag and see all notes in that view.

Example: I take a lot of meeting notes for client projects, and tag them accordingly. So I have a tag like "work/randomClientName".

It would be great to type bt into Alfred, start typing randomClientName and hit enter, and have it open the following x-callback-url (built from the Bear tag builder): bear://x-callback-url/open-tag?name=work%2FrandomClientName

This would immediately drop me into Bear as if I'd clicked the tag in the tag list and show me all my notes within that tag.

Error when running on Monterey 12.3

I just upgraded to the latest version of MacOS and unfortunately it broke these wonderful workflows. It appears that /usr/bin/python has been removed. Executing a command gives the following error:

[14:30:43.717] ERROR: Bear[Script Filter] Code 127: /bin/bash: /usr/bin/python: No such file or directory

/usr/bin/python3 does exist, but pointing the Bear commands directly to that version still produces an error:

ModuleNotFoundError: No module named 'cPickle'

Any one else run into this? Any ideas on how to resolve? Thanks in advance.

Display the first line of notes when searching

Hi, this workflow is very useful and help me a lot! Thank you for your great job. In my work setting, it's more important to display the fist line of notes than display tags. I know little about coding. Could you help me and add this feature to your workflow? For example, press "option" to display the first line. Thank you very much!

`bsearch` and `bs` disappear after pressing space or select

This might be a basic question but I haven't been able to find a solution anywhere online. I wondered if anyone knows what was going on here. Thanks.

I can use bn (+ argument) and bnew (+ argument) keywords without a problem. If I type bcs, Alfred would initially give the correct suggestion.
bcs_before_space

However, as soon as I press SPACE or TAB before getting a chance to type in the search argument, the Bear related workflow options would disappear.
bcs_after_space

The same happens to bcsearch, bs, bsearch too. For bsearch, it happens when I type the letter h.
bsearch_before_h

bsearch_after_h

Request: open notes in main Bear window

At the moment notes are opened in a new Bear window. Would it be possible for them to be opened in the main Bear window. As an option would be fine.

thanks.

Feature request: able to paste link to note w/o title

I find myself using the plugin all the time to link to my notes in Bear from other places (e.g. task mgmt tool, journal). Often, I have anchor text I want to use for the link that is different than the note title. It would be useful to be able to paste just the note x-callback URL, without the title.

Example

I was just linking from my task mgmt software to a note in Bear for a book called "Pivot." I had existing anchor text that I wanted to link to the note, which was "this is from the Pivot book I first read in 2017."

When I pasted the link, I got: [Pivot: The Only Move That Matters Is Your Next One](bear://x-callback-url/open-note?id=D65B06EC-2AE9-40D0-9BB2-D6D5580F768E-1862-00001BFEDC390C09&show_window=yes&new_window=yes)

What I would love is a way to just paste: bear://x-callback-url/open-note?id=D65B06EC-2AE9-40D0-9BB2-D6D5580F768E-1862-00001BFEDC390C09&show_window=yes&new_window=yes

Please add the github sponsorship.

매달은 아니더라도 나는 일회성으로 당신을 후원할 생각이있습니다. 정말 좋은 소프트웨어에 감사합니다.

I'm thinking of sponsoring you on a one-off basis, if not every month. Thank you for the really good software.

Searching without the hotkey

Hey @drgrib, I have a quick Q if you don't mind!

I was hoping to have Alfred automatically draw up results from my bear without me having to specifically put in bs at the starting of the query - could you please guide me through how to do that?

I have the workflow editor open in front of me and I was wondering if simply changing the script filter to a file action or a universal action would let me achieve what I'm gunning for?

Thanks a ton!

Cheers,
J

Add external triggers

Hi,

Thank you for the great workflow! Since I use it a lot, I added an external trigger to the search action to be able to call it from karabiner via Apple Script. However, every time I update the workflow, triggers are removed. May you add them, please?

CleanShot 2020-03-08 at 11 00 57@2x

License?

Can you include a license file, so that people know what is and is not permissible with this workflow?

Search failing with Bear2 update

Hi,

'bs' was working just now with old Bear. I then updated to Bear2 and 'bs' stopped again [2023-07-21]. It looks the same as when the quarantine line [xattr -rd com.apple.quarantine cmd] needs to be run: 'bs' triggers the 'Search Bear Notes' prompt in the Alfred bar but disappears when you hit space and falls-back to a Finder-type of search. And 'bn' does still work to create a new Bear note.

I've replaced the workflow with the current one from GitHub and run the quarantine command a couple of times, but this didn't bring the 'bn' search back.

TIA, Jasper

Bear Search

Feature request: open/create notes in app by default

The default behavior of most actions is to open or create notes in a new window by default. I like mine to open in the app by default to minimize screen clutter, so I've reworked the workflows that way. It would be nice to have a configuration of some sort to allow the default to be user selectable without changing the workflows.

Feature Request - Append to Note

Hi thanks for the great workflow!

I'd like to append to a bullet MD list on a note (or ideally different notes ) do you have any plans to add anything like this to your roadmap?

Feature request: Clone Note

I do have a couple of template notes for some repeated information gathering. Duplicating and opening them via Alfred would be very helpful to me. I would be willing to write this feature if deemed useful by others.

searching for notes without a tag

I just discovered your workflow - and I am blown away by how useful and fast it is. Everything worked as expected until I tried a common search strategy of mine that is not available through your workflow.

I have a lot of journal notes in bear, and I often want to search within the journal notes, or more likely exclude them from my search. This is done by searching for -#something

In my case I can exclude all of my journal notes by searching for -#journal_ since all of my journal notes are tagged in the same way. For example, today's journal note is tagged: #journal_2021/01/23.

When I try bs: -#journal_ in your workflow, I turn up only the two notes where I documented this search strategy for myself. In other words searching for -# doesn't exclude tags, but rather searches for text containing -#.

Hope this makes sense.

Thanks again for this wonderful contribution.

Get the link to that note via a hotkey (shift enter, option enter, etc.)

Curious to ask if it would be possible to make a hotkey to copy the link to the note (bear://x-callback-url/open-note?id=111016E4-AC03-46A7-96D5-EDE81646F666) in some format like this via the workflow.

I think that would be very convenient, as I guess it could easily be pasted into something relevant, like a task manager or calendar event. That makes thing very simple. I've seen a workflow called search notes could do it in apple notes. I guess it could be possible in this workflow?

Curious if others had a similar request in their daily workflow.

Pressing SPACE after typing BS makes alfred-bear Workflow disappear

Hello, I followed the instructions to install alfred-bear, including giving it all the permissions and installing Rosetta. Report steps:

  1. Launch Alfred
  2. Type BS
  3. Hit the spacebar
  4. Alfred searches for files instead

I attached a video of the repro. Running Mac Mini M1, Sonoma S14.1.1 (23B81)

Let me know if ii can provide you with more info.

bear-alfred-close.mp4

Appreciate any help!

Search by multiple words (word parts) returns no results

Not sure, if this has been mentioned before, but the search only seems to work with one keyword present. As soon as I add a second one (even if the first one is totally correct) it won't show any details. I have provided two screenshots below, to better illustrate the issue.

image

image

Native Apple Silicon Support without Rosetta

Thanks for this amazing workflow, which I use everyday.
Previously, I was using an Intel Mac, but now I have switched to Apple Silicon. I can help build native Apple Silicon binary files, but I am unsure about how to package them into an Alfred .workflow file.

Integrate Bleve for relevance searching

One of the features, I have always been missing on Bear is relevance searches. When you have thousands of notes, this starts becoming an issue. I mentioned it to the Bear guys, but they have no intention of introducing it to the app anytime soon.

@drgrib Perhaps, checking out Bleve is something we could look at (if interested)? I've wanted to try it out for some of my personal projects, so this would be a nice experiment.

Feature request: Allow to search archived notes as well

Let me start by thanking you for this workflow, it's really awesome!

In Bear, I currently use a tag called "archive" as opposed to using the archive functionality in Bear itself. As a feature request, I'd like the ability to have the workflow search archived notes as well. Personally, I can see two options:

  1. Remove note.ZARCHIVED = 0 from the queries to always search archived notes
  2. Add a variable that determines whether to search archived notes or not

I'd be happy to help out and contribute :)

[Request] Block to Search

Hello, Thank you for your nice share.

I'm trying to use this workflow.
It is so amzaing and awesome!!.
But I want to a feature for searching..

Could I filter search reasult with tag?

I mean,
There are notes with #test tag, but I don`t want to find these notes using workflow.

Would you have any plan for this feature?
Thank you!!

Bear 2.0/Beta support request

Hey Drgrib, thank you so much for constantly updating this alfred-workflow and keeping it up for all of us to use. Its an amazing addition! Recently, i've been granted the use of Bear 2.0/private beta key and noticed that the workflow doesn't convert work for it.

On the surface I figured it would be an easy fix by going into the .go files and replacing the DBpath with the new SQL database used to store the notes, and replacing the xcallback urls found in the workflow scripts with the newer versions.

Everything seemed to be working and the scripts were in fact working with bear 2.0, but i ran into a problem with the sql database, and despite changing dbpaths, I haven't been able to get the alfred workflow to find all the new notes created with bear 2.0

Below I've attached some screenshots of where i got the sql file path from and the new xcallback urls.

Hoping to see whether you could help out with the new sql database update, because I'm not a coder and its been frustrating me.

Screenshot 2023-01-19 at 11 39 47 PM

Screenshot 2023-01-19 at 11 41 18 PM

Note: The new xcallback urls just add a "2" at the back of "bear"
Note: The new SQL Database uses 5 tags instead of 7

Open note in main window

Hi @drgrib,

Thanks for creating this great workflow!

Is it possible to open the notes in the main window instead of a new pop-up?

Error when searching

Can someone help me figure out why search stopped working for me? I think it may have happened after my machine did an update. Any help would be appreciated. I'm on version v1..1.6 and bear version 2.0.5. Thanks so much, and let me know if theres an other info of logs i should have included! I've been using this for a few years and its a huge part of my workflow thanks so much!

And in the logs I see this:

goroutine 1 [running]:
main.main()
	/Users/chrisredford/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.48B0F8E6-2BC8-4EB9-B35E-1DBB820AA8E7/cmd/search/main.go:29 +0x536
[11:53:00.026] Bear[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4004DD5A-A69E-41CE-8F14-871E64B7BD2C%3E4D5617AA-ADE7-45B5-9C05-DA6C69781662)] Queuing argument 'hello'
[11:53:00.106] Bear[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4004DD5A-A69E-41CE-8F14-871E64B7BD2C%3E4D5617AA-ADE7-45B5-9C05-DA6C69781662)] Script with argv '(null)' finished
[11:53:00.118] ERROR: Bear[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4004DD5A-A69E-41CE-8F14-871E64B7BD2C%3E4D5617AA-ADE7-45B5-9C05-DA6C69781662)] Code 2: panic: no such table: Z_7TAGS

Feature request: Porting "search for a tag"

Hello! I love this Workflow—it's a gamechanger for me and I use it several times a day.

I noticed that the original package maintained by chrisbro has a bst command that searches tags and opens the appropriate tag in bear. Just wanted to ask you if porting this functionality over is on your development roadmap.

Thanks again.

Add an option to combine search and create

What 're your thoughts on adding a combined 'search and create' option similar to that on nvALT or Notational Velocity?

For instance, when I search for "example".
it shows

note 1 example
note 2 example
create a new note titled 'example'

I think this should be an extra option or command, but not the default.

Feature Request: Support for templates

Hey, I just discovered your workflow, thank you so much for sharing this. It made my life working with Bear a lot easier.

There is only one thing I am missing, which is the ability to use templates when creating notes with bn or bcs. I found a workaround by modifying the X-callback-url‘s text-parameter, however this makes adding tags or the content of the clipboard impossible (I suppose appending the X-callback-url‘s text-parameter after {query} simply overrides the tags + contents of clipboard).

I would love if there was some way to create notes according to some custom template using your workflow (maybe using a markdown-file with {placeholders}?) Thanks again for sharing!

Bug when creating ToC, if the title is a link, it doesn't go to that title

hello. I am using your workflow really well.

Thank you for creating such a good workflow.

However, when I use the alfred-bear workflow to create a TOC with a link in the title, it looks like the following, but when I click on the ToC, it doesn't go to the title and does nothing.

The ToC below is the ToC generated when the title is a link.

## ToC
* [- chromium-workflow -(https://github.com/jopemachine/alfred-chromium-workflow/tree/0.2.9)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bchromium-workflow%5D%28https:%2F%2Fgithub.com%2Fjopemachine%2Falfred-chromium-workflow%2Ftree%2F0.2.9%29&show_window=yes&new_window=yes)
* [- bear-workflow -(https://github.com/drgrib/alfred-bear)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bbear-workflow%5D%28https:%2F%2Fgithub.com%2Fdrgrib%2Falfred-bear%29&show_window=yes&new_window=yes)
* [- github-workflow -(https://github.com/gharlan/alfred-github-workflow)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bgithub-workflow%5D%28https:%2F%2Fgithub.com%2Fgharlan%2Falfred-github-workflow%29&show_window=yes&new_window=yes)
* [- naver-workflow -(https://github.com/Kuniz/alfnaversearch)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bnaver-workflow%5D%28https:%2F%2Fgithub.com%2FKuniz%2Falfnaversearch%29&show_window=yes&new_window=yes)
* [- markdown-table-workflow -(https://github.com/crispgm/alfred-markdown-table)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bmarkdown-table-workflow%5D%28https:%2F%2Fgithub.com%2Fcrispgm%2Falfred-markdown-table%29&show_window=yes&new_window=yes)
* [- timeZones-workflow -(https://github.com/jaroslawhartman/TimeZones-Alfred)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5BtimeZones-workflow%5D%28https:%2F%2Fgithub.com%2Fjaroslawhartman%2FTimeZones-Alfred%29&show_window=yes&new_window=yes)
* [- emoji-workflow -(https://www.alfredforum.com/topic/11126-alfred-emoji-search-emojis-by-name-or-keyword/)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5Bemoji-workflow%5D%28https:%2F%2Fwww.alfredforum.com%2Ftopic%2F11126-alfred-emoji-search-emojis-by-name-or-keyword%2F%29&show_window=yes&new_window=yes)
* [- appleNote-workflow -(https://github.com/sballin/alfred-search-notes-app)](bear://x-callback-url/open-note?id=28AD2C99-1B24-4FE9-B0B9-6D48B6B2FE13&header=%5BappleNote-workflow%5D%28https:%2F%2Fgithub.com%2Fsballin%2Falfred-search-notes-app%29&show_window=yes&new_window=yes)

Thank you.

'bs' stops working after update

I just updated from 1.1.2 to 1.1.8 and one of the three alfred-bear commands stopped working.

bn and bcs both work fine but bs/bsearch comes up with nothing.
image

There were some issues with the security certificate the first few times I tried it. I don't know if I can get the workflow to reindex or something like that.

Insert wiki-links instead of linking to id

Bear version 2 now has backlinks, which is great.

Unfortunately, the backlink panel won't generate backlinks based on id-links. Bear support said that they have no plans to implement support for building backlinks from "hard links". They suggested I'd try to get the workflow author to change the links to wiki links.

This is how a "drgib" link looks like after inserting via shift-enter:
image

This is how a wiki link looks like after draging one note into another.
image

I would love to have access to the backlink list, but I cannot work without the superb drgrib-workflow.

Error when running on Catalina

Thanks for this awesome Alfred plugin! Just a heads up, on Catalina, using the scripts fail (I am guessing this is due to the executables not being signed).

The workaround I found is to open Alfred and right click the extension, choosing to view it in Finder. Then, go to the three executables (create, search, link) under cmd and right click each one and choose to run, accepting the warning. Afterwards, it seems to work fine, but would be awesome if this may be signed by default.

Thanks!

Code 127: /bin/bash: cmd/search/search: No such file or directory

Hi, I need some help here.

Not sure if this is due to using Catalina, or do I need some go setup, but I'm getting this error (debugging this workflow):

|[08:46:32.669] ERROR: Bear[Script Filter] Code 127: /bin/bash: cmd/search/search: No such file or directory

Any ideas?

I'm using Alfred 4.0.5.

Thanks.

Feature Request: Shortcut for inserting a TODO

I use the bn shortcut quite often, many times for adding simple TODOs or reminders. Although adding a new note with just a title is more than fine within Bear, it requires a bit of cleaning up every now and then.

I'd propose the adding of an additional shortcut: e.g. bt, which would either:

  • pre/append a new TODO to a single note defined in the workflow's settings (default: TODOs)
  • or, create a new note without a title, but only with the TODO text on the first line (Bear is quite OK with this). Each note may have an associated hashtag (#TODO by default). Optionally, when adding a TODO, the app can skip opening it up, since it is very rare that one needs to add more details right away.

image

@drgrib what do you think?

Question: sqlite is returning query string instead of row data

Hello @drgrib, first of all thanks for this awesome alfred workflow, been using it extensively for my note taking flow!🙂

One quick question, i'm trying to run the seach function from cmd line but sqlite is not returning the title of the data from the query, but returning the query string instead and i'm not sure what's the problem here. Do you have any idea? Heres where i put some print to see the output.

Screen Shot 2020-05-09 at 5 26 26
Screen Shot 2020-05-09 at 5 27 39

Error: "cmd/search/search: Bad CPU type in executable"

Hello,

Problem: When trying to search using this workflow, I type in "bs test". The workflow disappears after I start typing "test" and Alfred falls back to my default searches. This happens regardless of my search term; this is just what I was testing with today.

The debug log shows errors like this every time:

[13:00:07.332] Logging Started...
[13:00:57.506] Bear[Script Filter] Queuing argument 'test'
[13:00:57.526] Bear[Script Filter] Script with argv 'test' finished
[13:00:57.532] ERROR: Bear[Script Filter] Code 126: /Users/james_simas/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/0E686738-AF36-4F1A-9B8E-5BC579ED706A: line 1: cmd/search/search: Bad CPU type in executable

I'm running a MacBook Pro with an M1. Is this architecture supported?

Let me know if you need any additional info.

Thanks!

Versions:

  • macOS: 13.5.1
  • Alfred: 5.1.2 [2145]
  • alfred-bear: v1.2.1

Alfred3 = incompatible?

I run Alfred 3.8.3

  • downloaded your app
  • installed
  • see "Workflow incompatible, please install the latest version of Alfred"

... assumption : Alfred4 only?

Alfred Bear workflow may not work with Bear 2.x

After updating Bear from 1.x to 2.x I experience the following behavior in the Alfred workflow.


1. I type bs in order to find something in Bear:

alfred-1

2. As soon as I type a space and try to search for that phrase, Search Bear Notes disappears:*

alfred-2

Could you confirm if this applies to you as well, or is it just me?


  • I definitely have at least one note containing the word “hello”

Create a new blank note

Not sure if this is a bug or a feature request, but it seems impossible to create a new note with no initial content. I seems like it needs a tag or a title before it will create a new note.

bs & bsearch not working here, although bc works

I really like this, it's kind of what Bear's search should be

bc works for me but bs reverts to google search when I hit the space bar after typing 'bs'. Debug window gives me:

I'm running MacOS 12, Monterey.

[09:27:01.719] Logging Started...
[09:27:19.165] Bear[Script Filter] Queuing argument ''
[09:27:19.234] Bear[Script Filter] Script with argv '' finished
[09:27:19.237] ERROR: Bear[Script Filter] Code 127: /Users/kimaldis/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/DE1C2DE5-2BB3-4A62-9AD3-3A27F7D23088: line 1: cmd/search/search: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.