Closed ohare93 closed 2 years ago
Hi!
Yeah, there's probably no way to do it conveniently. Anki DM is quite limited - though I feel grateful for your kind words.
You see, I've been developing a much more powerful tool since this January. I don't have a blueprint of how to achieve what you're requesting precisely right now, but I'm sure it can be implemented using the new tool or at least it can emulate different node types to achieve your final goal. Meh, I understand these explanations are quite useless until you see the tool itself.
Well. Honestly I haven't got a chance to publish it until now, and it's still under active development. Publishing it would mean writing tons of docs and tests (yeah, I'm a man who doesn't write tests yet) - and for that I basically didn't have enough time. But hold on, I have one idea.
I can publish it in its current state so you could try it out. And instead of writing docs I will help you with building your decks. Here are two reasons: 1) I need to see how the tool meets demands of the real world; 2) basically it seems to be a good alternative to writing docs and tests right away.
What do you think?
Try out an experimental undocumented new program? Sure, who could say no to that? 😁
How do you propose we begin?
Oh one last question, and perhaps I am asking too much of your tool (the new or old one) but I thought perhaps I was just missing a best practice.
If I have exported a deck and am using it, then I change a card or a template in Anki, what is the best way to sync those changes back into your system? I can make an export with CrowdAnki, but it will be in json format. Is there no way to reverse the direction of cards, to update my own data.csv or template files from the current standing of the deck?
Again, this is just something that worries me about this specific format. That while this abstraction comes with many benefits, I would lose the ability to make these changes in multiple places (like when I'm on the road, and only have my phone).
Also, if this new tool does deliver what you suggest (or can with some tweeks) then I would gladly contribute! 😁 I am mainly a C# programmer, and know zero PHP, but I am sure I could learn.
@ohare93
As for AnkiDM - no, it cannot sync like that of course, bacause it cannot read CrowdAnki json, it only writes it :) But as for the new tool - it's called DataMincer btw - I cannot say it's impossible due to its extensible pluggable nature, albeit I haven't created plugins which can do that right now.
Ok. I need some time for publishing and minor cleaning up. I'll keep you updated. It's gonna take less than a day I hope.
DataMincer? So it specialises in converting data from one format to another? Lovely.
Take your time, I will not have time to test this until Friday night at the earliest! 👍
DataMincer? So it specialises in converting data from one format to another? Lovely.
Yep! And CrowdAnki is just a plugin for it.
Take your time, I will not have time to test this until Friday night at the earliest!
Good, then I have enough time.
@ohare93
Sorry for the delay. But it took more time than I planned, plus I found a lot of bugs and rushed into fixing them immediately.
At first I was gonna use GitHub, but since a) I'm too shy to make it public right away and b) GitHub private repos are too expensive (if you make them a part of "organization"), I opted to BigBucket. So now it's there. huh. I sent invitation to you. Please don't think I do some proprietary code - no, the License it LGPL. Let's see how it goes first.
Also I started a new project here on GitHub to demonstrate usages of the tool. From there you can get the idea on how it looks like and also - copy repositories section from the composer.json
. Currently it has only one stupid basic deck - 01-colors. But believe me - more will come soon!
@OnkelTem
That's all good.
Aren't private Github Repos are free now? You can even add collaborators manually I believe, but the whole "Organisation" feature is for automating that and grouping a bunch of people/projects together, so I thought.
Just a glance at your starter project, I see that you have "bundles" with their own source files and templates, which can reference different "workers" which are things like CrowdAnki. Very nice. Is there a main source for card templates which is sharable between bundles, which are then overwritable inside? Or can they only use local ones?
But alright, I'll take a look at all 👍 Thanks again!
Yeah, private repos are free, but only "Organisation" feature allows you to create repos with vendor prefix, e.g. "damanicer/core", "damanicer/plugins" and etc, while with regular repos I would have to name them like: "onkeltem/datamincer-core", "onkeltem/datamincer-plugins" which offenses my sense of beauty :)
Is there a main source for card templates which is sharable between bundles, which are then overwritable inside? Or can they only use local ones?
Strictly speaking - no. But first, there is "twig" plugin which makes it possible to write templates with variables, and second - you can read templates from anywhere, e.g.:
template:
field: twig
template:
field: file
path:
field: concat
items: ['@bundle.path', '../', 'my_templates_repo/my_super_template']
params:
mytwigparam1: 'some value'
mytwigparam2:
field: whatver...
Ahh for multiple repos, I see. Well you can always make a free Organization under "Team for Open Source" which as far as I can see gives you all the benefits of an Organization, with the requirement that it all be Open Source: https://github.com/account/organizations/new
I understand if you just want to test things for now, in a private repo, but in the future this could be an option 👍
Twig allows for variables, aye? Interesting. I am just now getting to play around with it all, so bear with me today.
Yes, in the future we will open this to the public, of course. It's just that I want it to test first, true.
Twig allows for variables, aye? Interesting. I am just now getting to play around with it all, so bear with me today.
That's right. I'm making now the second example. Was not sure which topic to pick and finally went for chemistry, elements :) Also I commited several updates to the libs and one more is on its way now..
Sorry for the lack of communication, have been caught up in things. I hope to give it a proper go over tomorrow, but will be on holiday for a week after that. Will keep you posted, thanks again for sharing!
Nevermind! Take your time :)
Hello again, I got round to installing everything. Alas, the composer install
did not succeed, on any of the projects. Each of them get this same general error:
Problem 1
- The requested package datamincer/core could not be found in any version, there may be a typo in the package name. Problem 2
- The requested package onkeltem/task-runner could not be found in any version, there may be a typo in the package name.
I believe I am lacking access to your other projects which are requirements? It seems to me that your packages do not reference the local dev version of each other, but the Github versions, is that right? Or I have not properly setup the folder structure 😅 I have all 5 projects stored in C:\Users\[user]\Documents\Github\datamincer
in separate folders, as they are each their own repositories.
I should have tried this basic step a week ago! 😭
Ah, sorry for the delay! Reading...
--
Don't worry, we'll fix everything :) It's just that nobody tried to do this before, so permission issues now are not unexpected.
Ok, let's catch up instead in some chat to get rid of delays in communication!
I use: IRC, wire, telegram, whatsapp,
Sounds good 👍 I will be back home this Sunday, and can have a chat on WhatsApp 👍 my number is [redacted] let's chat there and organise it further
Perhaps I am missing something obvious, but I cannot currently see how I would use this (wonderful!) program to make an Anki deck which contains multiple note types. All data simply gets stored in "data.csv", and you specify which fields/columns and templates to take in "deck->[deckname]->build.json", but what if I only want to take certain rows of the csv?
For example, I am learning Danish, and so have been making a variety of langauge flashcards. I have a Note Type for Verbs (which has fields for conjugation) and another for Nouns (which has fields for plural/definite forms). These cards are stored in the same deck, because that is my learning deck, and it would be strange to split them up.
It would make sense to allow for multiple "data.csv" files, then in the deck options be able to select multiple of them, with their own associated Note Type, Templates, etc. Alternatively all the columns could be stored in the one csv, but there would need to be a way to specify which specific rows a Deck wishes to take from the csv file (by tag, or just when a specific field is not empty).
Have I missed anything obvious? This would be an incredibly useful addition to this lovely program, and would bring a much needed feature that CrowdAnki does support already (Note Types are specified per card). Thanks for any help~