diff --git a/mayan/apps/importer/management/commands/import.py b/mayan/apps/importer/management/commands/import.py index 3ae3ca0813..ba355444aa 100644 --- a/mayan/apps/importer/management/commands/import.py +++ b/mayan/apps/importer/management/commands/import.py @@ -7,18 +7,34 @@ from django.apps import apps from django.core import management from django.core.files import File -from mayan.apps.documents.tasks import task_upload_new_document +from ...tasks import task_upload_new_document class Command(management.BaseCommand): help = 'Import documents from a CSV file.' def add_arguments(self, parser): - #parser.add_argument( - # '-l', '--link', - # action='store_true', dest='link', default=False, - # help='Create a symbolic link to each file instead of copying.', - #) + parser.add_argument( + '--document_type_column', + action='store', dest='document_type_column', default=0, + help='Column that contains the document type labels. Column ' + 'numbers start at 0.', + type=int + ) + parser.add_argument( + '--document_path_column', + action='store', dest='document_path_column', default=1, + help='Column that contains the path to the document files. Column ' + 'numbers start at 0.', + type=int + ) + parser.add_argument( + '--metadata_pairs_column', + action='store', dest='metadata_pairs_column', + help='Column that contains metadata name and values for the ' + 'documents. Use the form: