diff options
| author | Geert Hauwaerts | 2014-08-07 13:02:17 +0200 |
|---|---|---|
| committer | Geert Hauwaerts | 2014-08-07 13:02:17 +0200 |
| commit | 1b7e359bd7c4db494f99ea203dced51f0b2d9855 (patch) | |
| tree | 466bbbb26d11cd0d6e5e413e264810d792c075ab /scripts.dmp | |
| parent | f2feb33d72476e68d0aa5c04fc47dc5e12310098 (diff) | |
| parent | ddd1f4533eaa1a71082588349ff538ef4e5955bd (diff) | |
| download | scripts.irssi.org-1b7e359bd7c4db494f99ea203dced51f0b2d9855.tar.bz2 | |
Merge pull request #27 from dequis/bunch-of-changes
Improving the script archive
Diffstat (limited to 'scripts.dmp')
| -rw-r--r-- | scripts.dmp | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/scripts.dmp b/scripts.dmp index fc396fe..3dc122e 100644 --- a/scripts.dmp +++ b/scripts.dmp @@ -2,33 +2,18 @@ layout: nil --- +{% assign required_attributes = "filename version authors contact name description license" | split: ' ' %} +{% assign optional_attributes = "url commands note modules" | split: ' ' %} + $scripts = { {% for script in site.data.scripts %} '{{ script.filename }}' => { - 'filename' => '{{ script.filename }}', - 'last_modified' => '{{ script.modified }}', - 'version' => '{{ script.version }}', - 'authors' => '{{ script.authors }}', - 'contact' => '{{ script.contact }}', - 'name' => '{{ script.name }}', - 'description' => '{{ script.description }}', - 'license' => '{{ script.license }}', -{% if script.url %} - 'url' => '{{ script.url }}', -{% endif %} -{% if script.changed %} - 'changed' => '{{ script.changed }}', -{% endif %} -{% if script.commands %} - 'commands' => '{{ script.commands }}', -{% endif %} -{% if script.note %} - 'note' => '{{ script.note }}', -{% endif %} -{% if script.modules %} - 'modules' => '{{ script.modules }}', -{% endif %} +{% for attr in required_attributes %} + '{{ attr }}' => '{{ script[attr] }}',{% endfor %} + 'last_modified' => '{{ script.modified }}', +{% for attr in optional_attributes %}{% if script contains attr %} + '{{ attr }}' => '{{ script[attr] }}',{% endif %}{% endfor %} }, {% endfor %} }; |
