def alert(pr):
aset = pr.subparser('set')
aset.add_argument(
'date',
type=arrow.get,
nargs='?',
help="""Date in YYYY-MM-DD format.""")
aset.add_argument(
'span',
re='(\d+[dhm])+',
help="""Time to wait before the alert, for example 2d3h4m.""")
aset.exclusive('date', 'span', required=True)
aset.add_argument(
'message',
nargs='+',
action='join',
help="""Alert text.""")
###########################################################################
pr.subparser('echo')
评论列表
文章目录