diff --git a/api/client/apiclient.py b/api/client/apiclient.py index 526795e..95e7af9 100644 --- a/api/client/apiclient.py +++ b/api/client/apiclient.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + ''' API client for bocal-site ''' import json @@ -91,7 +93,11 @@ def cmd(func): @cmd def cmd_publish(token, args): - publish_date = date.today() if not args.date else args.date + if not args.date: + publish_date = date.today() + else: + year, month, day = [int(x) for x in args.date.strip().split('-')] + publish_date = date(year=year, month=month, day=day) (ret_code, ret_str) = publish(args.host, token, args.numero,