Skip to content

Commit

Permalink
Add generating downloads from JSON
Browse files Browse the repository at this point in the history
Partially implements Tox#120

- downloads are now generated from a JSON file
- generating download buttons for all GNU/Linux distros with JavaScript
- small improvements to code readability in osdetect.js
- new section for nightly builds
  • Loading branch information
tox-user committed Jan 22, 2018
1 parent 37cac5c commit 6f2e25e
Show file tree
Hide file tree
Showing 7 changed files with 344 additions and 77 deletions.
195 changes: 195 additions & 0 deletions downloads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"stable":
[
{
"name": "Windows",
"qTox":
[
{
"name": "32 bit",
"url": "https://build.tox.chat/view/qtox/job/qTox_pkg_windows_x86_stable_release/lastSuccessfulBuild/artifact/setup-qtox.exe",
"sha256": "",
"gpg": ""
},

{
"name": "64 bit",
"url": "https://build.tox.chat/view/qtox/job/qTox_pkg_windows_x86-64_stable_release/lastSuccessfulBuild/artifact/setup-qtox.exe",
"sha256": "",
"gpg": ""
}
],
"uTox":
[
{
"name": "32 bit",
"url": "https://downloads.utox.io/stable/uTox_win32.exe",
"sha256": "",
"gpg": ""
},

{
"name": "64 bit",
"url": "https://downloads.utox.io/stable/uTox_win64.exe",
"sha256": "",
"gpg": ""
}
]
},

{
"name": "OS X",
"qTox":
[
{
"name": "32 bit",
"url": "https://github.com/qTox/qTox/releases/download/v1.13.0/qTox.dmg",
"sha256": "",
"gpg": ""
}
],
"uTox":
[
{
"name": "64 bit (OS X 10.7+)",
"url": "https://github.com/uTox/uTox/releases/download/v0.16.1/uTox-0.16.1.dmg",
"sha256": "",
"gpg": ""
}
]
},

{
"name": "GNU/Linux",
"":
[
{
"name": "Debian",
"url": "#gnulinux"
},

{
"name": "Gentoo",
"url": "#gnulinux"
},

{
"name": "Arch",
"url": "#gnulinux"
}
],
"uTox mostly static":
[
{
"name": "32 bit",
"url": "https://build.tox.chat/job/uTox_build_linux_x86_release/lastSuccessfulBuild/artifact/utox_linux_x86.tar.xz"
},
{
"name": "64 bit",
"url": "https://build.tox.chat/job/uTox_build_linux_x86-64_release/lastSuccessfulBuild/artifact/utox_linux_x86-64.tar.xz"
}
],
"Toxic mostly static":
[
{
"name": "32 bit",
"url": "https://build.tox.chat/job/toxic_build_linux_x86_release/lastSuccessfulBuild/artifact/toxic_build_linux_x86_release.tar.xz"
},
{
"name": "64 bit",
"url": "https://build.tox.chat/job/toxic_build_linux_x86-64_release/lastSuccessfulBuild/artifact/toxic_build_linux_x86-64_release.tar.xz"
}
],
"Toxic fully static (text chat only)":
[
{
"name": "32 bit",
"url": "https://build.tox.chat/job/toxic-no-x11-musl_build_linux_x86_release/lastSuccessfulBuild/artifact/toxic-no-x11-musl_build_linux_x86_release.tar.xz"
},
{
"name": "64 bit",
"url": "https://build.tox.chat/job/toxic-no-x11-musl_build_linux_x86-64_release/lastSuccessfulBuild/artifact/toxic-no-x11-musl_build_linux_x86-64_release.tar.xz"
}
]
},

{
"name": "FreeBSD",
"":
[
{
"name": "qTox",
"url": "https://www.freshports.org/net-im/qTox"
},


{
"name": "uTox",
"url": "https://www.freshports.org/net-im/uTox"
},


{
"name": "Toxic",
"url": "https://www.freshports.org/net-im/toxic"
}
]
},

{
"name": "iOS",
"":
[
{
"name": "Antidote (iOS 8+)",
"url": "https://itunes.apple.com/app/antidote-for-tox/id933117605"
}
]
},

{
"name": "Android",
"Antox":
[
{
"name": "F-droid",
"url": "#fdroid"
},

{
"name": "Google-Play",
"url": "https://play.google.com/store/apps/details?id=chat.tox.antox"
},

{
"name": "APK",
"url": "https://pkg.tox.chat/fdroid/repo/antox.apk"
}
]
}
],

"nightly":
[
{
"name": "qTox nightly",
"Windows":
[
{
"name": "32 bit",
"url": "https://build.tox.chat/view/qtox/job/qTox_build_windows_x86_release/lastSuccessfulBuild/artifact/qTox_build_windows_x86_release.zip",
"sha256": "",
"gpg": ""
},

{
"name": "64 bit",
"url": "https://build.tox.chat/view/qtox/job/qTox_build_windows_x86-64_release/lastSuccessfulBuild/artifact/qTox_build_windows_x86-64_release.zip",
"sha256": "",
"gpg": ""
}
]
}
]

}
7 changes: 7 additions & 0 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

THEME = "themes/website"

DOWNLOADS_JSON_PATH = "downloads.json"

# pelican is mainly aimed at blogs and a regular pelican template has only
# a predefined set of files with predefined names which do blog things.
Expand All @@ -31,6 +32,12 @@

import fnmatch
import os
import json

jsonFile = open(DOWNLOADS_JSON_PATH)
DOWNLOADS = json.load(jsonFile)
jsonFile.close()


TEMPLATES_DIR = THEME + '/templates'
for root, dirnames, filenames in os.walk(TEMPLATES_DIR):
Expand Down
3 changes: 3 additions & 0 deletions themes/website/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ input[type=checkbox]:checked ~ #hamlabel:before {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale
}
.icon-distro-small:before {
font-size: 18px;
}
.icon-debian:before{content:"\0041";}
.icon-gentoo:before{content:"\0042";}
.icon-arch:before{content:"\0043";}
Expand Down
Loading

0 comments on commit 6f2e25e

Please sign in to comment.