Comments (10)
Glad to got it fixed!! Thanks so much
from alfred-bear.
Glad you are enjoying the workflow. Unfortunately, this isn't enough context for me to understand what you mean by "run the seach function from cmd line".
from alfred-bear.
So you mean run the cmd/search/main.go
. My guess is you are using go mod
? Something about the versioning of the repo or other repos I'm importing doesn't work with mod
. I haven't debugged it yet. But I would try it without mod
and it might work.
from alfred-bear.
Thanks for your response! Sorry! My bad for not providing enough context for you to understand what i meant.
Yes, what i meant is i tried to run from cmd/search/main.go
. Regarding your question, i guess I did'nt run any go mod init
command yet so i think go mod is not setup yet? By the way, go version is 1.12.1
and i dont know if this version of go will search for the gomod anywhere and set it up in the dir.
I also tried to change to go version 1.10.8 (to try to run it without gomod
) and run the same command cmd/search/main.go
in GOPATH mode but it still returns the query string. I check the code and there's one part that i think might relates to this.
From this code above i can see that theres
m` variable that stores that map of the column name. I think this is the part that is somehow related.
from alfred-bear.
I don't think the code has any problems. If that were the case then the workflow itself wouldn't function which obviously isn't the case since I use it every day and it has been downloaded over 200 times.
The issue is almost certainly your Go environment and how you are running it. I definitely won't be changing any code for your local run issues, so I would focus on how you are trying to run it.
from alfred-bear.
Yeah i think there must be something wrong with my go env. Do you mind to explain how did you run it? Thanks!!
from alfred-bear.
I'm running go version go1.13.4 darwin/amd64
(macOS). I have a standard GOPATH
set up with the project inside it under src/github.com/drgrib/alfred-bear
.
To build cmd/search
, I cd
to the directory and type go build
. This creates the executable search
which is called by the Bear workflow. It can be run from the command line in its directory using ./search
followed by search terms which will create a JSON list of Alfred items matching the query. The same list is used by Alfred in the bs
/ bsearch
script filter.
from alfred-bear.
I would make sure that you can run standard simple Go programs, create executables from them, and run the executables from the command line before attempting to build the alfred-bear
executables. Some sources would be from https://golang.org/ or other Go tutorials.
from alfred-bear.
Good news: while trying to get go.mod
working, I discovered that the package "github.com/mattn/go-sqlite3"
I had been using had updated one of its data structures and broken my db code on fresh installs. The only reason my local repo was building the right code was because I had the old version.
Once I merge the branch I'm working on today into master
, you should be able to pull the changes and run the code. You were right that the database code was the source of the issue.
from alfred-bear.
You should be good to go with #23.
from alfred-bear.
Related Issues (20)
- Feature request: open/create notes in app by default HOT 5
- Error when running on Monterey 12.3 HOT 2
- Bear 2.0/Beta support request HOT 17
- Searching without the hotkey HOT 3
- `bsearch` and `bs` disappear after pressing space or select HOT 6
- Search for Tag doesn't work when there is a space in the Tag name HOT 15
- Alfred Bear workflow may not work with Bear 2.x HOT 10
- Search failing with Bear2 update HOT 3
- Error when searching HOT 1
- Create a new blank note HOT 2
- Bug when creating ToC, if the title is a link, it doesn't go to that title HOT 4
- Error: "cmd/search/search: Bad CPU type in executable" HOT 2
- Feature request: Allow to search archived notes as well HOT 3
- Insert wiki-links instead of linking to id HOT 9
- Pressing SPACE after typing BS makes alfred-bear Workflow disappear HOT 3
- Infinite wait state HOT 3
- Native Apple Silicon Support without Rosetta HOT 4
- Please add the github sponsorship. HOT 8
- License? HOT 3
- Get the link to that note via a hotkey (shift enter, option enter, etc.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-bear.