-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create JSON spec for section parsing
- Loading branch information
Justin Campbell
committed
Sep 14, 2020
1 parent
bf67aa7
commit 099ebdf
Showing
1 changed file
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
[ | ||
{ | ||
"type": "directoryInformation", | ||
|
||
// An array of lines with non-printable characters. | ||
// Example from aae 1 | ||
"content": [ | ||
"\n", | ||
"\tName: Jerry L Guerrero\n", | ||
" Login: jerry\n", | ||
" Computer: x-ee27å0bpc1 (128.46.164.29)\n", | ||
" Location: EE 270B\n", | ||
" Email: jerry@purdue.edu\n", | ||
" Phone: \n", | ||
" Office: \n", | ||
" UNIX Dir: /home/pier/c/jerry\n", | ||
" Zero Dir: U=\\\\pier.ecn.purdue.edu\\jerry\n", | ||
" User ECNDB: http://eng.purdue.edu/jump/bcafa8\n", | ||
" Host ECNDB: http://eng.purdue.edu/jump/2dbd461 \n", | ||
" Subject: Win7 to Win10 Migration List - kevin\n" | ||
] | ||
}, | ||
|
||
{ | ||
"type": "initialMessage", | ||
|
||
// RFC 8061 formatted date string | ||
// Maps to Item.dateReceived | ||
"date": "2020-09-11", | ||
|
||
// RFC 8061 formatted time string | ||
// Maps to Item.dateReceived | ||
"time": "01:26:45+00:00", | ||
|
||
// String of user's real name. Could be blank | ||
// Maps to Item.userName | ||
"userName": "Justin Campbell", | ||
|
||
// String of user's email | ||
// Maps to Item.userEmail | ||
"userEmail": "campb303@purdue.edu", | ||
|
||
// Array of dictionaries of names and emails for cc'd recipients. Could be blank, could have multiple addresses, names could be blank | ||
// Comes from headers | ||
// See: https://docs.python.org/3/library/email.utils.html#email.utils.parseaddr for parsing this field | ||
"ccRecipients": [ | ||
{ | ||
"name": "John Doe", | ||
"email": "johndoe@example.com" | ||
}, | ||
{ | ||
"name": "", | ||
"email": "janesmith@example.com" | ||
} | ||
], | ||
|
||
// An array of lines with non-printable characters. | ||
"content": [ | ||
"I need some help with something.\n" | ||
] | ||
}, | ||
|
||
{ | ||
"type": "edit", | ||
|
||
// Career account alias for ECN user who added edit | ||
// Appears after the first colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 *** | ||
// (Start) ^ ^ (End) | ||
"by": "knewell", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears after the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 *** | ||
// (Start) ^ ^ (End) | ||
"date": "2020-04-22T16:39:51", | ||
|
||
// RFC 8061 formatted time string | ||
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Edited by: knewell at: 04/22/20 16:39:51 *** | ||
// (Start) ^ ^ (End) | ||
"time": "16:39:51", | ||
|
||
// An array of lines with non-printable characters. | ||
"content": [ | ||
"This is related to another item. I need to do X next.\n" | ||
] | ||
}, | ||
|
||
{ | ||
"type": "status", | ||
|
||
// Career account alias for ECN user who added edit | ||
// Appears after the first colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 *** | ||
// (Start) ^ ^ (End) | ||
"by": "knewell", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears after the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 *** | ||
// (Start) ^ ^ (End) | ||
"date": "2020-04-23T10:35:47", | ||
|
||
// RFC 8061 formatted time string | ||
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Status updated by: knewell at: 4/23/2020 10:35:47 *** | ||
// (Start) ^ ^ (End) | ||
"time": "10:35:47", | ||
|
||
// An array of lines with non-printable characters. | ||
"content": [ | ||
"Doing X thing." | ||
] | ||
}, | ||
|
||
{ | ||
"type": "assign", | ||
|
||
// Career account alias for ECN user changed the assignment | ||
// Appears in the item headers and the most recent entry can be accessed by: | ||
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-By") | ||
"by": "campb303", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears in the item headers and the most recent entry can be accessed by: | ||
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-Time") | ||
"date": "2020-06-23T13:27:00", | ||
|
||
// RFC 8061 formatted time string | ||
// Appears in the item headers and the most recent entry can be accessed by: | ||
// >>> self.__getMostRecentHeaderByType("Assigned-To-Updated-Time") | ||
"time": "13:27:00", | ||
|
||
// Career account alias for ECN user the item was assigned to | ||
// Appears in the item headers and the most recent entry can be accessed by: | ||
// >>> self.__getMostRecentHeaderByType("Assigned-To") | ||
"to": "campb303", | ||
}, | ||
|
||
{ | ||
"type": "replyFromECN", | ||
|
||
// Career account alias for ECN user who added edit | ||
// Appears after the first colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 *** | ||
// (Start) ^ ^ (End) | ||
"by": "ewhile", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears after the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 *** | ||
// (Start) ^ ^ (End) | ||
"date": "2020-05-08", | ||
|
||
// RFC 8061 formatted time string | ||
// Appears after the first space following the second colon followed by a space `: ` in the delimiter string | ||
// Ends just before the next space | ||
// Ex: *** Replied by: ewhile at: 05/08/20 09:21:43 *** | ||
// (Start) ^ ^ (End) | ||
"time": "09:21:43", | ||
}, | ||
|
||
{ | ||
"type": "replyFromUser", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears in the headers of a merged message | ||
// Might be possible to create submessage and parse the headers using the email library | ||
"date": "2020-05-08", | ||
|
||
// RFC 8061 formatted date string | ||
// Appears in the headers of a merged message | ||
// Might be possible to create submessage and parse the headers using the email library | ||
"time": "13:57:18+00:00", | ||
|
||
// String of user's real name. Could be blank | ||
// Maps to Item.userName | ||
"userName": "Reckowsky, Michael J.", | ||
|
||
// String of user's email | ||
// Maps to Item.userEmail | ||
"userEmail": "mreckowsky@purdue.edu", | ||
|
||
// Array of dictionaries of names and emails for cc'd recipients. Could be blank, could have multiple addresses, names could be blank | ||
// Comes from headers | ||
// See: https://docs.python.org/3/library/email.utils.html#email.utils.parseaddr for parsing this field | ||
"ccRecipients": [], | ||
|
||
// An array of lines with non-printable characters. | ||
"content": [ | ||
"Ethan,\n", | ||
"\n", | ||
"Biltong beef ribs doner chuck, pork chop jowl salami cow filet mignon pork.\n", | ||
"\n", | ||
"Mike\n", | ||
] | ||
}, | ||
] |