diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-01-17 11:06:14 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-01-17 11:06:14 -0500 |
commit | 421f7d82d8a5f364f9e5e20e7435b83664e4746b (patch) | |
tree | 9b59c30b531ba9504845f19dc1173ea816f6f5f2 | |
parent | 2aeacffbcbc820c966143608fe5eae253ae7f124 (diff) | |
download | GradeBook-421f7d82d8a5f364f9e5e20e7435b83664e4746b.tar.gz GradeBook-421f7d82d8a5f364f9e5e20e7435b83664e4746b.zip |
added usage section for csv2GradeBook.tcl
-rwxr-xr-x | csv2GradeBook.tcl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/csv2GradeBook.tcl b/csv2GradeBook.tcl index c880fad..7c52ee6 100755 --- a/csv2GradeBook.tcl +++ b/csv2GradeBook.tcl @@ -7,6 +7,18 @@ package require sqlite3 package require md5 source ./GradeBook_lib.tcl +if { $argc < 2 } { + puts {Usage:} + puts " $argv0 database_name file_with_csv" + puts {} + puts { expect the csv file with following fields:} + puts { sid, FName, LName, Section, email} + puts {} + puts {Example:} + puts [concat " $argv0" { 2013_Spring_Phys742 roster.csv}] + exit +} + set class [lindex $argv 0] if { $class eq "" } { set class dummy_class @@ -43,8 +55,6 @@ proc AddUserNonWeb { first_name last_name user_name {group_name {guest}} {id_num #AddUserNonWeb first_name last_name user_name password_hash group_name id_number section_num i # dummy users -# expect the csv file with following fields -# sid, FName, LName, Section, email set fp [open $csvfile r] while {-1 != [gets $fp line]} { |