Skip to content

Commit

Permalink
Update elpa parser
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Oct 4, 2024
1 parent c2a8b80 commit d15cb00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repology/parsers/parsers/elpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def _parse_data(data: str) -> list[_PackageData]:
keyval_maintainers_multi = (lpar + Suppress(':maintainers') + OneOrMore(lpar + people_list + rpar) + rpar).setParseAction(lambda s, l, t: [('maintainers_multi', [str(m) for m in t])])
keyval_author = (lpar + Suppress(':author') + people_list + rpar).setParseAction(lambda s, l, t: [('author', [str(a) for a in t])])
keyval_authors = (lpar + Suppress(':authors') + OneOrMore(lpar + people_list + rpar) + rpar).setParseAction(lambda s, l, t: [('authors', [str(a) for a in t])])
keyval_revdesc = (lpar + Suppress(':revdesc') + dot + qstring + rpar).setParseAction(lambda s, l, t: [('revdesc', t[0])])

keyval_item = keyval_url | keyval_keywords | keyval_commit | keyval_maintainer | keyval_maintainer_multi | keyval_maintainers | keyval_maintainers_multi | keyval_authors | keyval_author
keyval_item = keyval_url | keyval_keywords | keyval_commit | keyval_maintainer | keyval_maintainer_multi | keyval_maintainers | keyval_maintainers_multi | keyval_authors | keyval_author | keyval_revdesc

keyvals = (lpar + ZeroOrMore(keyval_item) + rpar).setParseAction(lambda s, l, t: [{k: v for k, v in t}]) | nil.setParseAction(lambda s, l, t: [{}])

Expand Down

0 comments on commit d15cb00

Please sign in to comment.