lucastan/uva-node — pull request #7 by SuprDewd (2013-05-09 20:35:51+00:00)
Title: Automatically determine problem # on send, if none is specified

When a user uses the send command, most of the time he has to write the id of the problem he is submitting twice, once in the problem id field, and once in the filename. For example:

$ node index.js
> send 123 problem-123.cpp
...

Most of the time, this is redundant, since the problem id can be inferred from the filename. Thus, uva-node should allow the user to drop the problem id, and then extract it automatically from the filename (as long as there is a number in the filename). For example:

$ node index.js
> send problem-123.cpp
No problem id specified, guessing 123
... // submit problem 123

When the filename consists of multiple numbers, the first one should be used. This is so that users can have different solutions to the same problem, like problem-123-version-1.cpp and problem-123-version-2.cpp .