< User:Robert W KingRevision as of 11:36, 6 March 2008 by imported>Robert W King
test using Template:Timeline_Table
Template:Timeline Table
Thing from excel
http://en.citizendium.org/wiki/Fire var wgPageName "Fire"
var wgTitle "Fire"
var wgArticleId "100023366"
var wgCurRevisionId "100193030"
http://en.citizendium.org/wiki?title=Fire&diff=prev&oldid=100193030 var wgPageName "Fire"
var wgTitle "Fire"
var wgArticleId "100023366"
var wgCurRevisionId "100193030"
<table class='diff'>
<td colspan='2' class='diff-otitle'>
<div id="mw-diff-otitle1">
<a href='/wiki?title=Fire&oldid=100192579'>
<div id="mw-diff-otitle2">
<a href="/wiki/User:Hayford_Peirce" title="User:Hayford Peirce"
<td colspan="2" class="diff-lineno">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>-
<td class='diff-deletedline'>
<del class="diffchange">
<td class='diff-marker'>+
<td class='diff-addedline'>
<ins class="diffchange">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<!-- diff cache key cz:diff:version:1.11a:oldid:100192579:newid:100193030 -->
http://en.citizendium.org/wiki?title=Fire&diff=prev&oldid=100192579 var wgPageName "Fire"
var wgTitle "Fire"
var wgArticleId "100023366"
var wgCurRevisionId "100193030"
<td colspan='2' class='diff-otitle'>
<div id="mw-diff-otitle1">
<a href='/wiki?title=Fire&oldid=100192564'>
<div id="mw-diff-otitle2">
<a href="/wiki/User:Hayford_Peirce" title="User:Hayford Peirce">
<td colspan='2' class='diff-ntitle'>
<div id="mw-diff-ntitle1">
<a href='/wiki?title=Fire&oldid=100192579'>
<div id="mw-diff-ntitle2">
<a href="/wiki/User:Hayford_Peirce" title="User:Hayford Peirce">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-deletedline'>
<del class="diffchange">
<del class="diffchange">
<td class='diff-marker'>+
<td class='diff-addedline'>
<ins class="diffchange">
<ins class="diffchange">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<!-- diff cache key cz:diff:version:1.11a:oldid:100192564:newid:100192579 -->
http://en.citizendium.org/wiki?title=Fire&diff=prev&oldid=100192432 var wgPageName "Fire"
var wgTitle "Fire"
var wgArticleId "100023366"
var wgCurRevisionId "100193030"
<td colspan='2' class='diff-otitle'>
<div id="mw-diff-otitle1">
<a href='/wiki?title=Fire&oldid=100192314'>
<div id="mw-diff-otitle2">
<a href="/wiki/User:Aleta_Curry" title="User:Aleta Curry">
<td colspan='2' class='diff-ntitle'>
<div id="mw-diff-ntitle1">
<a href='/wiki?title=Fire&oldid=100192432'>
<div id="mw-diff-ntitle2">
<a href="/wiki/User:Jeffrey_Scott_Bernstein" title="User:Jeffrey Scott Bernstein">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>-
<td class='diff-deletedline'>
<del class="diffchange">
<td class='diff-marker'>+
<td class='diff-addedline'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td colspan="2" class="diff-lineno">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>-
<td class='diff-deletedline'>
<del class="diffchange">
<td class='diff-marker'>+
<td class='diff-addedline'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
http://en.citizendium.org/wiki?title=Fire&diff=prev&oldid=100192314 var wgPageName "Fire"
var wgTitle "Fire"
var wgArticleId "100023366"
var wgCurRevisionId "100193030"
<td colspan='2' class='diff-otitle'>
<div id="mw-diff-otitle1">
<a href='/wiki?title=Fire&oldid=100192191'>
<div id="mw-diff-otitle2">
<a href="/wiki/User:Robert_W_King" title="User:Robert W King">
<td colspan='2' class='diff-ntitle'>
<div id="mw-diff-ntitle1">
<a href='/wiki?title=Fire&oldid=100192314'>
<div id="mw-diff-ntitle2">
<a href="/wiki/User:Aleta_Curry" title="User:Aleta Curry">
<td colspan="2" class="diff-lineno">
<td colspan="2" class="diff-lineno">
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>+
<td class='diff-addedline'>
<td class='diff-marker'>+
<td class='diff-addedline'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
<td class='diff-marker'>
<td class='diff-context'>
Thing 2
Module Module1
Dim url
Dim CZ
Dim wikipath
Dim totalcdata
Dim title
Dim currentid
Dim articleid
Dim oldid
Dim latestid
Dim diffclass
Sub Main()
Dim T
T = 0
initCZ()
title = "fire"
url = wikipath + "/" + title
CZ.navigate(url)
Do Until CZ.readyState = 4
Loop
getcdata()
articleid = Right(Mid(totalcdata, InStr(totalcdata, "wgArticleId"), 24), 9)
currentid = Right(Mid(totalcdata, InStr(totalcdata, "CurRevisionId"), 26), 9)
navtorecentdiff()
Do
getoldid()
If latestid <> oldid Then
getinsdiffchange()
getdeldiffchange()
navolddiff()
End If
Loop While latestid <> oldid
End Sub
Function initCZ()
wikipath = "http://en.citizendium.org/wiki"
CZ = CreateObject("InternetExplorer.Application")
CZ.Toolbar = 0
CZ.Visible = 1
CZ.navigate(wikipath)
Do Until CZ.readyState = 4
Loop
Return CZ
End Function
Function getcdata()
Dim tags
Dim thing
Dim x
Dim test
x = 0
tags = CZ.document.getElementsbyTagName("script")
For Each Items In tags
thing = tags.Item(x).innerHtml
test = InStr(thing, "CDATA")
If test <> 0 Then
totalcdata = thing
Exit For
End If
x = x + 1
Next
Return totalcdata
End Function
Function navtorecentdiff()
url = wikipath + "?title=" + title + "&diff=prev&oldid=" + (Right(currentid, 9))
CZ.navigate(url)
Do Until CZ.readystate = 4
Loop
Return url
End Function
Function getoldid()
Dim tags
Dim thing
Dim x
Dim test
x = 0
tags = CZ.document.getElementsbyTagName("a")
For Each Items In tags
thing = tags.Item(x).outerHtml
test = InStr(thing, "oldid")
If test <> 0 Then
latestid = oldid
oldid = Mid(thing, test + 6, 9)
Exit For
End If
x = x + 1
Next
Return oldid
End Function
Function navolddiff()
url = wikipath + "?title=" + title + "&diff=prev&oldid=" + oldid
CZ.navigate(url)
Do Until CZ.readystate = 4
Loop
Return url
End Function
Function getinsdiffchange()
Dim tags
Dim thing
Dim x
Dim test
Dim totalwrite
x = 0
tags = CZ.document.getElementsbyTagName("ins")
For Each Items In tags
thing = tags.Item(x).innerHtml
test = InStr(thing, "class=diffchange")
If thing <> Nothing Then
diffclass = diffclass + "+" + "'" + thing + "'" + "; "
End If
x = x + 1
Next
totalwrite = title + " | " + articleid + " | " + latestid + " | " + diffclass + vbCrLf
IO.File.AppendAllText(("c:\" + title + "_insdiffchange.txt"), totalwrite)
diffclass = Nothing
Return diffclass
End Function
Function getdeldiffchange()
Dim tags
Dim thing
Dim x
Dim test
Dim totalwrite
x = 0
tags = CZ.document.getElementsbyTagName("del")
For Each Items In tags
thing = tags.Item(x).innerHtml
test = InStr(thing, "class=diffchange")
If thing <> Nothing Then
diffclass = diffclass + "-" + "'" + thing + "'" + "; "
End If
x = x + 1
Next
totalwrite = title + " | " + articleid + " | " + latestid + " | " + diffclass + vbCrLf
IO.File.AppendAllText(("c:\" + title + "_deldiffchange.txt"), totalwrite)
diffclass = Nothing
Return diffclass
End Function
End Module
Excel VB Script version
Function grabdiffdata()
Dim url
Dim CZ
Dim wikipath
Dim totalcdata
Dim title
Dim currentid
Dim articleid
Dim oldid
Dim latestid
Dim diffclass
Dim T
Dim tags
Dim thing
Dim x
Dim test
Dim totalwrite
T = 0
wikipath = "http://en.citizendium.org/wiki"
Set CZ = CreateObject("InternetExplorer.Application")
CZ.Toolbar = 0
CZ.Visible = 1
CZ.navigate (wikipath)
Do Until CZ.readyState = 4
Loop
title = "fire"
url = wikipath + "/" + title
CZ.navigate (url)
Do Until CZ.readyState = 4
Loop
x = 0
Set tags = CZ.document.getElementsByTagName("script")
For Each Items In tags
thing = tags.Item(x).innerHTML
test = InStr(thing, "CDATA")
If test <> 0 Then
totalcdata = thing
Exit For
End If
x = x + 1
Next
articleid = Right(Mid(totalcdata, InStr(totalcdata, "wgArticleId"), 24), 9)
currentid = Right(Mid(totalcdata, InStr(totalcdata, "CurRevisionId"), 26), 9)
url = wikipath + "?title=" + title + "&diff=prev&oldid=" + (Right(currentid, 9))
CZ.navigate (url)
Do Until CZ.readyState = 4
Loop
Do
x = 0
Set tags = CZ.document.getElementsByTagName("a")
For Each Items In tags
thing = tags.Item(x).outerHTML
test = InStr(thing, "oldid")
If test <> 0 Then
latestid = oldid
oldid = Mid(thing, test + 6, 9)
Exit For
End If
x = x + 1
Next
If latestid <> oldid Then
x = 0
Set tags = CZ.document.getElementsByTagName("ins")
For Each Items In tags
thing = tags.Item(x).innerHTML
test = InStr(thing, "class=diffchange")
If thing <> Empty Then
diffclass = diffclass + "+" + "'" + thing + "'" + "; "
End If
x = x + 1
Next
totalwrite = title + " | " + articleid + " | " + latestid + " | " + diffclass + vbCrLf
'IO.File.AppendAllText(("c:\" + title + "_insdiffchange.txt"), totalwrite)
diffclass = Empty
x = 0
Set tags = CZ.document.getElementsByTagName("del")
For Each Items In tags
thing = tags.Item(x).innerHTML
test = InStr(thing, "class=diffchange")
If thing <> Empty Then
diffclass = diffclass + "-" + "'" + thing + "'" + "; "
End If
x = x + 1
Next
totalwrite = title + " | " + articleid + " | " + latestid + " | " + diffclass + vbCrLf
'IO.File.AppendAllText(("c:\" + title + "_deldiffchange.txt"), totalwrite)
diffclass = Empty
url = wikipath + "?title=" + title + "&diff=prev&oldid=" + oldid
CZ.navigate (url)
Do Until CZ.readyState = 4
Loop
End If
Loop While latestid <> oldid
End Function
Nutrition test
Nutrition Facts
|
Serving Size 2 pieces (3 g)
|
Servings Per Container 1000
|
|
Amount Per Serving
|
Calories 5
|
Calories from Fat 100
|
|
% Daily Value*
|
Total Fat 13g
|
20%
|
Saturated Fat 5g
|
10%
|
Cholesterol 30mg
|
10%
|
Sodium 660mg
|
28%
|
Total Carbohydrate 31g
|
10%
|
Dietary Fiber 0g
|
0%
|
Sugars 5g
|
Protein 5g
|
|
Vitamin A 4%
|
•
|
Vitamin C 2%
|
Calcium 15%
|
•
|
Iron 4%
|
|