-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub integration #2
Comments
I'm thinking more about an ability to install decks from Github, as a fist step. |
I came here looking for existing work around Anki and Git before I resorted to exporting the plain text format of my decks for versioning in a single repository. I haven't tried the plugin yet (but will soon), but wanted to register my use case regarding the one deck=one repo thought. I am trying to use Anki more, and thus have many scattered decks, most of which are not cohesive enough to warrant collaboration. Still, I prefer both versioning and sharing, even if I don't have the time yet to make it as useful as it could be. Thus, I intend to store all or most of my decks under a single repo. I am not sure if i can do that yet with this plugin, but I assume I can use the JSON repr manually at least. My point is I understand one repo per deck is nice and easy, but the same argument could be made for many things. I have a dotfiles repo that contains dozens of scripts and functions that each could be useful to someone and no one would likely have a use for all of them in the way I do, but it does not seem reasonable for me to have dozens of repos to hold each unit. Further, as I continue to integrate more of my projects into my Github, the number of repos will only grow, leading me to favor one repo per subject area of my life. Certainly some component of one of my repos could be pulled out into someone else's repo if desired, and I could easily pull their updates back into mine if desired. I understand this is less user friendly for those new to Git or less tech savvy but simply looking to collaborate on flashcards, but keeping open the possibility of pointing to a subdirectory within a repo might not be horribly more complicated? Hopefully I will have more to contribute soon. Thanks for your work so far! |
@CNG Hey, sorry I did not reply to you earlier. One thing you might consider doing is building a deck Hierarchy e.g. having a deck that would represent some topic of your life and having relevant subdecks under it. This way you can export the top deck and all subdecks would be exported as a part of it. Which will give you what you want and preserve one deck - one repo semantics at the same time. |
Hi @Stvad, thanks for the reply. That is essentially my approach lately, though I have been exporting subdecks that are themselves umbrellas for more subdecks. My basic conflict is I want to have one repo (@CNG/anki-decks) to track my Anki decks (actually two, public and private..), but ideally I could make it easy for others to take subdecks for their own uses. So my half strategy has been to use CrowdAnki to export my main subdecks into subfolders in that repository. Those decks are probably still too broad, as my technical deck for example includes everything from Python syntax to shell commands and more. Also, I like to see the changes at a glance in a given commit, but the JSON invariably involves so many changes the diff is basically useless visually and is too big. My half solution there has been to simultaneously export the plain text notes and place it alongside the JSON. That way I can look at the diff and more easily see what was added on single lines. I'm still getting the feel for what my process should be, hence my not being very vocal yet about possible changes. A lot about Anki frustrates me (especially template programming limitations), but it's still better than anything else! |
Just a 👍 here on @CNG's mention of a “Dotfiles” repo — the amount of effort I'm putting into my Anki setup, none of which is being versioned or archived, is making me really uncomfortable. I'm interested in this plugin, only partially for “collaboration” — but much more for the backing-up, historical information about, and undo-ing, of my Anki database. Pursuant to this:
I won't make any demands of a fellow FOSS developer; but I hope this gives you some insight into what your users want! |
Hey, @evolverine awesome! No, I haven't looked into this yet. |
@CNG @evolverine @alfredgg @nicolas-raoul the recent update takes a step towards enabling this, by introducing an associated git repo for each deck. CrowdAnki would maintain those repos, with the changes you introduce to the decks. |
Way to go, @Stvad! I and @alfredgg have just tested it, and opened a few tickets for improvements. My personal goal is to get to a place where users who don't know anything about git can use this to collaborate on anki cards with others. But it's already a fabulous milestone, because we were trying to do the same thing late last year, and we got a bit stuck with the many python modules that we had to include, and weren't very sure how. So from now on it should all be easier. |
It'd be great, but hard to accomplish. I foresee a lot of work required around merging things 🙂 Please keep me up to date on your effort! And feel free to reach out regarding any questions you have! |
For future reference, posting here the library found by @katrinleinweber, PyGithub, and one for GitLab, also with the ability to fork repos. |
Export a deck to GitHub directly from Anki.
one deck = one GitHub repository. People want to fork one of your decks, not all of your decks.
After a pull request has been merged on GitHub, Anki detects that, and retrieve the changes automatically from GitHub (if detection is not feasible, at least retrieve the changes at the click of a button within Anki).
The text was updated successfully, but these errors were encountered: