Created
October 30, 2017 16:18
-
-
Save polentino/0ecadd6cfebb7fd852db3aa2d0e4bd27 to your computer and use it in GitHub Desktop.
A quick and dirty javascript code to extract English talks from Scala.io website, and save it into a file 'talk-list.txt' to share to your colleagues/friends.
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
var talks = $("li.talk").filter(function() { | |
return $(this).css('background-image').indexOf('en.svg') != -1; | |
}); | |
var summary = ""; | |
$.each(talks, function(idx, talk) { | |
summary += '[' + idx + '] ' + $(talk).find('a.talk-title').text(); | |
summary += '\n\tDescription: ' + $(talk).find('> div').text(); | |
summary += '\n\n'; | |
}); | |
var fakeLink = document.createElement('a'); | |
fakeLink.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(summary)); | |
fakeLink.setAttribute('download', 'talk-list.txt'); | |
fakeLink.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment