what was the problem with it? Here is one in R that should work as long as the wiki doesn't change too much, I dont know how to host it though.:
require(RCurl)
require(XML)
require(ggplot2)
remove.list<-c(
"Getting started","Currency exchanges", "Financial",
"Bitcoin eWallets","Bitcoin payment systems"
)
old.results<-read.table("old_results.txt", header=T)
new.data<-getURLContent("https://en.bitcoin.it/w/index.php?title=Trade&action=edit",
ssl.verifypeer = FALSE, useragent = "R"
)
new.data<-readLines(tc <- textConnection(new.data)); close(tc)
categories<-as.data.frame(cbind(
grep(pattern="^==[A-Z]",new.data),
new.data[grep(pattern="^==[A-Z]",new.data)]
))
categories[,1]<-as.numeric(as.character(categories[,1]))
entries=NULL
for(i in 1:(nrow(categories)-1)){
selected.cat<-new.data[categories[i,1]:categories[i+1,1]]
rem.headers.step1<-selected.cat[grep(pattern="/(*)",selected.cat)]
if(length(grep(pattern="^==",rem.headers.step1))==0){
rem.headers.step2<-rem.headers.step1
}else{
rem.headers.step2<-rem.headers.step1[-grep(pattern="^==",rem.headers.step1)]
}
out<-cbind(selected.cat[1],length(rem.headers.step2))
entries<-rbind(entries,out)
}
entries<-as.data.frame(entries)
entries[,2]<-as.numeric(as.character(entries[,2]))
entries[,1]<-gsub("==","",entries[,1])
entries<-entries[which(entries[,2]>0),]
entries<-cbind(rep(format(Sys.time(), "%b %y"),nrow(entries)),entries)
new.results<-entries[-which(entries[,2] %in% remove.list),]
colnames(new.results)<-c("Date","Category","Number")
try(
new.results<-rbind(old.results,new.results)
)
rownames(new.results)<-1:nrow(new.results)
qplot(Date,Number, data=new.results, geom="bar", fill= Category)+
opts(title=c("Number of BTC Accepting Merchants \n (en.bitcoin.it/wiki/trade)"))
png("newchart.png")
qplot(Date,Number, data=new.results, geom="bar", fill= Category)+
opts(title=c("Number of BTC Accepting Merchants \n (en.bitcoin.it/wiki/trade)"))
dev.off()
write.table(new.results, "old_results.txt")
Produces (with made up February data to show it could update automatically):
"Date" "Category" "Number"
"1" "Jan 13" "Internet & Mobile services" 203
"2" "Jan 13" "Online products" 126
"3" "Jan 13" "Material / Physical Products" 219
"4" "Jan 13" "Professional services" 86
"5" "Jan 13" "Commerce and community" 49
"6" "Jan 13" "Travel / Tourism / Leisure " 31
"7" "Feb 13" "Internet & Mobile services" 105
"8" "Feb 13" "Online products" 86
"9" "Feb 13" "Material / Physical Products" 98
"10" "Feb 13" "Professional services" 99
"11" "Feb 13" "Commerce and community" 92
"12" "Feb 13" "Travel / Tourism / Leisure " 84
And this: