Initial commit
This commit is contained in:
commit
8bb3dc8fd6
1 changed files with 23 additions and 0 deletions
23
daily.py
Executable file
23
daily.py
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import json
|
||||||
|
import requests
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||||
|
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||||
|
|
||||||
|
date = time.localtime()
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
date = subprocess.check_output(['date','-d',sys.argv[1],'+%s'])
|
||||||
|
date = float(date)
|
||||||
|
date = time.localtime(date)
|
||||||
|
|
||||||
|
date = time.strftime(r'%Y-%m-%d', date)
|
||||||
|
|
||||||
|
url_template = 'https://jira.bloopark.com/rest/tempo-timesheets/3/worklogs?projectKey=PAS&dateFrom={}&dateTo={}&expand=issue.status'
|
||||||
|
|
||||||
|
resp = requests.get(url_template.format(date, date), verify=False)
|
||||||
|
print(json.dumps(resp.json()))
|
Loading…
Reference in a new issue