User:Robert W King/Sandbox
Jump to navigation
Jump to search
Timeline
This happened (200 pixels wide)
this also happened during this time (400 pixels wide)
Another really long and drawn out thing happened as a result of the first thing. (400 pixels wide)
Another really long and drawn out thing happened as a result of the first thing. (400 pixels wide) Another really long and drawn out thing happened as a result of the first thing. (400 pixels wide)
This second thing happened (200 pixels wide)
|
Sort test
5
4
3
2
1
0
pl test
Hover over me!
CNW test
U and D test
PD table
Unpublished Works | |||||||||
Author type | Author status | Date of Death | Created date | Was it Published? | Has Copyright notice? | Is registered? | Is it a Corporate work? | When PD | As of 1 Jan 2008? |
Named | Dead | Before 1938 | n/a | n/a | no | no | Death + 70 yrs | yes | |
-- | Dead | Before 1938 | Before 1978 | After 2002 | n/a | no | Death + 70 years | Verify based on conditions | |
-- | Dead | Death unknown | Before 1888 | n/a | n/a | no | Creation + 120 yrs | yes | |
Anonymous | unknown | unknown | Before 1888 | n/a | n/a | no | no | Creation + 120 yrs | yes |
Pseudonymous | unknown | unknown | Before 1888 | n/a | n/a | no | no | Creation + 120 yrs | yes |
For hire/corporate | unknown | unknown | Before 1888 | n/a | n/a | no | yes | Creation + 120 yrs | yes |
Published Works | |||||||||
-- | -- | -- | -- | Before 1923 | n/a | yes | |||
-- | -- | -- | -- | 1923 -> 1977 | No CR notice | yes | |||
-- | -- | -- | -- | 1978 -> 1-Mar-1989 | No CR notice | no | yes | ||
-- | -- | -- | -- | 1923 -> 1963 | Yes, not renewed | yes | |||
Works published outside the US | |||||||||
-- | -- | -- | -- | Before 1923 | -- | yes | |||
-- | -- | -- | -- | 1923 -> 1977 | no | no | If in origin as of 1/1/96 | yes | |
-- | -- | -- | -- | After 1-Jan-1978 | no | no | If in origin as of 1/1/96 | yes |
VB Module for Extracting Contributions
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