GitJournal / dart-git

A Git implementation in pure Dart
Apache License 2.0
76 stars 14 forks source link

Documentation? #12

Closed thyssentishman closed 1 year ago

thyssentishman commented 1 year ago

Hi, I'd like to use this library for an app I want to write with flutter, but I can't find any documentation. Is there any? Can the library already be used, or is it still incomplete? Thanks

vHanda commented 1 year ago

It's fairely incomplete. It's good for reading repo, and making a commit. But it doesn't support cloning or pushing or pulling. Nor is it ever going to.

For Gitjournal, I used a libgit2 wrapper which implemented pushing, pulling and cloning. The cross compiling was a pita but it works.

Right now, for the next version of Gitjournal I have a dart -> go (go-git) wrapper for the pushing and pulling. For the rest, I'm going to continue using dart-git.

I don't plan to add any serious documentation. Sorry. But pull requests are most welcome

Take a look at the automated tests for examples, please.

thyssentishman commented 1 year ago

Thanks for the quick reply. I understand. Would you mind pointing me to the libgit2 wrapper please?

vHanda commented 1 year ago

https://github.com/GitJournal/git_bindings

This doesn't use FFI, as when I wrote it FFI wasn't yet available. The Android version downloads the required libraries, but for the ios one the build process was quite complex (and now broken, hence why there hasn't been a GitJournal update on ios for a while)

Can you please tell me more about the app you're working on? I'm curious.

Also, here is the go-git bindings, it's still a WIP - https://github.com/GitJournal/go-git-dart

thyssentishman commented 1 year ago

Great, thanks!

Can you please tell me more about the app you're working on? I'm curious.

I'm still in the brainstorming phase so too early to give details, but basically I want to add git support to something like this. The current file syncing options available are webdav, nextcloud and dropbox, but I think git would fit this concept very nicely.

I'd like to know what you think. After all, I guess it's something quite closely related to what GitJournal offers and your experienced opinion and feedback would be very appreciated.

vHanda commented 1 year ago

Well, I've been slowly refactoring parts of Gitjournal out so I can use it in other apps. Gitjournal has become way too large, and it lands up becoming like an IDE with git support for mobile. But that isn't what I wanted to build. I just wanted my journal entries synced and a few notes.

I added simple to-do lists to Gitjournal cause people asked and I was trying to copy Google Keep.

Right now I'm working on a personal finance app based on Plain Text accounting (beancount), and the syncing will be done via git.

One of the hard parts in Gitjournal was providing a good user experience for setting up a git repo. That part is now somewhat in a different package called git_setup (see the packages folder in Gitjournal). I'm going to be slowly refactoring more parts out.

You're welcome to use whatever you want. I'm happy to also relicense it to Apache2, if you prefer.

thyssentishman commented 1 year ago

I just wanted my journal entries synced and a few notes.

I feel you. I'm also missing simpler syncing capabilities without having to host bloat like nextcloud. But hey, great job pioneering with Gitjournal :)

Right now I'm working on a personal finance app based on Plain Text accounting (beancount), and the syncing will be done via git.

Nice! I look forward to testing it. In the past I enjoyed using ledger, but stopped due to the same issue... syncing. Take a look at it, it's super simple, yet quite powerful.

You're welcome to use whatever you want. I'm happy to also relicense it to Apache2, if you prefer.

Awesome, thanks. I'll let you know if I ever get something done with your libs.