support lists of doabids

pull/91/head
eric 2018-06-19 10:42:02 -04:00
parent 604260363f
commit d8171088a6
1 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,10 @@ from regluit.core.loaders import doab
class Command(BaseCommand):
help = "load doab books by doab_id via oai"
args = "<doab_id>"
def handle(self, doab_id, **options):
def add_arguments(self, parser):
parser.add_argument('doab_ids', nargs='+', type=int, default=1, help="doab ids to add")
def handle(self, doab_ids, **options):
for doab_id in doab_ids:
doab.add_by_doab(doab_id)