alopezlago / YetAnotherPacketParser

A parser to convert quiz bowl packets to different file formats
Other
8 stars 0 forks source link

Try to parse category/author metadata #31

Closed alopezlago closed 2 years ago

alopezlago commented 2 years ago

YAPP should try to parse category/author metadata after questions. The formats most commonly seen are <Author, Category> or <Category, Author>

Ophir's formatting guide prefers the first one. We could take the following options

hftf commented 2 years ago

The rationale for preferring the former is that author patterns are more predictable and contain fewer special characters that might be matched or split on for parsing (e.g. commas), and simpler/shorter thus easier to skim (your eyes can reliably look 1 cm from the left for the category and 0 cm for author initials).

alopezlago commented 2 years ago

That's fair, although the challenge for YAPP is that it should be able to parse most docx packets (within reason), and since there's no standard format categories can appear in both. The safest option is probably the first: just output it as something like postQuestionMetadata in JSON or recreate it in HTML, and let hosts figure out how the metadata is structured.