[gimp-web/downloads-templated] Add external GIMP_VERSIONS.py file and parse
- From: Pat David <patdavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web/downloads-templated] Add external GIMP_VERSIONS.py file and parse
- Date: Wed, 20 Jul 2016 21:17:42 +0000 (UTC)
commit a6ec16e79b62338dec85920440a709addbfed35e
Author: Pat David <patdavid gmail com>
Date: Wed Jul 20 16:16:07 2016 -0500
Add external GIMP_VERSIONS.py file and parse
Add to pelicanconf.local.py to load the GIMP_VERSIONS.py file
as a module so they values enumerated there become available
for templates.
Create the GIMP_VERSIONS.py file with some example values.
Modify /downloads.html template to use the new values created
in GIMP_VERSIONS.py to test things.
GIMP_VERSIONS.py | 8 ++++++++
pelicanconf.local.py | 3 +++
themes/newgimp/templates/downloads.html | 21 +++++++++++----------
3 files changed, 22 insertions(+), 10 deletions(-)
---
diff --git a/GIMP_VERSIONS.py b/GIMP_VERSIONS.py
new file mode 100644
index 0000000..1727aba
--- /dev/null
+++ b/GIMP_VERSIONS.py
@@ -0,0 +1,8 @@
+GIMP_VERSION_STABLE = '2.8.18'
+GIMP_VERSION_DEVEL = '2.9.4'
+
+GIMP_VERSION_STABLE_WINDOWS = '2.8.18'
+GIMP_VERSION_STABLE_MACOS = '2.8.16'
+
+GIMP_VERSION_STABLE_WINDOWS_POSTFIX = ''
+GIMP_VERSION_STABLE_MACOS_POSTFIX = '-1'
diff --git a/pelicanconf.local.py b/pelicanconf.local.py
index 26d6c37..200e132 100644
--- a/pelicanconf.local.py
+++ b/pelicanconf.local.py
@@ -2,6 +2,9 @@
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
+import sys
+sys.path.append('./')
+from GIMP_VERSIONS import *
#Plugins
PLUGIN_PATHS = ["plugins"]
diff --git a/themes/newgimp/templates/downloads.html b/themes/newgimp/templates/downloads.html
index cdf6bf6..c492990 100644
--- a/themes/newgimp/templates/downloads.html
+++ b/themes/newgimp/templates/downloads.html
@@ -20,6 +20,7 @@
<h2>Current Stable Version</h2>
<p>The current stable release of GIMP is <b>{{ GIMP_VERSION }}</b> (2016-07-14).</p>
+
<div class="OSTEST">
<p>
@@ -62,14 +63,14 @@
<p>
<span class='win-button' id='osx-torrent'>
- <a href="//download.gimp.org/pub/gimp/v2.8/osx/gimp-{{ page.gimp_version_stable_macos
}}-x86_64{{ page.gimp_version_stable_postfix_macos }}.dmg.torrent">
- Download GIMP {{ page.gimp_version_stable_macos }}<br/>
+ <a href="//download.gimp.org/pub/gimp/v2.8/osx/gimp-{{ GIMP_VERSION_STABLE_MACOS }}-x86_64{{
GIMP_VERSION_STABLE_MACOS_POSTFIX }}.dmg.torrent">
+ Download GIMP {{ GIMP_VERSION_STABLE_MACOS }}<br/>
via BitTorrent
</a>
</span>
<span class='win-button'>
- <a href="//download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-{{ page.gimp_version_stable_macos
}}-x86_64{{ page.gimp_version_stable_postfix_macos }}.dmg">
- Download GIMP {{ page.gimp_version_stable_macos }}<br/>
+ <a href="//download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-{{ GIMP_VERSION_STABLE_MACOS
}}-x86_64{{ GIMP_VERSION_STABLE_MACOS_POSTFIX }}.dmg">
+ Download GIMP {{ GIMP_VERSION_STABLE_MACOS }}<br/>
directly
</a>
</span>
@@ -89,7 +90,7 @@
<p>The official GIMP 2.8 DMG installer (linked above) is a stock GIMP build without any add-ons. It
works on OS X 10.6 Snow Leopard and later. Just open the downloaded DMG and drag and drop GIMP into your
"Applications" folder.</p>
<p>
- The MD5 hash sum for <code>gimp-{{ page.gimp_version_stable_macos }}-x86_64{{
page.gimp_version_stable_postfix_macos }}.dmg</code> is:
+ The MD5 hash sum for <code>gimp-{{ GIMP_VERSION_STABLE_MACOS }}-x86_64{{
GIMP_VERSION_STABLE_MACOS_POSTFIX }}.dmg</code> is:
<kbd>07e8116127081bd1e74095d23ab1d174</kbd>.
</p>
@@ -154,14 +155,14 @@
<p>
<span class='win-button' id='win-torrent'>
- <a href="//download.gimp.org/pub/gimp/v2.8/windows/gimp-{{ page.gimp_version_stable_windows
}}-setup{{ page.gimp_version_stable_postfix_windows }}.exe.torrent" title="Download GIMP via BitTorrent"
id="win-torrent-link">
- Download GIMP {{ page.gimp_version_stable_windows }}<br/>
+ <a href="//download.gimp.org/pub/gimp/v2.8/windows/gimp-{{ GIMP_VERSION_STABLE_WINDOWS
}}-setup{{ GIMP_VERSION_STABLE_WINDOWS_POSTFIX }}.exe.torrent" title="Download GIMP via BitTorrent"
id="win-torrent-link">
+ Download GIMP {{ GIMP_VERSION_STABLE_WINDOWS }}<br/>
via BitTorrent
</a>
</span>
<span class='win-button'>
- <a href="//download.gimp.org/mirror/pub/gimp/v2.8/windows/gimp-{{
page.gimp_version_stable_windows }}-setup{{ page.gimp_version_stable_postfix_windows }}.exe" title="Download
GIMP via HTTP" id='win-download-link' >
- Download GIMP {{ page.gimp_version_stable_windows }}<br/>
+ <a href="//download.gimp.org/mirror/pub/gimp/v2.8/windows/gimp-{{ GIMP_VERSION_STABLE_WINDOWS
}}-setup{{ GIMP_VERSION_STABLE_WINDOWS_POSTFIX }}.exe" title="Download GIMP via HTTP" id='win-download-link' >
+ Download GIMP {{ GIMP_VERSION_STABLE_WINDOWS }}<br/>
directly
</a>
</span>
@@ -187,7 +188,7 @@
<h3>MD5 Hash Sum</h3>
<p>
- The MD5 hash sum for <code>gimp-{{ page.gimp_version_stable_windows }}-setup{{
page.gimp_version_stable_postfix_windows }}.exe</code> is: <kbd>510bb11abc72443f431226523fa21b6f</kbd>.
+ The MD5 hash sum for <code>gimp-{{ GIMP_VERSION_STABLE_WINDOWS }}-setup{{
GIMP_VERSION_STABLE_WINDOWS_POSTFIX }}.exe</code> is: <kbd>510bb11abc72443f431226523fa21b6f</kbd>.
</p>
<h3>Older Downloads</h3>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]