Changeset 170:6c2a4d2df4b8
- Timestamp:
- 01/11/09 11:48:48 (20 months ago)
- Author:
- rgrp
- Branch:
- default
- convert_revision:
- svn:0ead1229-0713-0410-96cd-f668dbfad531/trunk@248
- Message:
-
[all,cli][xs]: rename load.py in shksprdata/miltondata to cli.py.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r161
|
r170
|
|
| 78 | 78 | # Commands |
| 79 | 79 | |
| 80 | | db_actions = [ 'create', 'clean', 'init_shksprdata', 'init_miltondata' ] |
| | 80 | db_actions = [ 'clean', 'create', 'rebuild', 'init_shksprdata', 'init_miltondata' ] |
| 81 | 81 | def do_db(self, line=None): |
| 82 | 82 | if line is None or line not in self.db_actions: |
| … |
… |
|
| 87 | 87 | import shakespeare |
| 88 | 88 | if line == 'clean': |
| 89 | | config = shakespeare.conf() |
| 90 | 89 | model.metadata.drop_all() |
| 91 | 90 | elif line == 'create': |
| 92 | 91 | model.metadata.create_all() |
| | 92 | elif line == 'rebuild': |
| | 93 | model.metadata.drop_all() |
| | 94 | model.metadata.create_all() |
| 93 | 95 | elif line.startswith('init_'): |
| 94 | 96 | modname = line.strip()[5:] |
| 95 | | mod = __import__(modname+'.load', fromlist='load') |
| | 97 | mod = __import__(modname+'.cli', fromlist='cli') |
| 96 | 98 | mod.LoadTexts.load_texts() |
| 97 | 99 | else: |