auto-generate descriptions and make tiers' maps non-str

pull/24020/head
Shane Smiskol 3 years ago
parent a1ef90480c
commit 92b7aa54c4
  1. 5
      docs/vehicles_template.js
  2. 1
      selfdrive/car/docs.py

@ -18,7 +18,9 @@ export const state = () => ({
],
supportedVehicles: {
{% for tier, car_rows in tiers %}
'{{tier.name.title()}}': [
'{{tier.name.title()}}': {
description: '{{ tier.value | replace("'", "\\'") }}',
rows: [
{% for row in car_rows %}
[
'{{row[0].text}}',
@ -30,6 +32,7 @@ export const state = () => ({
],
{% endfor %}
],
},
{% endfor %}
},
})

@ -58,7 +58,6 @@ def generate_cars_md(tier_car_rows: List[Tuple[Tier, List[RowItem]]], template_f
template = jinja2.Template(f.read(), trim_blocks=True, lstrip_blocks=True)
footnotes = [fn.value.text for fn in ALL_FOOTNOTES]
print(tier_car_rows[0][1][0])
return template.render(tiers=tier_car_rows, columns=[column.value for column in Column],
footnotes=footnotes, Star=Star)

Loading…
Cancel
Save