|
Revision 318, 445 bytes
(checked in by zool, 3 years ago)
|
added namespaces; allowing local files to be passed to boot script.
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
# import stuff from boot.rdf into new store |
|---|
| 2 |
import rdfobj |
|---|
| 3 |
import bbox.config |
|---|
| 4 |
import os, sys |
|---|
| 5 |
sys.path.append('../') |
|---|
| 6 |
|
|---|
| 7 |
model = None |
|---|
| 8 |
|
|---|
| 9 |
opts = sys.argv |
|---|
| 10 |
|
|---|
| 11 |
store = opts[1] |
|---|
| 12 |
boot = None |
|---|
| 13 |
if len(opts) > 2: |
|---|
| 14 |
boot = 'file:'+opts[2] |
|---|
| 15 |
else: |
|---|
| 16 |
boot = bbox.config.boot |
|---|
| 17 |
print boot |
|---|
| 18 |
if store is not None: |
|---|
| 19 |
model = rdfobj.Model(store,db=1) |
|---|
| 20 |
else: |
|---|
| 21 |
os.chdir(bbox.config.store) |
|---|
| 22 |
model = rdfobj.Model(bbox.config.db,db=1) |
|---|
| 23 |
|
|---|
| 24 |
model.load(boot) |
|---|
| 25 |
model.model.sync() |
|---|