diff options
author | wookey <devnull@localhost> | 2013-06-24 01:31:14 +0100 |
---|---|---|
committer | wookey <devnull@localhost> | 2013-06-24 01:31:14 +0100 |
commit | 261ff3cdae57d96fe4f558bd38469af993a48e50 (patch) | |
tree | c7c7974d523367f143389f4bc85cde24c7cf7608 | |
parent | 511c379fe09f99d9b54b175f0355f6cc3cf092c2 (diff) | |
download | troggle-261ff3cdae57d96fe4f558bd38469af993a48e50.tar.gz troggle-261ff3cdae57d96fe4f558bd38469af993a48e50.tar.bz2 troggle-261ff3cdae57d96fe4f558bd38469af993a48e50.zip |
Add help command and usage info to databaseReset.py
-rw-r--r-- | databaseReset.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/databaseReset.py b/databaseReset.py index eb021d0..9ba336c 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -161,7 +161,23 @@ def writeCaves(): cave.writeDataFile() for entrance in Entrance.objects.all(): entrance.writeDataFile() - + +def usage(): + print """Usage is 'python databaseReset.py <command>' + where command is: + reset - this is normal usage, clear database and reread everything + desc + logbooks - read in the logbooks + autologbooks + dumplogbooks + QMs - read in the QM files + resetend + scans - reaq in the scanned surveynotes + survex - read in the survex files + survexpos + tunnel - read in the Tunnel files + writeCaves + """ if __name__ == "__main__": import core.models @@ -207,8 +223,11 @@ if __name__ == "__main__": dumplogbooks() elif "writeCaves" in sys.argv: writeCaves() + elif "help" in sys.argv: + usage() else: - print "Do 'python databaseReset.py reset'" + print "%s not recognised" % sys.argv + usage() |