diff --git a/docs_rst/filepad_tasks.rst b/docs_rst/filepad_tasks.rst index 849fa4ba1..0d09e5cad 100644 --- a/docs_rst/filepad_tasks.rst +++ b/docs_rst/filepad_tasks.rst @@ -13,11 +13,11 @@ Required parameters ------------------- * paths ([str]): list of paths to files to be added -* labels ([str]): list of labels, one for each file in the paths list. Optional parameters ------------------- +* identifiers ([str]): list of identifiers, one for each file in the paths list. * filepad_file (str): path to the filepad db config file * compress (bool): whether or not to compress the file before inserting to gridfs * metadata (dict): metadata to store along with the file, stored in 'metadata' key @@ -31,7 +31,7 @@ them to the given destination directory. Required parameters ------------------- -* labels ([str]): list of labels, one for each file in the paths list. +* identifiers ([str]): list of identifiers, one for each file in the paths list. Optional parameters ------------------- @@ -48,7 +48,7 @@ The *DeleteFilesTask* lets you delete one or more files from the filepad. Required parameters ------------------- -* labels: ([str]) file labels to delete +* identifiers: ([str]) file identifiers to delete Optional parameters ------------------- diff --git a/docs_rst/filepad_tutorial.rst b/docs_rst/filepad_tutorial.rst index 6a23f8317..eb2c74bbb 100644 --- a/docs_rst/filepad_tutorial.rst +++ b/docs_rst/filepad_tutorial.rst @@ -5,9 +5,9 @@ Using FilePad for storing and retrieving files FilePad utility provides the api to add and delete arbitrary files of arbitray sizes to MongoDB(filepad). The is achieved by inserting the entire file contents to GridFS and storing the id returned by the -GridFS insertion, the user provided label and the metadata in a document in the filepad. In the following +GridFS insertion, the user provided identifier and the metadata in a document in the filepad. In the following documentation, ``file contents`` refers to the file contents stored in GridFS and ``document`` refers to the -associated mongodb document that stores the ``file_id``, ``label`` and other miscellaneous information +associated mongodb document that stores the ``file_id``, ``identifier`` and other miscellaneous information pertaining to the file. Adding files @@ -15,30 +15,37 @@ Adding files Create a FilePad object:: - fp = FilePad.auto_load() + fp = FilePad.from_db_file() + +or: + + fp = FilePad.auto_load() # if you have your configuration file paths set up for automatic loading + +The db file needs to contain ``username`` and ``password`` keys. You should be able to reuse your existing ``my_launchpad.yaml`` file for this purpose. To add a file:: - file_id, label = fp.add(,