RocHack / bb

Command line Blackboard client
MIT License
72 stars 8 forks source link

Refactor/split into multiple files #17

Open clehner opened 9 years ago

clehner commented 9 years ago

As the script is now >1000 lines and embracing several areas of functionality, @jeremywrnr and I were discussing splitting it into separate files. We propose keeping core functions (like get courses) and command line argument parsing in bb while making one file for each command (except commands where there is significant overlap).

This could be done in such a way that only the scripts which need to be executed are sourced. e.g.

case "$cmd" in
...
bill) source $BB_PATH/quikpay; bb_bill $@;;
...
jthurst3 commented 9 years ago

I was going to suggest the same thing. Sounds like a great idea to me.

jeremywrnr commented 9 years ago

import.sh repo here is interesting and may be useful for dealing with this issue.