handle multiple Google Docs
This commit is contained in:
parent
866b0b6348
commit
73b7faddd4
1 changed files with 8 additions and 3 deletions
|
@ -72,8 +72,13 @@ for label in labels:
|
||||||
updated = datetime.strptime(item['updated_at'], "%Y-%m-%dT%XZ")
|
updated = datetime.strptime(item['updated_at'], "%Y-%m-%dT%XZ")
|
||||||
text_file.write(" - " + updated.strftime('%Y-%m-%d') + "\n")
|
text_file.write(" - " + updated.strftime('%Y-%m-%d') + "\n")
|
||||||
maindoc = re.search('^Documentation: (.+?)\n', str(item['body']))
|
maindoc = re.search('^Documentation: (.+?)\n', str(item['body']))
|
||||||
if maindoc is not None: maindoc = maindoc.group(1)
|
if maindoc is not None:
|
||||||
text_file.write(" - " + str(maindoc) + "\n")
|
maindoc = maindoc.group(1)
|
||||||
|
doc_list_formatted = ["`" + str(item['number']) + "-" + str(i) + " <" + x.strip() + ">`_" for i, x in enumerate(maindoc.split(','),1)]
|
||||||
|
text_file.write(" - " + ', '.join(doc_list_formatted))
|
||||||
|
else:
|
||||||
|
text_file.write(" - ")
|
||||||
|
text_file.write("\n")
|
||||||
author = re.search('^Author: (.+?)\n', str(item['body']), flags=re.MULTILINE)
|
author = re.search('^Author: (.+?)\n', str(item['body']), flags=re.MULTILINE)
|
||||||
if author is not None: author = author.group(1)
|
if author is not None: author = author.group(1)
|
||||||
#if author is None: author = item['user']['login']
|
#if author is None: author = item['user']['login']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue