Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dynare
website
Commits
b4cc50ab
Verified
Commit
b4cc50ab
authored
Sep 13, 2019
by
Houtan Bastani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework download page
parent
07a5f032
Pipeline
#1832
failed with stages
in 13 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
72 deletions
+51
-72
.gitignore
.gitignore
+2
-2
_includes/download-snapshot.html
_includes/download-snapshot.html
+8
-40
_includes/download-stable.html
_includes/download-stable.html
+4
-20
setup-download-links.sh
setup-download-links.sh
+37
-10
No files found.
.gitignore
View file @
b4cc50ab
...
...
@@ -3,10 +3,10 @@ _site
.jekyll-metadata
# Snapshots
asset
s/snapshot/*
_include
s/snapshot/*
# Releases
asset
s/release/*
_include
s/release/*
# Logo
assets/images/logo/*.aux
...
...
_includes/download-snapshot.html
View file @
b4cc50ab
...
...
@@ -21,30 +21,14 @@
</p>
<p>
Executable installer:
</p>
<div
class=
"download_table"
>
{% assign snapshot_files = (site.static_files | where: "snapshot", "windows-exe" | sort: 'modified_time') | reverse %}
{% for snapshot in snapshot_files %}
{% if snapshot.extname == ".exe" %}
<div
class=
"download_row"
onclick=
"document.location = 'https://www.dynare.org/snapshot/windows/{{ snapshot.name }}'"
onkeypress=
"document.location = 'https://www.dynare.org/snapshot/windows/{{ snapshot.name }}'"
>
<div
class=
"download_cell_left"
><i
class=
"fas fa-file-download"
></i>
{{ snapshot.modified_time | date: "%Y %b %d %R" }}
</div>
<div
class=
"download_cell_right"
><a
href=
"#"
>
{{ snapshot.name }}
</a></div>
</div>
{% endif %}
{% endfor %}
</div>
<div
class=
"download_table"
>
{% include snapshot/download-snapshot-windows.html %}
</div>
<br
/>
<p>
Zip archive:
</p>
<div
class=
"download_table"
>
{% assign snapshot_files = (site.static_files | where: "snapshot", "windows-zip" | sort: 'modified_time') | reverse %}
{% for snapshot in snapshot_files %}
{% if snapshot.extname == ".zip" %}
<div
class=
"download_row"
onclick=
"document.location = 'https://www.dynare.org/snapshot/windows-zip/{{ snapshot.name }}'"
onkeypress=
"document.location = 'https://www.dynare.org/snapshot-zip/windows/{{ snapshot.name }}'"
>
<div
class=
"download_cell_left"
><i
class=
"fas fa-file-download"
></i>
{{ snapshot.modified_time | date: "%Y %b %d %R" }}
</div>
<div
class=
"download_cell_right"
><a
href=
"#"
>
{{ snapshot.name }}
</a></div>
</div>
{% endif %}
{% endfor %}
</div>
<div
class=
"download_table"
>
{% include snapshot/download-snapshot-windows-zip.html %}
</div>
</section>
<section
class=
"dynare_section"
id=
"snapshot_content2"
>
...
...
@@ -58,15 +42,7 @@
"Open" from the menu that pops up.
</p>
<div
class=
"download_table"
>
{% assign snapshot_files = (site.static_files | where: "snapshot", "macosx" | sort: 'modified_time') | reverse %}
{% for snapshot in snapshot_files %}
{% if snapshot.extname == ".zip" %}
<div
class=
"download_row"
onclick=
"document.location = 'https://www.dynare.org/snapshot/macosx/{{ snapshot.name }}'"
onkeypress=
"document.location = 'https://www.dynare.org/snapshot/macosx/{{ snapshot.name }}'"
>
<div
class=
"download_cell_left"
><i
class=
"fas fa-file-download"
></i>
{{ snapshot.modified_time | date: "%Y %b %d %R" }}
</div>
<div
class=
"download_cell_right"
><a
href=
"#"
>
{{ snapshot.name }}
</a></div>
</div>
{% endif %}
{% endfor %}
{% include snapshot/download-snapshot-macosx.html %}
</div>
</section>
...
...
@@ -84,15 +60,7 @@
<section
class=
"dynare_section"
id=
"snapshot_content4"
>
<p>
Source code, not needed by most users.
</p>
<div
class=
"download_table"
>
{% assign snapshot_files = (site.static_files | where: "snapshot", "source" | sort: 'modified_time') | reverse %}
{% for snapshot in snapshot_files %}
{% if snapshot.extname == ".xz" %}
<div
class=
"download_row"
onclick=
"document.location = 'https://www.dynare.org/snapshot/source/{{ snapshot.name }}'"
onkeypress=
"document.location = 'https://www.dynare.org/snapshot/source/{{ snapshot.name }}'"
>
<div
class=
"download_cell_left"
><i
class=
"fas fa-file-download"
></i>
{{ snapshot.modified_time | date: "%Y %b %d %R" }}
</div>
<div
class=
"download_cell_right"
><a
href=
"#"
>
{{ snapshot.name }}
</a></div>
</div>
{% endif %}
{% endfor %}
{% include snapshot/download-snapshot-source.html %}
</div>
</section>
</div>
...
...
_includes/download-stable.html
View file @
b4cc50ab
...
...
@@ -22,19 +22,11 @@
<p>
Both an executable installer and a zip archive are available.
</p>
<p
class=
"stable"
>
<i
class=
"fas fa-file-download"
></i>
{% assign release = site.static_files | where: "release", "windows-exe" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] %}
<a
href=
"https://www.dynare.org/release/windows/{{ release.name }}"
>
Dynare {{ version }} ({{ release.extname }})
</a>
<a
href=
"https://www.dynare.org/release/windows/{{ release.name }}.sig"
>
[signature]
</a>
{% include release/download-release-windows.html %}
</p>
<p
class=
"stable"
>
<i
class=
"fas fa-file-download"
></i>
{% assign release = site.static_files | where: "release", "windows-zip" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] %}
<a
href=
"https://www.dynare.org/release/windows-zip/{{ release.name }}"
>
Dynare {{ version }} ({{ release.extname }})
</a>
<a
href=
"https://www.dynare.org/release/windows-zip/{{ release.name }}.sig"
>
[signature]
</a>
{% include release/download-release-windows-zip.html %}
</p>
</section>
...
...
@@ -50,11 +42,7 @@
</p>
<p
class=
"stable"
>
<i
class=
"fas fa-file-download"
></i>
{% assign release = site.static_files | where: "release", "macosx" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] | split: release.extname | first %}
<a
href=
"https://www.dynare.org/release/macosx/{{ release.name }}"
>
Dynare {{ version }} ({{ release.extname }})
</a>
<a
href=
"https://www.dynare.org/release/macosx/{{ release.name }}.sig"
>
[signature]
</a>
{% include release/download-release-macosx.html %}
</p>
</section>
...
...
@@ -86,11 +74,7 @@
</p>
<p
class=
"stable"
>
<i
class=
"fas fa-file-download"
></i>
{% assign release = site.static_files | where: "release", "source" | first %}
{% assign version = release.name | split: '-' %}
{% assign version = version[1] | split: '.tar.' | first %}
<a
href=
"https://www.dynare.org/release/source/{{ release.name }}"
>
Dynare {{ version }} (.tar{{ release.extname }})
</a>
<a
href=
"https://www.dynare.org/release/source/{{ release.name }}.sig"
>
[signature]
</a>
{% include release/download-release-source.html %}
</p>
</section>
</div>
...
...
setup-download-links.sh
View file @
b4cc50ab
...
...
@@ -2,7 +2,7 @@
set
-e
cd
asset
s
cd
_include
s
for
branch
in
release snapshot
do
...
...
@@ -18,21 +18,48 @@ do
for
dir
in
"
${
arr
[@]
}
"
do
mkdir
-p
"
$dir
"
readarray
-t
filenames < <
(
jq .[].filename
"
$dir
.json"
)
readarray
-t
timestamps < <
(
jq .[].date
"
$dir
.json"
)
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
filenames
=(
`
jq .[].filename
$dir
.json
`
)
timestamps
=(
`
jq .[].date
$dir
.json
`
)
else
readarray
-t
filenames < <
(
jq .[].filename
"
$dir
.json"
)
readarray
-t
timestamps < <
(
jq .[].date
"
$dir
.json"
)
fi
n
=
$(
jq length
"
$dir
.json"
)
cd
"
$dir
"
includeFilename
=
"download-
$branch
-
$dir
.html"
echo
""
>
$includeFilename
for
((
i
=
0
;
i < n
;
i++
))
do
filename
=
"
${
filenames
[i]%\
"}"
filename=
"
${
filename
#\
"}"
timestamp=
"
${
timestamps
[i]%\
"}"
timestamp=
"
${
timestamp
#\
"}"
echo
"
$filename
$timestamp
"
touch -amt
"
$timestamp
"
"
$filename
"
if [
"
$branch
"
=
"release"
]; then
IFS=
'-'
read -ra split <<<
"
$filename
"
if [
"
$dir
"
=
"windows"
] || [
"
$dir
"
=
"windows-zip"
]; then
version=
"
${
split
[1]
}
"
ext=
${
filename
##*.
}
elif [
"
$dir
"
=
"macosx"
]; then
version=
${
split
[1]%.*
}
ext=
${
filename
##*.
}
else
ext=
`
echo
${
split
[1]
}
| rev |
cut
-d
.
-f2
-f1
| rev
`
version=
`
echo
${
split
[1]
}
|
cut
-d
.
-f1
-f2
-f3
`
fi
echo
"<a href=
\"
https://www.dynare.org/
$branch
/
$dir
/
$filename
\"
>Dynare
$version
(
$ext
)</a>"
>>
$includeFilename
echo
"<a href=
\"
https://www.dynare.org/
$branch
/
$dir
/
$filename
.sig
\"
>[signature]</a>"
>>
$includeFilename
else
timestamp=
"
${
timestamps
[i]%\
"}"
timestamp=
"
${
timestamp
#\
"}"
if [[
"
$OSTYPE
"
==
"darwin"
* ]]; then
datestr=
`
date
-r
$timestamp
`
else
datestr=
`
date
-d
@
$timestamp
`
fi
echo
"<div class=
\"
download_row
\"
onclick=
\"
document.location = 'https://www.dynare.org/
$branch
/
$dir
/
$filename
'
\"
onkeypress=
\"
document.location = 'https://www.dynare.org/
$branch
/
$dir
/
$filename
'
\"
>"
>>
$includeFilename
echo
" <div class=
\"
download_cell_left
\"
><i class=
\"
fas fa-file-download
\"
></i>
$datestr
</div>"
>>
$includeFilename
echo
" <div class=
\"
download_cell_right
\"
><a href=
\"
#
\"
>
$filename
</a></div>"
>>
$includeFilename
echo
"</div>"
>>
$includeFilename
fi
done
cd ..
done
rm -- *.json
cd ..
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment