Differences

This shows you the differences between two versions of the page.

Link to this comparison view

soctools [2006/05/11 23:25]
mdc created
soctools [2006/05/11 23:25] (current)
mdc created
Line 1: Line 1:
 +===== Script to extract data from SoC open applications =====
 +
 +  #!/bin/sh
 +  # A very simple shell script to extract essential data from Google SoC
 +  #  Application list pages
 +  #  M. Connor Fri May 12 03:05:08 GMT 2006
 +  #  Outputs name, email, project_title,​ score, has_mentor?
 +  ​
 +  # First we Delete blank lines
 +  sed -e "/​^$/​d"​ |
 +  ​
 +  while read xx
 +  do
 +     lineclass=`echo $xx | sed -e "​s@^.*class=@@"​ -e "​s@\"​@@g"​ -e "​s@\>​.*@@"​`
 +  #  echo "​lineclass:​ $lineclass"​
 +     case "​$lineclass"​ in
 +          "​listrequestapp"​ )
 +              read xx
 +              read xx
 +              email=`echo $xx | sed -e "​s@^.*csaid=@@"​ -e "​s@\:​.*@@"​`
 +              read xx
 +              name=`echo $xx | sed -e "​s@\:​.*@@"​`
 +              read xx
 +              projtitle=`echo $xx | sed -e "​s@^\<​b\>​\<​i\>​@@"​ -e "​s@</​i></​b>​@@"​`
 +              read xx
 +              read xx
 +              read xx
 +              read xx
 +              read score
 +              printf "​%s\t%s\t%s\t%s\t1\n"​ "​$name"​ "​$email"​ "​$projtitle"​ "​$score"​
 +              ;;
 +          "​listapp"​ )
 +              read xx
 +              read xx
 +              email=`echo $xx | sed -e "​s@^.*csaid=@@"​ -e "​s@\:​.*@@"​`
 +              read xx
 +              name=`echo $xx | sed -e "​s@\:​.*@@"​`
 +              read xx
 +              projtitle=`echo $xx | sed -e "​s@^\<​b\>​\<​i\>​@@"​ -e "​s@</​i></​b>​@@"​`
 +              read xx
 +              read xx
 +              read xx
 +              read score
 +              printf "​%s\t%s\t%s\t%s\t0\n"​ "​$name"​ "​$email"​ "​$projtitle"​ "​$score"​
 +              ;;
 +          esac
 +  done
 +  exit 0
  

QR Code
QR Code soctools (generated for current page)