Created
September 15, 2009 19:49
-
-
Save powdahound/187573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
from couchdbkit import Server | |
from couchdbkit.loaders import FileSystemDocsLoader | |
server = Server() | |
cwd = os.getcwd() | |
for node in os.listdir(cwd): | |
if not os.path.isdir(node): | |
continue | |
db_name = node | |
print "Syncing %s..." % db_name, | |
db = server.get_or_create_db(db_name) | |
loader = FileSystemDocsLoader('%s/%s/_design' % (cwd, db_name)) | |
loader.sync(db, verbose=True) | |
print "ok" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment