yasuki_core.install.yaml_to_sql.build_revisions#
- build_revisions(original_text, errata)[source]#
Build a card’s ordered revision list from its original rules text and its errata entries.
Each errata entry is a dict with
dateandtext, optionallysource,source_url,artandset_slug(which resolve the revision’s image path),notes, and any integer stat overrides keyed by stat column. Revision 0 is the original text; errata follow sorted by effective date, so the last element is the current version.- Parameters:
- Returns:
- revisions
listofCardRevision Revisions ordered oldest to newest, with the original at index 0.
- revisions
- Raises:
ValueErrorIf an errata entry has a missing or unparseable
date. Unlike an original printing, an erratum without a datable effective date is a data error, not a legitimate null.