Space is a markup language that generates Anki cards. I use Space to take notes for all my classes, books I read, and anything else where I want to make the Anki cards it’s good at making fast.
Space is very limited, and I haven’t had time to update it to Anki 2 yet, but I’ve been getting more emails about it recently and might get around to doing that in the next few weeks. But it makes a good “source format” for Anki decks, and you might want to consider something like it. Space was not difficult to write, and if you’re a decen hacker you could whip together something similar and less constrained in a day or less.
But it makes a good “source format” for Anki decks, and you might want to consider something like it.
Excellent idea. I’m now wondering what the best way to implement ‘updating’ (importing the new stuff from others) would be. ie. Ways to keep add the new stuff while keeping all the memorization data.
Right now, I just make multiple Space files. It works very well for things that have a natural delineation point, like lectures or book chapters.
I can think of a few ways to do updating from an already-compiled Space file, but none of them are very elegant which is why I never tried to do it before.
I’ve tried space. About sharing: how about having unique textual IDs (say, UUIDs) for each space entry, that get carried around in cards and used to update cards in place?
Then
space entries.spc deckname
would update the entries in deckname, but also invent and add such IDs to any entries in entries.spc that are missing them. Then all we need to take care with is to only check in spc files that have IDs for all entries, which also serves to ensure the spc file is used at least once before checking in.
Since the ID is per space entry, not per card, need to figure out how to deal with intervals. Inheriting the smallest interval in any related old cards for all new cards seems just-workable, but not elegant at all.
But I think the proposal of this page is great, and update would be necessary, so why not. The other approach that might be better would be to change anki itself to use textual sources natively, but that would probably be a much larger change.
The problem is that the Space file format is intended to be human-readable plain-text. I’m not willing to compromise on that personally; I want to have plain-text files that I can check into a repository.
Without this, I think the best thing you could do is fuzzy matching on the content, but I’m not sure how well this would work in practice.
That said, you could adapt the markup language for use in Anki’s editor, storing it in something structured like XML or JSON that would have UUIDs of the type of propose.
Also, thanks for trying space! It’s not really polished or even finished and portable, but it’s really gratifying to see people touching things I’ve made.
My proposal doesn’t seem to me to compromise human readability and editability (and certainly doesn’t compromise version control) so just to make sure we mean the same thing, an example:
space update mydeck.spc
where mydeck.spc = ”
The [quick] brown fox jumped over the [lazy] dog.
;UID=SDFGHJKERTYUICVBN;
Three commonly-used nonsense variable names:
1. foo
2. bar
3. baz
;;
OCaml :: A fast, functional, strongly-typed programming language.
;;"
would find in the deck the first note using the NID, and then add the second and third (having no NIDs, they cannot be found), generate new NIDs, and update mydeck.spc to something like = ”
The [quick] brown fox jumped over the [lazy] dog.
;UID=SDFGHJKERTYUICVBN;
Three commonly-used nonsense variable names:
1. foo
2. bar
3. baz
;UID=LUKAGSDSDFGHJKEE;
OCaml :: A fast, functional, strongly-typed programming language.
;UID=HJKERTYUIVHBFJVBN;"
which you can then checkin. The only edit we would expect users to perform on an NID is to delete it when copy pasting to assign a new NID to the edited version, and that is certainly feasible. Do you still find this objectionable?
Space shouldn’t mutate the file in the general case, because it should be possible to check out a repo of Space files, run Space over all of them, and not have any changes in your tracked files.
Currently, ;; is a separator; it’s optional after the last card. The change you propose is backwards-incompatible with existing Space files. This is only an issue for me, since I’m likely the only human with a lot of space files, but it’s a pain point.
Those IDs are not human-readable. You could do high-entropy human-readable IDs with work, but they would necessitate shipping a dictionary with Space. I don’t mind doing this so this isn’t really a rebuttal.
Generally, the first bullet point is the only really hard problem. There’s no global name scheme we can use that will allow people to put global IDs for cards into a Space file. This is reducible to the problem that Bitcoin solves, so we could solve it with Bitcoin, but that’d be a massive pain. There are hackier solutions, but they’re hacks, and I’m really hesitant to include something that doesn’t get it right the first time because in the very unlikely case Space explodes in between the hack and the fix for the hack, Space will just be crippled forever.
Notice that I can’t reply very frequently because as an open feminist on Less Wrong, I’m targeted by a large amount of actively anti-feminist users who downvote productive comments like the above.
You might be interested in an inactive sideproject of mine, Space: https://launchpad.net/space
Space is a markup language that generates Anki cards. I use Space to take notes for all my classes, books I read, and anything else where I want to make the Anki cards it’s good at making fast.
Space is very limited, and I haven’t had time to update it to Anki 2 yet, but I’ve been getting more emails about it recently and might get around to doing that in the next few weeks. But it makes a good “source format” for Anki decks, and you might want to consider something like it. Space was not difficult to write, and if you’re a decen hacker you could whip together something similar and less constrained in a day or less.
Excellent idea. I’m now wondering what the best way to implement ‘updating’ (importing the new stuff from others) would be. ie. Ways to keep add the new stuff while keeping all the memorization data.
Right now, I just make multiple Space files. It works very well for things that have a natural delineation point, like lectures or book chapters.
I can think of a few ways to do updating from an already-compiled Space file, but none of them are very elegant which is why I never tried to do it before.
I’ve tried space. About sharing: how about having unique textual IDs (say, UUIDs) for each space entry, that get carried around in cards and used to update cards in place?
Then space entries.spc deckname would update the entries in deckname, but also invent and add such IDs to any entries in entries.spc that are missing them. Then all we need to take care with is to only check in spc files that have IDs for all entries, which also serves to ensure the spc file is used at least once before checking in.
Since the ID is per space entry, not per card, need to figure out how to deal with intervals. Inheriting the smallest interval in any related old cards for all new cards seems just-workable, but not elegant at all.
But I think the proposal of this page is great, and update would be necessary, so why not. The other approach that might be better would be to change anki itself to use textual sources natively, but that would probably be a much larger change.
The problem is that the Space file format is intended to be human-readable plain-text. I’m not willing to compromise on that personally; I want to have plain-text files that I can check into a repository.
Without this, I think the best thing you could do is fuzzy matching on the content, but I’m not sure how well this would work in practice.
That said, you could adapt the markup language for use in Anki’s editor, storing it in something structured like XML or JSON that would have UUIDs of the type of propose.
Also, thanks for trying space! It’s not really polished or even finished and portable, but it’s really gratifying to see people touching things I’ve made.
My proposal doesn’t seem to me to compromise human readability and editability (and certainly doesn’t compromise version control) so just to make sure we mean the same thing, an example:
space update mydeck.spc
where mydeck.spc = ”
would find in the deck the first note using the NID, and then add the second and third (having no NIDs, they cannot be found), generate new NIDs, and update mydeck.spc to something like = ”
which you can then checkin. The only edit we would expect users to perform on an NID is to delete it when copy pasting to assign a new NID to the edited version, and that is certainly feasible. Do you still find this objectionable?
I do, for the following reasons:
Space shouldn’t mutate the file in the general case, because it should be possible to check out a repo of Space files, run Space over all of them, and not have any changes in your tracked files.
Currently, ;; is a separator; it’s optional after the last card. The change you propose is backwards-incompatible with existing Space files. This is only an issue for me, since I’m likely the only human with a lot of space files, but it’s a pain point.
Those IDs are not human-readable. You could do high-entropy human-readable IDs with work, but they would necessitate shipping a dictionary with Space. I don’t mind doing this so this isn’t really a rebuttal.
Generally, the first bullet point is the only really hard problem. There’s no global name scheme we can use that will allow people to put global IDs for cards into a Space file. This is reducible to the problem that Bitcoin solves, so we could solve it with Bitcoin, but that’d be a massive pain. There are hackier solutions, but they’re hacks, and I’m really hesitant to include something that doesn’t get it right the first time because in the very unlikely case Space explodes in between the hack and the fix for the hack, Space will just be crippled forever.
Notice that I can’t reply very frequently because as an open feminist on Less Wrong, I’m targeted by a large amount of actively anti-feminist users who downvote productive comments like the above.