---
to: "{{ project_name }}/src/cmds/{{ noun }}/mod.rs"
sparql:
  verbs: |
    PREFIX cnv: <http://ggen.dev/schema/clap-noun-verb#>
    SELECT ?verbName ?verbDescription ?alias
    WHERE {
      ?noun cnv:nounName "{{ noun }}" ;
            cnv:hasVerb ?verb .
      ?verb cnv:verbName ?verbName ;
            cnv:verbDescription ?verbDescription .
      OPTIONAL { ?verb cnv:verbAlias ?alias }
    }
    ORDER BY ?verbName
  noun_info: |
    PREFIX cnv: <http://ggen.dev/schema/clap-noun-verb#>
    SELECT ?nounDescription
    WHERE {
      ?noun cnv:nounName "{{ noun }}" ;
            cnv:nounDescription ?nounDescription .
    }
---
//! {% if sparql_results.noun_info | length > 0 %}{{ sparql_results.noun_info[0].nounDescription }}{% else %}Manage {{ noun }}s{% endif %}
//! Noun name "{{ noun }}" is auto-inferred from directory name by clap-noun-verb

{% for verb in sparql_results.verbs %}pub mod {{ verb.verbName }};
{% endfor %}
