As it is easier to update the site information with a google sheet than using a JSON file. I’m trying to use a google sheet to update the site information @jaye @Gravewalker
I used the google sheet instead of using the JSON files to load data to the site. So I tested it with the Onelive page locally and it worked!!!
After editing and saving the google sheet it auto-updates the same URL and gives the new data to the site
Also can add new profiles or delete them with the google sheet
Here is the google sheet link - https://docs.google.com/spreadsheets/d/1XQI7aOokHIzbpoA5cyC5xum7EJA3tv599QUNds-d6HQ/edit?usp=sharing
URL of the JSON format - https://script.google.com/macros/s/AKfycbwEurJtUIJ6i3jAafwuZ2bfX4VaUKYB_anvCtyV7hZV-6q-QIhEwZd7N6zHsAfAG-LJ/exec
I haven’t created an Issue & PR for this. So is there anything to improve or shall I create the Issue & PR @EngTeam
@Gajindu_Bandara Awesome work dude! This is really impressive I guess you used your personal email to create these sheets. @akshika47 @jaye Should we use the SEF email to create these sheets so that anyone with edit access could update the site easily?
I did some tests to find out the loading time of the google sheet URL. It takes about 1.0s to 1.3s time to load the data to the website
@EngTeam
Thank you @Gajindu_Bandara for the update. @jaye @akshika47 Since this takes about 1 sec to load, should we lookup for an alternative or apply this anyway?
1 second seems reasonable.
How about trying with like 500 mock rows?
Btw, images should be uploaded to a separate place and post the url on that field. Otherwise we have to open a pr to upload images. (The intention of this task is to update data without opening prs)
We can add a loading icon right? In case it took more than that to load.
Yeah I’ll try it by uploading the image to the drive and using that link to access the image
Latency seems okay to me! We have to be methodical and put in checks for images being uploaded via Google Drive. the other issue would be the size of images that could impact the loading time and the Google Drive storage.
I used the google photos service to upload an image and got the URL. Using that URL I imported the profile picture to the website. It’s working accurately! So is there anything to be changed or improved?
Also, I came up with an idea, we have to update the profile images from time to time as the person is not going to be the same. So for that, we can use the LinkedIn profile picture and when the person is updating his profile picture it will automatically update the website profile image as well
Good job! @Gajindu_Bandara. Correct me if I’m wrong. So basically we do have 2 options here.
- Using LinkedIn profile image URL directly to the google sheet.
- Using google photos to upload the profile image and add the generated URL to the google sheet.
I checked if there is a Linkedin API to get the profile image by name. But unfortunately, they don’t unless authentication is provided. Therefore if we choose option 1, we need to manually visit the person’s profile, then copy the profile image URL. Also, I noticed whenever someone changes his/her profile image, their URL changes too. Therefore, If we choose option 1, we have to manually change the URL each time someone changes their profile picture. If Linkedin provides an API to achieve this, we can later move to this option.
I know it’s not the best option. But for now, I think it is better to go with google photos at this point. We do have all the photos we need. All we need is some time to upload and document them. At least it’ll be solid once it’s done.
WDYT? @akshika47 @EngTeam
Reference: https://stackoverflow.com/questions/6955647/getting-linkedin-profile-picture
Good analysis @Gimhan_minion! I agree with your reasoning and I prefer the second option as it is more stable.
Yeah! @Gimhan_minion LinkedIn thing is gonna be a problem when the person is changing the picture. I just figured that out later
I did some further tests with google photos on the Onelive page, So is it OK to use the google photos service or should I look for another alternative image hosting service @akshika47 @EngTeam
@Gajindu_Bandara We’ll go with google photos for now!
Then shall I create an issue and a PR for this google sheet thing? @Gimhan_minion
Yeah, go ahead! @Gajindu_Bandara
Created a PR for this google sheet thing (https://github.com/sef-global/sef-site/pull/985)
I used google photos to upload the images but @jaye said about the image resizing thing and I found that feature on the https://postimages.org/ site.
We can create a gallery and we can select the image size as well. So no need to resize the images manually before uploading as in google photos. But there are some terms and conditions as we have to use a free account in it.
So which option are we gonna use @EngTeam ?
@Gajindu_Bandara Can you check cloudinary? I think it meets our requirements. It has this image resize API and the free tier seems enough for us. https://cloudinary.com/cookbook/resize_an_image
Yeah! I’ll check that @anjisvj
I created an account at https://cloudinary.com and uploaded the images on the Onelive page to that.
I didn’t use the resizing functions for the existing image because they are in the correct format. As @anjisvj said, images can be resized from that website. So I’m gonna move from google photos to this Cloudinary image hosting service. I added the Cloudinary image links to the google sheet and updated the sheet
So what next ? are we gonna use this service? @EngTeam