def parse_update_optional_args(parser):
# just for updating lots
parser.add_argument('--limit', "-l", nargs="?", type=int, help="how many jobs to do")
parser.add_argument('--chunk', "-ch", nargs="?", default=10, type=int, help="how many to take off db at once")
parser.add_argument('--after', nargs="?", type=str, help="minimum id or id start, ie 0000-0001")
parser.add_argument('--rq', action="store_true", default=False, help="do jobs in this thread")
parser.add_argument('--order', action="store_true", default=True, help="order them")
parser.add_argument('--append', action="store_true", default=False, help="append, dont' clear queue")
parser.add_argument('--name', nargs="?", type=str, help="name for the thread")
# just for updating one
parser.add_argument('--id', nargs="?", type=str, help="id of the one thing you want to update")
parser.add_argument('--doi', nargs="?", type=str, help="doi of the one thing you want to update")
# parse and run
parsed_args = parser.parse_args()
return parsed_args
评论列表
文章目录