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
<script src="https://spreadsheets.google.com/gpub?url=http%3A%2F%2F84jfcmfbboruil7k6lvfn8cs1l91mnes-ss-opensocial.googleusercontent.com%2Fgadgets%2Fifr%3Fup_title%26up__table_query_url%3Dhttps%253A%252F%252Fspreadsheets.google.com%252Fspreadsheet%252Ftq%253Frange%253DA1%25253AB2%2526key%253D0AqGkLMU9sHmLdGVKT2E3M0JrR01rdnZPaVhrNWNTU2c%2526gid%253D77%2526pub%253D1%26url%3Dhttp%253A%252F%252Fhosting.gmodules.com%252Fig%252Fgadgets%252Ffile%252F108150762089462716664%252Ffriendviz.xml%26spreadsheets%3Dspreadsheets&height=395&width=820"></script> |
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
<script src="https://spreadsheets.google.com/gpub?url=http%3A%2F%2F84jfcmfbboruil7k6lvfn8cs1l91mnes-ss-opensocial.googleusercontent.com%2Fgadgets%2Fifr%3Fup_title%26up__table_query_url%3Dhttps%253A%252F%252Fspreadsheets.google.com%252Fspreadsheet%252Ftq%253Frange%253DA1%25253AB2%2526key%253D0AqGkLMU9sHmLdGpXWDZ1clVtOTZKYmhFQ3liVXB0YlE%2526gid%253D77%2526pub%253D1%26url%3Dhttp%253A%252F%252Fhosting.gmodules.com%252Fig%252Fgadgets%252Ffile%252F108150762089462716664%252Ffriendviz.xml%26spreadsheets%3Dspreadsheets&height=450&width=720"></script> |
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
/* | |
All code apart from getPlusones() | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
function getLotsOfFriendAndFo(){ | |
// NOTE: before using running this script clear any existing data (apart from the header row) from the target sheet | |
var sheetName = "Followers"; // enter the sheet name to update | |
var friendOrFo = "followers"; // options 'friends' or 'followers | |
var optScreenName = "mhawksey"; // if you are getting someone elses friends or followers enter their screen name here | |
var statusString = ""; | |
var your_screen_name = tw_request("GET", "account/verify_credentials.json").screen_name; | |
if (typeof optScreenName != "undefined") { | |
statusString = "&screen_name="+optScreenName; |
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
function getPimsData() { | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("PIMS"); | |
var aUrl = "http://misc.jisc.ac.uk/pims/api/dev/project"; | |
try { | |
var options = | |
{ | |
"method" : "get" | |
}; | |
var response = UrlFetchApp.fetch(aUrl, options); |
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
function testUrl(){ | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("PIMS"); | |
var data = sheet.getRange(2,5,sheet.getLastRow(),1).getValues(); | |
for (var i = 0; i < data.length; i++){ | |
var responseCode = "-"; | |
if (data[i][0].substring(0,4)=="http"){ | |
try | |
{ | |
var response = UrlFetchApp.fetch(data[i][0]); |
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
function getProdData() { | |
var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("PROD"); | |
var aUrl = "http://bit.ly/nfL6Fx"; //shortened http://api.talis.com/stores/jisc-prod-dev1/services/sparql?query=PREFIX+prod%3A+%3Chttp%3A%2F%2Fprod.cetis.ac.uk%2Fvocab%2F%3E%0D%0APREFIX+doap%3A+%3Chttp%3A%2F%2Fusefulinc.com%2Fns%2Fdoap%23%3E%0D%0APREFIX+mu%3A+++%3Chttp%3A%2F%2Fwww.jiscmu.ac.uk%2Fschema%2Fmuweb%2F%3E%0D%0APREFIX+jisc%3A+%3Chttp%3A%2F%2Fwww.rkbexplorer.com%2Fontologies%2Fjisc%23%3E%0D%0ASELECT+DISTINCT+*%0D%0AWHERE+{%0D%0A++++%3Fs+a+doap%3AProject+.%0D%0A%09%3Fs+doap%3Aname+%3Fproject+.%0D%0A%09%3Fs+jisc%3Aend-date+%3Fdate+.%0D%0A%09%3Fs+doap%3Ahomepage+%3Fhomepage+.%0D%0A} | |
try { | |
var options = | |
{ | |
"method" : "get" | |
}; | |
var response = UrlFetchApp.fetch(aUrl, options); |
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 doc = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = doc.getSheetByName("Main"); | |
var TITLE_ROW = 1; | |
var URL_COL = 5; | |
var FBL_COL = 6; | |
var FBS_COL = 7; | |
var FBC_COL = 8; | |
var TW_COL = 9; | |
var TOP_COL = 10; | |
var BZ_COL = 11; |
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
function getCommentCount(){ | |
for (var rowIdx=0; rowIdx < sheet.getLastRow(); rowIdx++){ | |
var rowNum = rowIdx+TITLE_ROW+1; | |
var url = sheet.getRange(rowNum,URL_COL).getValue(); | |
Utilities.sleep(500); | |
try { | |
var options = | |
{ | |
"method" : "get" | |
}; |
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
function getCommentCount10(){ | |
for (var rowIdx=0; rowIdx < sheet.getLastRow(); rowIdx++){ | |
var rowNum = rowIdx+TITLE_ROW+1; | |
if (sheet.getRange(rowNum, COM_COL).getValue()==10){ | |
var url = sheet.getRange(rowNum,URL_COL).getValue(); | |
//var url = "http://blog.ouseful.info/2008/10/14/data-scraping-wikipedia-with-google-spreadsheets/" | |
Utilities.sleep(500); | |
try { | |
var options = | |
{ |