bobinette / papernet

Very simple tool to keep track of the papers you read.
MIT License
7 stars 4 forks source link

cli #20

Closed joeblew99 closed 7 years ago

joeblew99 commented 7 years ago
x-MacBook-Pro:papernet apple$ ./cli paper all
2017/05/21 11:45:46 error opening db: timeout

the addresss is using is "data/papernet.db"

Also i cant go run main.go in the cli folder, because of the way you setup the cobra cmd stack. Its not a killer, but it does make it a bit tougher to iterate. Might be worth setting up a makeFile in the root that runs the standard developer things. like building the CLi and copy it to the root directory so its can find the DB path etc.

bobinette commented 7 years ago

To use the cli with go run, the command is:

go run cmd/cli/*.go

If you want to build it, you can either put the binary alongside the data folder, or use an absolute path in the configuration.

Concerning the timeout, it might be because you have the web server running as well. Because bolt puts a lock on the file, you cannot open it with 2 programs at once.

joeblew99 commented 7 years ago

thanks. yep silly mistake with locks.