rr- / drill Goto Github PK
View Code? Open in Web Editor NEWA CLI program for learning things through spaced repetition. :dog:
License: MIT License
A CLI program for learning things through spaced repetition. :dog:
License: MIT License
color
is an optional param
$ drill-srs add-tag
usage: drill-srs add-tag [-h] -n NAME
[-c {grey, blue, green, red, aqua, pink, yellow}]
[deck]
drill-srs add-tag: error: the following arguments are required: -n/--nam
But trying to add a tag without the param color
does not work (for me).
$ drill-srs add-tag -n git
[...]
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: tag.color
[SQL: INSERT INTO tag (deck_id, name, color) VALUES (?, ?, ?)]
[parameters: (1, 'git', None)]
(Background on this error at: http://sqlalche.me/e/gkpj)
Using color
in the command is fine
$ drill-srs add-tag -n git -c blue
To keep the color param optional it is probably best to provide a default on the insert statement.
There are a number of such warnings on my machine (python3.10, MacOS, sqlalchemy 1.4.26).
You can suppress them like so, or fix them.
https://github.com/willmcgugan/textual
Could make it a bit more fun!
Traceback (most recent call last):
File "/usr/local/bin/drill-srs", line 6, in
from drillsrs.main import main
File "/usr/local/lib/python2.7/site-packages/drillsrs/main.py", line 41
commands: List[cmd.CommandBase],
^
SyntaxError: invalid syntax
Seems like the create-card
command doesn't consider \n
in the question's input, but I'd very much like to have them.
i.e. create-card -q "foo\nbar"
should create a question with two lines. The review section should be updated as well with regards to this change.
I installed drill via pip and I get this error when I try to read how-to:
FileNotFoundError: [Errno 2] No such file or directory: '/home/sviatoslav/.local/venvs/drillsrs/lib/python3.6/site-packages/drillsrs/data/howto.txt'
You should probably add MANIFEST.in and check in howto.txt
there.
so something like
$ drill-srs add-card algos -q 'question' -a 'answer'
$ drill-srs add-card -q 'question' -a 'answer'
Okay, I added the card 'question' to the most recently used deck "deck".
$ drill-srs set-deck deck2
'deck2' is the current deck now.
$ drill-srs study
Studying 'deck2'.
15 cards to study. After seeing a card, hit enter.
@rr- thanks for the software, works pretty well. I went through the code, and I guess I still don't understand the rationale for the "learn" function. As is, I can go through the card once - checking its question and correct answer -- before I review it. Why? In other words, what is the role of "learn?"
More specifically, I am trying to fit drill-srs to the following use case:
Possible? Thanks again, great software.
@rr- although you explain how the program works you don't explain the rationale behind how it works
I think it took Wozniak many years to come up with SM2
Are you sure that the algorithm you implemented is the most optimal one? SM2 relies on multiple scores in a row.
For example with SM2 if you rank very high a card you ranked low before - it won't delay the next rep right off the bat.
I installed drill with pip install drillsrs
My first command was drill-srs --help
and I recieved some errors
[giovanni@giovanni ~]$ drill-srs --help
/home/giovanni/.local/lib/python3.10/site-packages/drillsrs/db.py:95: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
first_answer_date = sa.orm.column_property(
/home/giovanni/.local/lib/python3.10/site-packages/drillsrs/db.py:101: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
total_answer_count = sa.orm.column_property(
/home/giovanni/.local/lib/python3.10/site-packages/drillsrs/db.py:107: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
correct_answer_count = sa.orm.column_property(
/home/giovanni/.local/lib/python3.10/site-packages/drillsrs/db.py:114: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
incorrect_answer_count = sa.orm.column_property(
usage: drill-srs [-h]
{how-to, list-decks, create-deck, edit-deck, update-deck,
delete-deck, list-tags, add-tag, create-tag, edit-tag,
update-tag, delete-tag, list-cards, add-card, create-card,
edit-card, update-card, delete-card, study, learn, review,
stats, export, import} ...
Spaced repetition flashcard program for learning anything.
positional arguments:
how-to show a mini-tutorial how to use
list-decks print all decks
create-deck create a new deck
edit-deck (update-deck)
edit a single deck
delete-deck delete a whole deck
list-tags print all tags in a deck
add-tag (create-tag) add a new tag to a deck
edit-tag (update-tag) edit a single tag
delete-tag delete a tag from the deck
list-cards print all flashcards in a deck
add-card (create-card)
add a new flashcard to a deck
edit-card (update-card)
edit a single flashcard
delete-card delete a single flashcard
study (learn) begin a study session
review begin a review session
stats produce an HTML report about the chosen deck
export export a deck to a JSON file
import import a deck from a JSON file
options:
-h, --help show this help message and exit
After this I tried to create a deck and a card and the program seems work, ma every command drill-srs
I digit I receive the errors above.
I use Fedora 35.
This is the output of pip install drillsrs
:
Collecting drillsrs
Could not find a version that satisfies the requirement drillsrs (from versions: )
No matching distribution found for drillsrs
I was going to write something like your drill by myself, but you already did it, thank you.
what is the best way to generate decks automatically? is it anki compatible?(i don't care, i just need the format)
Currently, you have to wait at least one hour for reviewing a deck again.
Line 8 in 39913fd
I think it'd be cool to have a way to refresh or bypass that somehow.
This would specially useful for smaller decks.
e@e:~/Downloads$ /home/e/.local/bin/drill-srs
/home/e/.local/lib/python3.8/site-packages/drillsrs/db.py:95: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
there's a lot of these warnings.
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.