Closed gothrek22 closed 7 years ago
This is a great PR. Thanks!
Unfortunately, I think it might conflict with PR #38, which I think should take precedence.
As soon as I can get #38 merged and working as expected, I will take a closer look at this, and see if I can get them both to work.
Either way, I really appreciate that you took the time to submit this.
I did some more research on PR #38, and I just closed it, b/c it can't do git inits w/o using a binary, but the Dulwich
library can.
There's a release happening soon (hopefully tonight). Once that's out, I plan to start migrating from sh
to Dulwich
for dealing with git. I think once that conversion has happening, I'll be able to pull in this PR and (with some additional tweaks) merge it into magpie.
Sorry it's taking me so long on this PR, but the work is definitely appreciated.
@charlesthomas if we migrate from sh, will we need to find another way of doing search or will you keep that?
I where just looking on how to use parallel to speed the search up for big notes-collections, see for example http://stackoverflow.com/questions/9066609/fastest-possible-grep/9067042#9067042
@erickr magpie currently requires cygwin, b/c of sh
. The reason I want to use Dulwich
for git, is so that we can also replace the sh.grep
and sh.find
with native Python, and then we should be at least closer to being able to run magpie on Windows w/o cygwin.
Parallel looks cool, but it wouldn't work on Windows machines. We could try to detect support for it or something, but I think that would probably add too much bloat for not a lot of gain.
@charlesthomas Ah, ok, I see, is there any small and simple search tools for python available? Or do we need to craft something ourselves? Its good if it does not require an index since that would cause issues if notes are updated from outside magpie for some reason.
Btw, quick googling, whoosh looks good, but requires an index to be built/maintained. https://pypi.python.org/pypi/Whoosh/
I've added automatic git repository creation, for the moment only on the local file system, via config site.
If the repo path is changed from default and it doesn't exist on filesystem it should be created if the user has permissions.
Also added automatic setting of git global variables.
Both are a bit dirty without much logic, feel free to modify/delete/ignore this pull request.