Coder Social home page Coder Social logo

alfred-bear's People

Contributors

chrisbro 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  avatar  avatar  avatar  avatar  avatar  avatar

alfred-bear's Issues

Bug: "Error in workflow"

Hey Chris, I'm super excited about this workflow, thanks for making it! I'm getting an error when trying to search for a note. Any tips? I'm on Alfred 4.0.4, using version 0.3.5 of your workflow, Mac Catalina 10.15.

I'd be happy to help, just let me know what I can do!

Screen Shot 2019-10-11 at 11 12 54 AM

Show context for search results when text matches found

When searching for a title, it's obvious in the title of the note the reason that note was pulled up. Not so much for results found via text - it only shows the title of the note, so it's hard to tell the content that matched.

Show the content that matched in the results so that users can better see which note to open.

Error in workflow 'com.chrisbro.bear'

Probably something on the user end, but I'm getting this error with the "bs" command. Is there a way for me to reassociate whatever needs reassociating?
screen shot 2018-09-17 at 7 43 19 pm

Fetch note contents

Thank you so much for making this fantastic workflow!

Is it possible to fetch the notes content by holding down a modifier key in the search bar? Something similar to the way one can paste the link to note to the frontmost app, but instead past the note contents?

I have been attempting to do this, but my knowledge of Golang is non existent, so it hasn't worked.

no such table error

Each time I try to search for a note or tag, I get the following error:

no such table: ZSFNOTE

I am running the release version of alfred-bear and version 1.3.1 of bear on macOS 10.13.1

Able to offer several features via PR if this project still active

After downloading your workflow, which I found helpful and well-designed, I went to work adding a few additional features that I had grown accustomed to in the Evernote Workflow:

  • Adds #9
  • Adds bls command to "list" the most recent bear notes without having to remember their titles and search for them
  • Opens a note from bs in its own window without opening the main window
  • Adds text from clipboard to bn note
    • Opens note in its own window without opening the main window
    • User can hold cmd to suppress opening its window
  • Limits all queries to 25, substantially improving performance (it is unlikely a user would scroll through more than 25 results in the Alfred interface)

However, I noticed that you have a PR that is still open from Nov 7, 2017 and don't want to spend time setting up my own PR if this project isn't in active development.

Bear Search Crashes

"bs" crashes with the error shown below. I am on Monterey with Apple silicon.

[08:03:24.480] Bear[Script Filter] Queuing argument 'f'
[08:03:24.605] Bear[Script Filter] Script with argv '(null)' finished
[08:03:24.607] ERROR: Bear[Script Filter] Code 1: 08:03:24 workflow.py:2225 DEBUG Workflow version : 0.3.5
08:03:24 workflow.py:1628 DEBUG Reading settings from /Users/lawrence/Library/Application Support/Alfred/Workflow Data/com.chrisbro.bear/settings.json ...
08:03:24 workflow.py:2514 DEBUG Update check not due
08:03:24 workflow.py:1859 DEBUG Loading cached data from : /Users/lawrence/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.chrisbro.bear/__workflow_update_status.cpickle
08:03:24 workflow.py:2444 DEBUG update_data : {u'available': False}
08:03:24 search.py:37 DEBUG Started search workflow
08:03:24 search.py:60 DEBUG [u'f']
08:03:24 search.py:42 DEBUG Searching notes for f
08:03:24 search.py:98 DEBUG Searching notes
08:03:24 workflow.py:1748 DEBUG Data db_path stored in cpickle format
08:03:24 workflow.py:1763 DEBUG Stored data loaded from : /Users/lawrence/Library/Application Support/Alfred/Workflow Data/com.chrisbro.bear/db_path.cpickle
08:03:24 queries.py:202 DEBUG /Users/lawrenceporter/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite
08:03:24 workflow.py:2243 ERROR unable to open database file
Traceback (most recent call last):
File "/Users/lawrence/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FFB1C5EB-498D-49F8-8531-B644F70975C5/workflow/workflow.py", line 2236, in run
func(self)
File "search.py", line 43, in main
execute_search_query(args)
File "search.py", line 99, in execute_search_query
title_results = queries.search_notes_by_title(WORKFLOW, LOGGER, query)
File "/Users/lawrence/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FFB1C5EB-498D-49F8-8531-B644F70975C5/queries.py", line 138, in search_notes_by_title
return run_query(workflow, log, sql_query)
File "/Users/lawrence/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FFB1C5EB-498D-49F8-8531-B644F70975C5/queries.py", line 204, in run_query
conn = sqlite3.connect(db_path)
OperationalError: unable to open database file
08:03:24 workflow.py:2267 DEBUG Workflow finished in 0.017 seconds.
[08:03:24.610] Bear[Script Filter]
<title>Error in workflow 'com.chrisbro.bear'</title>unable to open database file/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns

