-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement more Anki-like behavior #9
Comments
@asakura42 This is what you need |
solution: diff --git a/src/lib.rs b/src/lib.rs
index ab9a3e9..c33d437 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -83,7 +83,7 @@ impl VocaSession {
args.push( Arg::with_name("returntofirst")
.long("returntofirst")
.short("-1")
- .help("When a card is demoted (e.g. answered incorrectly), demote it to the previous deck rather than the very first deck ")
+ .help("When a card is demoted (e.g. answered incorrectly), demote it to the very first deck rather than the previous deck")
);
args
}
@@ -112,7 +112,7 @@ impl VocaSession {
}
}
if args.is_present("returntofirst") {
- self.returntofirst = false;
+ self.returntofirst = true;
}
//sanity checks and defaults
@@ -155,7 +155,7 @@ impl Default for VocaSession {
columns: Vec::new(),
decks: Vec::new(),
intervals: Vec::new(),
- returntofirst: true,
+ returntofirst: false,
filename: None,
showcolumns: Vec::new(),
listdelimiter: None,
@@ -355,7 +355,7 @@ impl VocaData {
file.write(listdelimiter.as_bytes())?;
file.write(b"\n")?;
}
- if !self.session.returntofirst {
+ if self.session.returntofirst {
file.write(b"#--returntofirst\n")?;
}
if !self.session.columns.is_empty() {
@@ -596,3 +596,5 @@ pub fn load_files(files: Vec<&str>, force: bool, reset: bool) -> Vec<VocaData> {
datasets
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I use anki, simply and in terms of your program — 1 button is to move card to first deck (1 min. for example) and 2 button is to promote card to the next deck. How to adjust your program to work like that? Totally newbie in Rust tho
The text was updated successfully, but these errors were encountered: