forked from gnu-octave/packages-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.xml
65 lines (62 loc) · 2.95 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
layout: none
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ site.lang }}">
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ page.url | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<author>
<name>Octave community</name>
</author>
{%- assign packages = site.pages | where: "layout", "package" -%}
{%- assign i = 0 -%}
{%- for pkg in packages -%}
{%- assign t = pkg.versions[0].date | date_to_xmlschema | append: "$" | append: i | append: ", " -%}
{%- if t.size > 10 -%}
{%- assign timesort = timesort | append: t -%}
{%- endif -%}
{%- assign i = i | plus:1 -%}
{%- endfor -%}
{%- assign timesort = timesort | split: ", " | sort | reverse | slice: 0, 10 -%}
{%- for t in timesort -%}
{%- assign tt = t | split: "$" | shift | join: ", " -%}
{%- assign times = times | append: tt | append: ", " -%}
{%- endfor -%}
{%- assign times = times | split: ", " -%}
{%- for t in times -%}
{%- assign tt = t | to_integer -%}
{%- assign pkg = packages[tt] -%}
{%- assign pkg_name = pkg.permalink | remove: "/" -%}
<entry xml:lang="{{ site.lang }}">
<id>{{ pkg_name | absolute_url }}#{{ pkg.versions[0].id }}</id>
<title type="html">{{ pkg_name }} {{ pkg.versions[0].id }} released</title>
<link href="{{ pkg_name | absolute_url }}#{{ pkg.versions[0].id }}"
rel="alternate" type="text/html" title="{{ pkg_name }}" />
<published>{{ pkg.versions[0].date | date_to_xmlschema }}</published>
<updated>{{ pkg.versions[0].date | date_to_xmlschema }}</updated>
<summary type="html">{{ pkg.description | strip_html | strip | escape }}</summary>
<content type="html">
{%- capture content -%}
<p><a href="{{ pkg.icon | default: site.pkg_icon | absolute_url }}">
<img src="{{ pkg.icon | default: site.pkg_icon | absolute_url }}"
alt="{{ pkg_name }}"></a></p>
<p>{{ pkg.description | strip_html | strip | escape }}</p>
<p>Install {{ pkg_name }} {{ pkg.versions[0].id }} ({{ pkg.versions[0].date }})
from the Octave command-line with:</p>
<pre><code>pkg install "{{ pkg.versions[0].url }}"</code></pre>
{%- assign news = pkg.links | where: "label", "news" -%}
{%- if news != empty -%}
<p>See what has changed in this release in the
<a href="{{ news[0].url }}">NEWS</a> file.</p>
{%- endif -%}
{%- endcapture -%}
{{ content | xml_escape }}
</content>
</entry>
{%- endfor -%}
</feed>