Skip to content

Commit 0c49999

Browse files
committed
Updated utils/draft.py and modified the submit app code accordingly.
New features (keep in mind that utils/draft.py can be run standalone to do extraction of draft author data, too): * The handling of author info formatted in columns causes problems in the face of an author named for instance A. Author with the company 'Al Author and Associates', causing breakage of email addresses longer than 'Al Author and'. Tweaked the recognition of column data to require multiple (not only one) space around 'and'. * Added support for extraction of author affiliation. * Tweaked the meaning of -t, --timestamp and added --notimestamp; and made the default be to emit leading timestamps based ont the draft file time. * Added support for running author extraction on RFCs, by not bailing out on not finding a draft name when RFC information is available. * Added support for additional date formats and author name formats. * Improved creation date extraction -- previously, the first supported date format which was recognized on the first page of the draft would be used, rather than the first date in a supported format. This could cause errors if the Status of Memo section or Abstract contained a date occurring at the start of a line. * Tweaked the honorific regex to make things work better for the case when the full name in the author's address section includes a first name which isn't part of the first-page abbreviated name. Fixes problems with draft-chiappa-lisp-introduction and similar. * Added a special case for people who provide their email address as 'foo&cisco.com' instead of 'foo@cisco.com'. Bah. * Added an alternative, more human-readable key-value-pair attribute output mode with a '-a' switch. * Tweaded the first-name regex to capture cases where the first name is indicated with an alternate first letter: 'Y(J) Stein'. Fixes problems with draft-anavi-tdmoip and similar. - Legacy-Id: 4612
1 parent cddec8f commit 0c49999

2 files changed

Lines changed: 278 additions & 73 deletions

File tree

ietf/submit/forms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def get_draft(self):
200200
return self.draft
201201
txt_file = self.cleaned_data['txt']
202202
txt_file.seek(0)
203-
self.draft = Draft(txt_file.read())
203+
self.draft = Draft(txt_file.read(), txt_file.name)
204204
txt_file.seek(0)
205205
return self.draft
206206

@@ -274,8 +274,8 @@ def save_draft_info(self, draft):
274274
file_type=','.join(self.file_type),
275275
)
276276
order = 0
277-
for author in draft.get_author_info():
278-
full_name, first_name, middle_initial, last_name, name_suffix, email = author
277+
for author in draft.get_author_list():
278+
full_name, first_name, middle_initial, last_name, name_suffix, email, company = author
279279
order += 1
280280
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
281281
# save full name

0 commit comments

Comments
 (0)