Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

CA170      CA668      CA686

Online AI coding exercises

Project ideas


Grab Flickr data

Write a shell script to get images from Flickr and make a web page to display them.

Background


The "flickr" shell script

  1. Shell script usage:
    flickr (tag)
  2. Gets JSON feed of latest photos tagged with this tag.
  3. You will notice there are little snippets of usable HTML inside here:
     "description": " HTML payload (encoded) ", 
  4. Extract all the "description" lines.
  5. Extract all the HTML payloads.
  6. You should now have multiple lines like:
     HTML payload (encoded) 
  7. Decode the HTML payloads to normal HTML.
  8. You should now have multiple lines like:
     HTML payload (normal) 

  9. Send the output into this file:
     $HOME/public_html/flickr.html 
  10. You can then view the output page in the browser to see the images.
  11. For the URL to view the page, see: How to make and view webpages on student.computing.dcu.ie


Testing

  1. flickr bugatti
    should fetch latest images for "bugatti" and display them.