alanxoc3 / concards Goto Github PK
View Code? Open in Web Editor NEWA flashcard note app
License: GNU General Public License v3.0
A flashcard note app
License: GNU General Public License v3.0
This case is to change the tags for all previous releases to make them in the "development phase". In addition, this case will add automatic semantic versioning to the CI system. See:
https://stackoverflow.com/questions/11354518/application-auto-build-versioning
This feature will add back edges from all answers to the parent question. The best way to describe this is by example. Take the following flashcard:
@> "It is not the most intellectual of the species that survives; it is not the strongest that survives; but the species that survives is the one that is able to best adapt and adjust to the changing environment in which it finds itself."
@ Lessons from Europe for American Business, Leon C Megginson, JSTOR - 1963
<@
The citation of the quote is the answer. Currently concards will only generate one card from that text. What this feature will do is generate two cards from the text. These are the two cards it will generate:
@> "It is not the most intellectual of the species that survives; it is not the strongest that survives; but the species that survives is the one that is able to best adapt and adjust to the changing environment in which it finds itself."
@ Lessons from Europe for American Business, Leon C Megginson, JSTOR - 1963
@> Lessons from Europe for American Business, Leon C Megginson, JSTOR - 1963
@ "It is not the most intellectual of the species that survives; it is not the strongest that survives; but the species that survives is the one that is able to best adapt and adjust to the changing environment in which it finds itself."
<@
Another example, with multiple answers:
@> 广阔 @ vast @ wide @ broad
<@
Will now generate 4 cards after this change:
@> 广阔 @ vast @ wide @ broad
@> vast @ 广阔
@> wide @ 广阔
@> broad @ 广阔
<@
This works well, because it reinforces knowledge both ways and also prevents a user by doing extra work in creating and maintaining multiple cards containing the same idea.
I want these questions answered, and maybe I will ask more questions:
I might need to ask more questions.
This case is to think about the current CLI parsing interface and rewrite the CLI backend.
I want the file name to be available at the bottom of the GUI, so I have context when looking at a card that could have multiple contexts.
If some meta data hasn't been passed off for a certain amount of time, it should be cleaned out. So if the next review date for a card was like 100 days ago, it should just be cleaned out. Of course this could be configured.
Edit: Coming back to this after a few months. This should not be a default, instead there should be an option that will run this. --auto-clean <num>
. This means I should also change the default for concards to do nothing if no files are supplied (so it shouldn't error out).
If two cards in the same file have the same question, it can be confusing. This case is here to plan what the application should do in this circumstance, and do it.
Concards should store it's configuration in a config directory. Right now there is only one file to put in there, but I will add the outcome file soon. Plus future updates will have a config file, log file, and alg plugin folder.
Honestly, it is harder to think about 3 inputs than 2. 3 inputs is complicating things too. The negative streak can be used to measure how much you are struggling with a card, so the 3 inputs isn't actually needed.
There should be a command that says: "I know this. Never ask me again." Or maybe it could mean you don't know it and it's just garbage, so you never want to have it reviewed again.
it says that darwin can't be 32 bit:
https://travis-ci.org/github/alanxoc3/concards/builds/732141969
Maybe a @
could mean the answer is reversible, while a %
means the answer is irreversible. Or vice-versa. Maybe not a %
. I'll have to brainstorm this more.
The inside of the card wouldn't change besides not backslashing gt and lt signs anymore. Here is a complex example of the syntax:
This:
#:hello#:me::#:h\#:ey|yo:#:y{::\# e|:s}:#
or shorter,
#:hello#:me\:#:y{\# e|s}:#
Would generate:
#: hello
#: me\:
#: y{}s | \# e
#: y\# e{} | s
:#
Anki has a cloze syntax. I was just using underscores, but there is no official one.
Same with newlines. Right now that is not supported.
It's all the rage now, why not do it?
If the streak is zero and the total no count is higher than the total yes count, then repeat the card within a short period of time.
The symbols need to be escaped when saving them as hashes.
I've already been doing this. I might as well have a case for it as well. I've been putting a lot of this work under GH-6. My API should be carefully selected and tested well on the public interfaces.
The undo/redo system only says "undo" or "redo". But it doesn't say what it's undoing. It would be nice to show a short message, what is actually being undone.
Some information in the README is outdated now, I want to update it to how it should look for v0.7.0.
I want to be able to see stats for the current card. Similar to the help menu.
When I first had this idea, I was thinking that plugins could be in Python. I'm actually against that idea now for a few reasons. One reason is that it is more work to translate between languages. Another is that it forces an extra dependency. And another is that python has quite a big overhead.
But go-plugin looks promising. Technically, the plugin doesn't even have to be written in golang, it could be written in any language. The nice thing about it though is that there are no extra dependencies needed. And everything the plugin would want to use are already available in a module.
So this case is to research into and implement go-plugin or something similar. Plugins should be contained in a folder and the name of the file would be the algorithm name referenced in .concards-meta.
I like this idea. It's pretty solid now. And super lightweight.
Once I hit 80%, it will be pretty simple to keep the coverage high because of the coverall pull merge check.
Related to #25. Read vim's documentation :help ---
. The single dash should
mean <STDIN>
. The double dash should separate options from files. If a single
dash is after a double dash, that single dash is interpreted as a file. The
single dash is normally implied if <STDIN>
is not a tty. Vim has a read
script file mode too, you can pass a dash to that. Concards doesn't have
anything like that though, so it's safe to ignore.
Numbers are stored in some files. Some of those numbers should be unsigned (the yes and no count).
Right now, unit tests for the "core" module are counted. I need to make sure the other modules are incorporated into this as well.
The "@" signs that separate sides of a cards should be changed to pipes.
The undo logic doesn't actually relate to the GUI, so it should be moved out of that module & into a new one. I need to add tests for it too.
With the current implementation on master, streaks cannot be exceed their respective yes count or no count, but that doesn't mean that there cannot be impossible values. This example is impossible to actually be generated by concards.
yes count: 3
no count: 2
streak: 2
The best a history of changes can do is this, the paranthesis represent the streak:
no (-1), no (-2), yes (0), yes (1), yes (2)
This may involve rethinking algorithms a little bit. I wonder if the leitner system could be added as a card algorithm strategy with this in mind too.
With the new refactor, the -n
argument is index based. This is a bit misleading. I expect it to be review then memorize then done.
I had some todos in the readme file. I'm deleting them out of that file and putting them here instead:
- TODO: Implement the [leitner system](https://en.wikipedia.org/wiki/Leitner_system)
- TODO: Rework the terminal GUI.
- DONE: Add file name to the GUI.
- TODO: Enable CTRL-L (reloads the display).
- TODO: Add ability to change algorithm in GUI.
- TODO: Create a web flashcard front-end too.
- TODO: Create a man page.
- TODO: Create my own version of arg parse.
Once I've made cases of some sort for each of those, then I can close this case.
Relates to #21. Basically, just have to be able to escape concards core symbols, not escaping anything else:
\| -> |
\: -> :
\@> -> @>
\<@ -> <@
And the backslashes can stack at the front:
\\| -> \|
\\: -> \:
\\@> -> \@>
\\<@ -> \<@
\\\| -> \\|
\\\: -> \\:
\\\@> -> \\@>
\\\<@ -> \\<@
\\\\| -> \\\|
\\\\: -> \\\:
\\\\@> -> \\\@>
\\\\<@ -> \\\<@
...
So every possible word/character can be represented in concards, ignoring
whitespace.
I just had an idea for what ignoring characters/symbols/words might look like.
In your file, you could have something like this:
#: #IGNORE | - _ ``` ```java :#
What I'm trying to demonstrate in this example is that the "question" #IGNORE
will ignore all those characters for any card that comes later in the file.
This could be useful if your cards are in a file format that needs a character
on every line (like #
in bash, or >
in markdown).
This is by no means a complete idea, I still need to put more thought into it.
It might be useful to have this option. I'll contemplate it more in this case.
Currently concards parses files by word. I want it to parse by character now, because that makes the syntax more embeddable. This is a prerequisite to adding cloze syntax. (#43)
AnswerCategory doesn't address if the streak is zero very well. I also got the sm2 algorithm to look nicer without answer category.
There should be a standard error message for panics. Panics would only happen with logic errors that unit tests should have covered. The error message should describe to make a case on github.
I'm at like a D now. I need to make that better.
Right now, if I edit a card, the meta data will reset. I did this because I can't guarantee that that card will editted, or maybe another one will be edited/created. Unfortunately, this makes me not want to edit cards as much. A sane default is to make all cards that are created have the same algorithm as the card that was currently being editted.
The cards are guaranteed to be in the same file, so they will be in some way related. The worst that could happen is that a card you knew really well was editted and set back to the algorithm of the current card. But since the two cards are related, they should still reinforce your learning. This will make me want to constantly improve my cards too.
I already merged those changes to master, so the readme should probably be up to date with my changes.
Both the card and the meta objects use a hash. This logic should be consolidated into one place.
When you have "sides" to a flashcard, normally, you only have two sides. The colon ":" syntax allows the parent to be reversed to the front side. Right now there can be one front side and multiple back sides, but what if there were multiple "front" sides? There would need to be some sort of syntax improvement for this.
Design how logging would look like in Concards. And implement it here.
The argparse project I'm using had test coverage, I think that is cool, so I want it too. This is the one that had it: https://github.com/akamensky/argparse.
When editing a card with your editor, it should be a bit smarter on how to
decide which hashes get which which meta data. Right now it only maps one
card's meta data to all cards, but if it could be a bit smarter and do this
with more cards, that would be better. A todo around here to decide the
specific strategy I should use.
This was just an idea. What if cards could have markdown-style links. Like:
[A Website](http:/ddg.gg)
The "A Website" part would contribute towards the hash, but the actual link
would not be counted towards the hash. I'd have to think about it more before I
consider this.
Maybe I could also consider links to local files too (like audio or images for
more interactive cards).
Right now a concard might look like this:
@> 你好 : hi @> 你 | you <@
.
After this case, it will look like this:
:> 你好 :: hi :> 你 | you <:
.
No spaces:
:>你好::hi:>你|you<:
.
This new syntax is easier on the eyes and has less collisions with common
characters. The :: will make it so a user doesn't have to backslash colons all
the time. And removing the @ makes concards dependent on one less character.
#42 and #43 will expand on this newly changed syntax.
Luckily, this syntax change doesn't affect the meta data file too.
In the long run, machine learning is a goal in with this flashcard program. I thought about what features might be useful and the best label to train on.
I decided that the best model I could make would be one that takes in lots of anonymous flashcard statistics, and predicts whether the user will say yes or no. This information could then be used to, say, make a list of all the flashcards that the user will get incorrect, and have the user review them. Or maybe the next review date could change based on the current algorithm, but changed if the ML concards model says the answer will be incorrect (that might be more difficult though).
Here are the anonymous features that I thought of that could be useful, I'll add to this list if I think of more ideas:
Timestamp card is reviewed at | 2020-06-22T02:21:48-06:00
Amount of time since last answer | Days
Timestamp of last answer | 2020-06-20T03:52:31-06:00
Was the last answer a yes or no | 0 or 1
Current streak | Any integer
Total number of "No"s for card | Any natural number
Total number of "Yes" for card | Any natural number
Using that data, I would want to predict a yes or a no.
This might be a bit tricky. Most editors have some sort of way to handle jumping to a specific line, but the current file parsing isn't taking into account line numbers. And the way this is implemented must be a way that is editor agnostic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.