Workflow contains .pyc files

Hey, I usually inspect workflows before using, and noticed a few oddities:

  1. The latest alfred-bear.alfredworkflow contains .pyc files which is compiled byte code, there's no benefit to this as it increases the size
  2. There seems to be a notify workflow inside yours, I first noticed the Notify.tgz file, which contains Notify.app, and then there's a bunch of python code that seems unused?

Thought I'd make you aware, cheers.

Feature request: Fuzzy Search

I'm not a python developer or particularly knowledgable about SQLite extensions, however, I've been trying to figure out how to make fuzzy search possible with this workflow.. my current understanding is that I'd need to:

  • Install and enable the FTS3 module/extension on my local database.sqlite
  • Create an FTS3 virtual table
  • Modify the TAGS_BY_TITLE query so that it does a MATCH query on the FTS3 virtual table?

I'm guessing the above steps would likely break a few things, and it's maybe not so straightforward. @chrisbro do you have any thoughts on this?

Search tag 'bst' broken by last update

Apparently they not only changed the location but also the structure of the DB.
In my database, it is:

sqlite> .schema Z_6TAGS
CREATE TABLE Z_6TAGS ( Z_6NOTES INTEGER, Z_13TAGS INTEGER, PRIMARY KEY (Z_6NOTES, Z_13TAGS) );
CREATE INDEX Z_6TAGS_Z_13TAGS_INDEX ON Z_6TAGS (Z_13TAGS, Z_6NOTES);

In the queries you are using table Z_5TAGS with fields Z_5NOTES, Z_10TAGS.
I don't get why they would increment (version?) field names (???) but sadly, this happened.

For me the following did the trick (fixed the search)

$ sed -i '' -e 's/Z_5/Z_6/g' -e 's/Z_10/Z_13/g' queries.py

Request support for non-ascii char

Thanks for your awesome work!

I need to search something besides English words. Could you please add other languages support?

Also, when doing bst search by tag, it just displays the tag name. Could you please add the note title on the list?

Don't open Bear after creating a new note?

First of all, thanks for this, it's working perfectly.
I'm wondering if it's possible to disable the behaviour that after creating a note, bear opens.
Is it possible to do this in the background?

Error: No such table: ZSFNOTE

I am getting this error on all calls. I can see that the ZSFNOTE table exists in the database:

"~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite."

Does not open tag when tag has space in the name

using bst the a tag with space would appear on the dropdown. When chosen would bear becomes active but does not switch to the tag.
e.g. "bst #tag/with space" will not work (here there is a tag #tag/with space#

Storyboard out how appending should work

I'd like to be able to append text (or bullet points?) to a note. Ideas:

  • Search for any arbitrary note and append to that
  • Have user define "default" or "inbox" note and have everything go to that - allows for quick text entry from anywhere and can clean it out later

Search by two keywords

Search results is empty when I'm trying to search by more then two keywords.

For example:
00000896

But when I put these keywords into Bear search bar I can find a note:
000008972

Debug info:

0:12:28 search.py:37 DEBUG    Started search workflow
00:12:28 search.py:60 DEBUG    [u'git revert']
00:12:28 search.py:42 DEBUG    Searching notes for git revert
00:12:28 search.py:98 DEBUG    Searching notes
00:12:28 workflow.py:1748 DEBUG    Data `db_path` stored in `cpickle` format
00:12:28 workflow.py:1763 DEBUG    Stored data loaded from : /Users/mac/Library/Application Support/Alfred 3/Workflow Data/com.chrisbro.bear/db_path.cpickle
00:12:28 queries.py:123 DEBUG    /Users/mac/Library/Containers/net.shinyfrog.bear/Data/Documents/Application Data/database.sqlite
00:12:28 queries.py:127 DEBUG    SELECT DISTINCT   ZUNIQUEIDENTIFIER, ZTITLE FROM    ZSFNOTE WHERE    ZARCHIVED=0    AND ZTRASHED=0    AND lower(ZTITLE) LIKE lower('%git revert%')ORDER BY    ZMODIFICATIONDATE DESC
00:12:28 queries.py:130 DEBUG    Found 0 results

Question: is it possible to improve a search?

Show tag suggestions during note creation

Suggested by "td." on the Alfred Forum.

When creating a new note, if the user types "#" to start entering a tag, show tag suggestions and ideally allow them to arrow down and tab on entries to auto-complete the tag name.

Start Typing in Note Immediately After Opening

Hi, this is a hugely useful Alfred plug-in for me. I'm wondering if it would be possible for Bear to open with the cursor in the actual note so I can start typing as soon as it opens after calling open a Note with the bs alfred workflow?

Thanks,
Jacob

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.

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.