Last active
August 29, 2015 14:00
-
-
Save jiphex/11223043 to your computer and use it in GitHub Desktop.
Distro thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- distro: debian | |
releases: | |
- codename: squeeze | |
version: 6 | |
release: 2011-02-06 | |
eol: 2014-05-04 | |
- codename: wheezy | |
version: 7 | |
release: 2013-05-04 | |
eol: 2016? | |
- codename: jessie | |
version: 8 | |
release: 2015? | |
eol: unknown | |
- distro: centos | |
releases: | |
- version: 5 | |
release: 2007-04 | |
eol: March 2017 | |
- version: 6 | |
release: 2011-06 | |
eol: June 2011 | |
- distro: ubuntu | |
releases: | |
- version: 10.04 | |
codename: Lucid Lynx | |
release: April 2010 | |
eol: April 2015 | |
- version: 12.04 | |
codename: Precise Pangolin | |
release: April 2012 | |
eol: April 2017 | |
- version: 14.04 | |
codename: Trusty Tahir | |
release: April 2014 | |
eol: April 2019 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style type='text/css'> | |
body { | |
font-family: sans-serif; | |
font-size: 150%; | |
} | |
td { | |
padding: 5px; | |
} | |
.distro { | |
font-weight: bold; | |
color: red; | |
vertical-align: top; | |
border-right: 2px solid blue; | |
} | |
</style> | |
<title>Distro EOL dates</title> | |
</head> | |
<body> | |
<table> | |
<tr> | |
<th>Distro</th> | |
<th>Codename</th> | |
<th>Version</th> | |
<th>Release Date</th> | |
<th>End of Life</th> | |
</tr> | |
<% for distro in distros %> | |
<% distro["releases"].each_with_index do |release,i| %> | |
<tr> | |
<% if i == 0 %> | |
<td class='distro' rowspan='<%=distro['releases'].length%>'><%=distro["distro"]%></td> | |
<% end %> | |
<td class='version'><%=release["version"]%></td> | |
<td class='codename'><%=release["codename"] || "-" %></td> | |
<td class='release'><%=release["release"]%></td> | |
<td class='eol'><%=release["eol"]%></td> | |
</tr> | |
<% end %> | |
<% end %> | |
</table> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index.html: distros.rhtml distro.yml | |
ruby mkpage.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'erb' | |
distros = YAML.load_file 'distro.yml' | |
template = 'distros.rhtml' | |
erb = ERB.new(File.read(template)) | |
File.open("index.html","w").puts(erb.result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment