Created
July 14, 2015 15:32
-
-
Save mewdriller/84a43e094ad631f33cc2 to your computer and use it in GitHub Desktop.
Extract Cedar-14 package name/version pairs from https://devcenter.heroku.com/articles/cedar-ubuntu-packages
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
_.chain($('tbody tr')) | |
.map(function (row) { | |
return [ | |
$(row).find('td:nth-child(1)').text().trim(), | |
$(row).find('td:nth-child(3)').text().trim() | |
]; | |
}) | |
.reject(function (pair) { | |
return pair[1] === 'absent'; | |
}) | |
.map(function (pair) { | |
return pair.join('='); | |
}) | |
.join(' ') | |
.value(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment