将标记列表转换为可读文件。
taggeator的Python项目详细描述
来自标签描述格式如下的文件:
apps: - name: fubar url: http://example.org/fubar description: a fubar app tags: - foo1 - bar1 - name: foo url: http://example.org/foo description: a foo app tags: - foo1 - foo2 - name: bar url: http://example.org/bar description: a bar app tags: - bar1 - bar2
在应用带有反转文件的模板后生成新文件,即, 每个应用程序都有一个标记的dict。
例如,使用模板:
Simple output for tageator {% for item in categories | dictsort %} - {{ item[0] }} {%- for app in item[1] | sort(attribute='name') %} - {{ app.name }}: {{ app.description }} ({{ app.url }}) {%- endfor %} {% endfor %}
上一个输入文件将生成:
Simple output for tageator - bar1 - bar: a bar app (http://example.org/bar) - fubar: a fubar app (http://example.org/fubar) - bar2 - bar: a bar app (http://example.org/bar) - foo1 - foo: a foo app (http://example.org/foo) - fubar: a fubar app (http://example.org/fubar) - foo2 - foo: a foo app (http://example.org/foo)