Commit 154b3929 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Added a download option for the bob_dbmanage. Issue #2

parent c3a136f8
......@@ -24,6 +24,16 @@ import os
import sys
from bob.db.base.driver import Interface as BaseInterface
def download_mnist(self):
# Hack that will download the mnist database
import pkg_resources
import bob.db.mnist
db_folder = pkg_resources.resource_filename(__name__, '') # Defining a folder for download
db = bob.db.mnist.Database(data_dir=db_folder) # Downloading
del db
class Interface(BaseInterface):
def name(self):
......@@ -42,4 +52,10 @@ class Interface(BaseInterface):
def add_commands(self, parser):
from . import __doc__ as docs
from bob.db.base.driver import download_command
subparsers = self.setup_parser(parser, "MNIST database", docs)
parser = download_command(subparsers)
parser.set_defaults(func=download_mnist)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment