pickaxe - Uses given paths to generate a test from *.txt files
pickaxe [options] path [, path ...]
drill [options] path [, path ...]
Pickaxe provides a simple way to load, solve and rate tests (bundle of questions) written in simple text format.
pickaxe loads any text file given as command line argument,
and searches for any txt files when given path is a directory.
Answering the questions is simple and straightforward -- simply write Your answer and press [ENTER] or [TAB] key.
pickaxe provides bunch of commands during the test. Type
? and hit
At the end of the test,
pickaxe saves given answers to
answers.log, thus it
is vital to either finish whole test or quit
pickaxe with Control-D or
Control-C. Incorrect answers will be marked by
!. Example of a log file:
123: a b !456: c d e 12: a b !34: c d e
Turn on shell clearing before question
Turn off colors
Show pickaxe version and exit
Show help and exit
Select certain number of questions. Useful for generating small random test sessions.
Generate test in a way that all questions have only one correct answer.
NOTE: questions in input files should not contains answers that states
that all other answers are incorrect, because this invalidates the
algorithm (except tests in Polish language due to special hack; see code
for more details).
Repeat questions answered incorrectly. This option has no effect when used
--single option. When this option is used, the
logfile will not be generated at the end of the session and only time will
be listed in statistics (since it forces all questions to be answered
Do not reveal correct answers until the end of test
Stop shuffling the questions
Stop shuffling the answers
Change the extension for files loaded automatically from directories (default is txt)
Quit after first syntax error in test file
Check syntax only - do not run test. Makes
Load all tests from current directory:
$ pickaxe .
Create a small test (30 question) from some files and directory and emulate the exam:
$ pickaxe file1.txt file2.tst directory --select=30 --full-test
Tests (bundle of
questions) that load
pickaxe are stored in text file with
Questions are separated by one or more blank lines. Each question
has two parts:
content is defined by lines until the first
answer leading line.
First line of a content must starts with a number (question index) followed by
. (dot). Regular expression for questions are defined as follows:
Question index should be unique because it is used in
Duplicated question index may be confusing for someone reading the log.
Answers are defined by remaining lines. Answer may span across many lines until
answers leading line is found.
Answer leading line starts with
(index) and optional
>> which denotes the
answer is correct. Answer index is simply a letter indicating that answer.
Regular expression for leading lines is defines as follows:
Addidional answer lines must match following regular expression (simple should start with a letter preceded by optional whitespaces):
If answer or question spans across lines, additional lines will be joined with
a white space. If You would like to break line in particular place, write
123. What kind of error You appears in this piece of C++ code: \n goto label; \n Person* person = new Person(); \n label: // ... a) syntactical >> b) semantical c) lexical d) there is no error
Lines that start with
; are skipped (but does not treated as
Example test file:
// C-like comments are allowed 1. To be or not to be? That is also the question (content). (a) To be. (b) Not to be. >> (c) I do not know. # Ruby-like comments are also allowed 1 Number listed here is recommended to be unique (note the dot is optional) (a) To be. (b) Not to be that is still answer b) and the number of whitespaces does not matter >> (c) I do not know.
It is possible to run
pickaxe on Windows, but dynamic console width detection,
colors and diacritics (text is transliterated) and some other stuff is not
available. You have been warned.
You can grab source code with git by typing:
git clone git://github.com/dejw/pickaxe
Please create an issue when You found a bug. Thanks!
detach, finger, fryta, Nnidyu, pliber, sm00f, quermit