Closed mariobehling closed 8 years ago
Hi @mariobehling I would like to work on this issue. I saw the spreadsheet and I plan to programaticaly extract all data and put in the html file. I will take care of duplicates, missing images and will make sure that the output is neat and good-looking.
Please use the already extracted data here: https://github.com/fossasia/open-event-scraper/blob/master/out/speakers.json. If you have anything missing there, please open an issue or PR on open-event-scraper. Thanks!
Best is to upload any photo to Github instead of pulling them from original locations. It is too slow otherwise.
@mariobehling Yes. It will also be more reliable that way. I will download the images into the img directory.
@mariobehling @joerx There are 162 distinct speakers right now. Loading them at once will make the page gigantic. So I was thinking of adding a show more button to incrementally load them. Also I will use JS to fetch speakers at runtime to keep the HTML clean. What do you suggest ?
@aviaryan What are you up to ? with this issue?
I have downloaded the images, resized them and can generate the html code to add a speaker but I am not sure whether we should have all the speakers in the home page (dynamic) or in a separate page. @daminisatya What do you suggest ?
EDIT - My repo - https://github.com/aviaryan/2016.fossasia.org/tree/speakers
@joerx +1
Hello . I have finished adding speakers (with bio, links) on the page. https://github.com/aviaryan/2016.fossasia.org/tree/speakers I can't show a preview because it's not in my gh-pages branch. (My gh-pages branch is tracking PR #22 ) Here is a screenshot
PS - Elegant icon pack lacks github icon so I am using something else as a placeholder for now. PS2 - For now, I have only included speakers who have a image. I can show a placeholder image for anyone who doesn't have one.
Let me know what you think.
Looks great (Y) @aviaryan But why dont you try to automate the addition of the list, that's how you can make the upmost use of the "speakers.json" file ;)
@daminisatya I have automated everything, but in Python :pensive: (Link to the dirty script) Next, I will use JavaScript to load data from the json file. This will hopefully keep the HTML source cleaner. :sunglasses:
@aviaryan Maybe what we could do is I think @daminisatya has also been working on this and has the JS part of it ready, Can you push the resized images with the format you've taken, use the name
part of each speaker object to save the image and you could submit that as a pull request and her patch which she mailed me could help in finishing this, I am excited to see both of you finish this.
@@ -1237,6 +1133,36 @@
<script src="js/tweetsfetcher.js"></script>
<script src="js/placeholders.min.js"></script>
<script src="js/scripts.js"></script>
+ <script>
+ $.ajax({
+ type : 'GET',
+ dataType : 'json',
+ url: '/schedule/speakers.json',
+ success : function(data) {
+ // console.log(data);
+ var names = data.speakers;
+ var speakerString = "";
+ for (var nameValue = 0; nameValue < names.length; nameValue++) {
+ speakerString += "<div class=\"col-md-3 col-sm-6 speaker-column\">"+
+ "<div class=\"speaker\">"+
+ "<div class=\"image-holder\">"+
+ "<img class=\"background-image\" alt=\"\" src=\""+names[nameValue].photo+"\" height=\"285\" width=\"285\"\">"+
+ "<div class=\"hover-state text-center preserve3d\">"+
+ "<div class=\"social-links vertical-align\">"+
+ "<a href=\"#\"><i class=\"icon social_twitter\"></i></a>"+
+ "<a href=\"#\"><i class=\"icon social_linkedin\"></i></a>"+
+ "</div>"+
+ "</div>"+
+ "</div>"+
+ "<span class=\"speaker-name\">"+names[nameValue].name+"</span>"+
+ "<span>"+names[nameValue].organisation+"</span>"+
+ "</div>"+
+ "</div>";
+ }
+ $('#speakersList').append(speakerString);
+ }
+ });
+ </script>
</body>
</html>
It probably needs an edit in this line
"<img class=\"background-image\" alt=\"\" src=\""+names[nameValue].photo+"\" height=\"285\" width=\"285\"\">"
where the names[nameValue].photo can be replaced by the filename depending on how you name it.
Does this sound good ? @aviaryan and @daminisatya
@sudheesh001 sounds good. @aviaryan Can you raise a PR of all the resized downloaded images. Since you have already done with it ! We can push those images into this code and the list works fine. Looks like the image names are appended with the first and last name.
@sudheesh001 @daminisatya Sure. :+1:
Few points -
speakerString
code. You can see the new code here.def trimBio(bio):
st = 0
while (bio.find('.', st) > -1):
if bio.find('.', st) > 180:
if st == 0:
return bio[:180]
else:
return bio[:st]
st = bio.find('.', st) + 1
return bio[:180]
@aviaryan what about all those speakers? Could you make a pull request and then we work step by step to improve? We need the speaker on the page asap.
Also could you set up the github pages on your account. So we can see the progress more easily? Cheers.
@aviaryan Could you please join the channel http://fossasia-slack.herokuapp.com and the channel app-dev
@all interesting work here. I see that no photo has been added so far to the site and that you are working on scripts. This seems like over-engeneering. I need help to add photos to the page manually now. the script generated images that are distorted and you overwrote existing images not taking care of capitals. This broke the site and we had missing images making the page looking like a page from 1998. Please help me to do this manually at first and then improve step by step.
@aviaryan what about all those speakers? Could you make a pull request and then we work step by step to improve? We need the speaker on the page asap.
I stopped working on it after #23 got merged. From there, @daminisatya was adding the JS to dynamically load speakers from .json file. Her PR is #24 . It is currently missing bio and other links. What PR should I make ? @mariobehling
Slack Channel joined. username - aviaryan
On scroll over please show (insert in template html)
The document with the speaker data is here: https://docs.google.com/spreadsheets/d/1S7D9PrR8QqC_bU8h6920Ni3IHHhgaz9Nq-092tyj_4c/edit#gid=0