handle multiple Google Docs

pull/977/head
Ben Parsons 7 years ago
parent 866b0b6348
commit 73b7faddd4

@ -72,8 +72,13 @@ for label in labels:
updated = datetime.strptime(item['updated_at'], "%Y-%m-%dT%XZ")
text_file.write(" - " + updated.strftime('%Y-%m-%d') + "\n")
maindoc = re.search('^Documentation: (.+?)\n', str(item['body']))
if maindoc is not None: maindoc = maindoc.group(1)
text_file.write(" - " + str(maindoc) + "\n")
if maindoc is not None:
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)
if author is not None: author = author.group(1)
#if author is None: author = item['user']['login']

Loading…
Cancel
Save