مستخدم:LordAnubisCSB/code

من ويكيبيديا، الموسوعة الحرة

تنصيب البرنامج[عدل]

متطلبات[عدل]

ربطة التحميل[عدل]

يرجى استخدام الرابط المؤقت التالي:

يمكن تحميل البرنامج عن طريق تشغيل ملف: Setup.exe بعد فتح الملف المضغوط.


الكود[عدل]

الكود الرئيسي لبوت كشف الخروقات:[عدل]

''Variables

Option Explicit


''Used globally frequently as temp Winsock vars
Dim sDataParam As String 'WinSock data
Dim PostData As String 'Post or Get.etc, for winsock
Dim PageSource As String '''PageSource is the ultimate Winsock readout
Dim strHostWinSock As String 'host, default strWiki, could be Yahoo API

'''Form Load, and Global variables
Dim strWiki As String 'Wiki id
Dim strCookies As String '''Cookies from Login, used later to get edit tokens
Dim strPageName As String ''PageName to manipulate on the wiki
Dim strTag As String ''CSB tags, variable used in prepending various tags
Dim strTagMain As String ''CSB template to prepend to copyvio articles
Dim strTagWiki As String ' Wiki CSB template to prepend
Dim strLogPage As String ''Log page to log actions


''Yahoo Search variables
Dim strYahooURL As String
Dim strLocale As String '' Yahoo Locale, set in YahooAPI sub as "ar" by default
Dim strYahooAppID As String 'Yahoo App ID from API site
Dim strYahooQuery As String ''The query used to search
Dim blnNoresult As Boolean ''No result?
Dim strURLFound As String ''URL returned as found match
Dim blnYahooAPI As Boolean '' to control Winsock when Yahooing

''Encode/Decode vars
Public sCodePage As Long
Public cnvUni As String
Public cnvUni2 As String

''Page content (and eventually search term) stored in:
Dim strArticleContent As String

'''Edit Wiki article Function
''Wikipage content (retrieved) is stored in:
Dim strTextarea As String
Dim strET As String ' Edit Token
Dim strStarttime As String 'Starttime retrieved
Dim strEdittime As String 'Edittime retrieved
Dim strMore As String 'Starttime and Edittime combined
Dim strSummaryEdit As String ''Summary for edits



''-----LOAD ALL YOUR VARIABLES HERE----
Private Sub Form_Load()
''Our main encoding, normal for wiki: CP_UTF8
sCodePage = CP_UTF8

'''Main settings
strPageName = "User:LordAnubisCSB/test" ''emergency testing page
strWiki = "ar.wikipedia.org" ''native wiki, current support is for Arabic (tested) and English (not tested, but in theory).
strYahooAppID = "" ''Yahoo API ID from Yahoo Dev net.

strTagMain = "CSB" '''template to tag possible copyvio
strTagWiki = "CSBWiki" '''template to tag possible copy of wiki
strLogPage = "User:LordAnubisCSB/Log"

''''tags to make prog skip the page, aka Whitelist
lstSkipTags.AddItem "{{CSB"
lstSkipTags.AddItem "{{CSBWiki"
lstSkipTags.AddItem "{{خرق"


'''Preparing log, and date tagging it
txtLog.Text = Now & vbCr
txtLog.Text = txtLog.Text & "{|class=""wikitable sortable"" cellpadding=""1"" align=""center"" style=""border: 1px solid #88a; background: #f7f8ff; padding: 5px; font-size: 95%; text-align: center;""" & vbCr & "|- style=""background-color: #ccf""" & vbCr
txtLog.Text = txtLog.Text & Statementize2("|اسم الصفحة") & vbCr & Statementize2("|مصدر") & vbCr


End Sub
''----------END OF LOADING VARIABLES------------


''----Encoding/Decoding UTF8----''

Function EncodeUTF8(ByVal cnvUni As String)
    If cnvUni = vbNullString Then Exit Function
    EncodeUTF8 = StrConv(WToA(cnvUni, sCodePage, 0), vbUnicode)
End Function

Function DecodeUTF8(ByVal cnvUni As String)
    If cnvUni = vbNullString Then Exit Function
    cnvUni2 = WToA(cnvUni, CP_ACP)
    DecodeUTF8 = AToW(cnvUni2, sCodePage)
End Function

'''---End of Encoding/Decoding---


''------Yahoo API Programming-----
'''Yahoo API doesnt use Winsock, it uses a more efficient
'''and simpler controller called Internet Transfer Control. Downside: This controller doesnt Post/Get.


Sub YahooAPI(ByVal strYahooQuery As String)
strLocale = "ar"
strYahooQuery = """" + strYahooQuery + """"
strYahooURL = "http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=" + strYahooAppID + "&query=" + Statementize2(strYahooQuery) + "&results=1&language=" & strLocale


'''Initialise the Inet controller
PageSource = Inet1.OpenURL(strYahooURL)


Do While Inet1.StillExecuting
DoEvents
Loop


''If NOT "No results" then continue, otherwise (No results) go to Else
If InStr(PageSource, "totalResultsAvailable=""0""") = 0 Then


''Check we have no error. This error normally happens if our search area is empty.
''and this in turn happens if you have a short page, with long interwiki/cats

    If InStr(PageSource, "</Error>") <> 0 Then 'If we have error
        'MsgBox "Error in Yahoo Search"
        lstErrorLog.AddItem lstArticles.List(0)
        strURLFound = ""
        Debug.Print PageSource ''Print string in debug window
        Exit Sub
    End If

strURLFound = PageSource

''------Get Cached pages ----------
'''''I HAVE DISABLED THIS FOR NOW, IT IS CAUSING PROBLEMS, and is not worth the effort.
'''We aim to get the Cached sources: BUT:
''some stupid links arent cached on yahoo, so need if err-handler
'If InStr(strURLFound, "<Cache>") <> 0 Then 'if its cached
'strURLFound = Right(strURLFound, Len(strURLFound) - InStr(strURLFound, "<Cache>") - 6)
'strURLFound = Left(strURLFound, InStr(strURLFound, "</Cache>") + 1)
'End If '' By now we should have the cached URL in variable
''''---End of Get cached URL ----


'Now, if we have cached URLs, we extract it. If not, we extract the normal URL
strURLFound = Right(strURLFound, Len(strURLFound) - InStr(strURLFound, "<Url>") - 4)

''Error handler: could have InStr equal to zero, and then -1 will be undefined
If InStr(strURLFound, "</Url>") = 0 Then
MsgBox "Error Code 202!" 'just a random code for me to detect
Debug.Print strURLFound
Exit Sub
End If


strURLFound = Left(strURLFound, InStr(strURLFound, "</Url>") - 1)

''Format it, make it UTF8 and replace some crap with some good.
strURLFound = DecodeUTF8(strURLFound)
strURLFound = Replace(strURLFound, "&gt;", ">")
strURLFound = Replace(strURLFound, """, """")
strURLFound = Replace(strURLFound, "&amp;", "&")


'''Binary Comparison: This is to compare the summary given back by yahoo to our search term.
'''If match is less than 90% (significance threshold), then give no result back.
' YahooBinaryCompare
'''I canceled this because the extracted Yahoo summary cant always match ALL (90%) of the search term. Sub is still available though.





Else ''If there's genuinely no results

    strURLFound = ""

End If

     





End Sub



''---End of Yahoo API Programming---


'' --------- Winsock Programming ----------
Sub WinSockCon(Optional ByVal strHostWSock As String = "Null")
''Default, host is wiki, but maybe for the sake of YahooAPI, if u use WinSock for it.
If strHostWSock = "Null" Then
    strHostWSock = strWiki
End If

strHostWinSock = strHostWSock ''same host, will be used later


Winsock1.Connect strHostWinSock, 80
End Sub



Private Sub Winsock1_Connect()

'''sDataParam specifies the page, whether Get or Post
''''eg: sDataParam = strPOSTGET & " /w/index.php?title=" & newstrquery & "&action=edit"

'''PostData specifies whether any data is to be posted.

sDataParam = sDataParam & " HTTP/1.0" & vbCrLf & _
       "Host: " & strHostWinSock & vbCrLf & _
       "User-Agent: :ar:User:LordAnubisCSB/1.0" & vbCrLf & _
       "Accept: text/*,application/*,image/*" & vbCrLf & _
       "Accept-Language: en-us;en" & vbCrLf & _
       "Connection: Close" & vbCrLf & _
       strCookies & _
       "Referer: " & "http://ar.wikipedia.org" & vbCrLf & _
       "Content-type: application/x-www-form-urlencoded" & vbCrLf & _
       "Content-Length: " & Len(PostData) & vbCrLf & _
       vbCrLf & _
       PostData & vbCrLf
       


Winsock1.SendData sDataParam
       
End Sub

Private Sub Winsock1_Close()
Winsock1.Close
End Sub


Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
'We put the pagesource into a string
Dim Data As String

Winsock1.GetData Data, vbString
PageSource = PageSource & Data

'''PageSource is the ultimate Winsock readout
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
MsgBox "Error: Could not establish connection to host:" & vbCrLf & _
       "Connection Error: " & Description
End Sub


'------------------------------- End of Winsock -----


Private Sub cmdAuto_Click()
lblStatus.Caption = "Status: In progress..."

''to do once

If Len(Trim(txtUsername)) = 0 Or Len(Trim(txtPassword)) = 0 Then '''if user forgot to input username and password.
MsgBox "Username/Password are not entered"

lblStatus.Caption = "Status: Idle"
Exit Sub
End If


cmdLogin_Click 'login
CmdNewPages_Click 'get new pages

''to repeat for all items in list
Do While lstArticles.ListCount > 0

CmdGetFirstItem_Click 'get first item in list's content
DoEvents

    If Len(strArticleContent) < 300 Then     ''if article is too short
         Text1.Text = "Too short"
         GoTo stepSkip
    End If

'''Process all tags to be skipped
Dim i As Integer
For i = 1 To lstSkipTags.ListCount
    If InStr(strArticleContent, lstSkipTags.List(i - 1)) > 0 Then '''if article is already tagged by either tags
        Text1.Text = "Already tagged"
        GoTo stepSkip
    End If
Next
    
    
    
cmdGetChunk_Click 'get a random middle chunk for search
DoEvents

cmdNormalise_Click 'normalise it
DoEvents

cmdYahooFind_Click 'look for it on yahooAPI
DoEvents

    If strURLFound = "" Then ''If there are no results
         Text1.Text = "No results"
         GoTo stepSkip
    End If

cmdPrependtoWiki_Click 'tag if necessary
DoEvents

stepSkip:

cmdDelListItem_Click 'delete from list
DoEvents
Loop

''to give the log page one last format at the end:
cmdFormatLog_Click


lblStatus.Caption = "Status: All complete"

End Sub

Private Sub cmdDelListItem_Click()
If lstArticles.ListCount <> 0 Then
lstArticles.RemoveItem 0
End If

End Sub



Private Sub cmdLogin_Click()


sDataParam = "POST" & " /w/index.php?title=Special:Userlogin&action=submitlogin&type=login"
PostData = "wpName=" & txtUsername.Text & "&wpPassword=" & txtPassword.Text & "&wpRemember=1" & "&wpLoginattempt=Log+in"
WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop

'''Once we request to login, we need to extract cookies
strCookies = PageSource
strCookies = Right(strCookies, Len(strCookies) - InStr(strCookies, "Set-Cookie:") + 1)
strCookies = Left(strCookies, InStr(strCookies, "Vary:") - 1)
strCookies = Replace(strCookies, "Set-Cookie", "Cookie")

''Now we have cookies and should be "logged in", well, sort of.
Text1.Text = "Should be logged in now " & vbCr & strCookies
End Sub

Private Sub CmdNewPages_Click()
''change rclimit to however many pages u wanna work on
sDataParam = "GET" & " /w/api.php?action=query&list=recentchanges&rclimit=" + Trim(Str(Val(txtNoofPages))) + "&rcnamespace=0&rctype=new&format=xml" ''get the number of pages to work on from the txtNoofPages
PostData = ""
PageSource = ""

WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop

'''Now we should have new pages in one string, PageSource


Dim strListTemp As String ''temp var to store everything and to 'temp var to store listitems (new pages) in


strListTemp = PageSource


''parse xml titles
Do While InStr(strListTemp, "title=") <> 0
Dim position2 As Integer ''temp var

position2 = InStr(strListTemp, "title=") + 6 ''title start in xml
strListTemp = Right(strListTemp, Len(strListTemp) - position2) ''everything after title start
position2 = InStr(strListTemp, "rcid=") - 3 ''title end in xml



lstArticles.AddItem DecodeUTF8(Replace(Replace(Replace(Left(strListTemp, position2), "'", "'"), """, """"), "&amp", "&"))
''Cool eh? It basically just adds the title to a list replacing crap chars

DoEvents ''so it doesnt freeze
Loop

''Now should have all new pages in the list

End Sub

Private Sub CmdGetFirstItem_Click()
If lstArticles.ListCount = 0 Then
    MsgBox "No Items to work on !"
    End
Else
'''Get Page title (First item on list), and url-encode it
    strPageName = Statementize2(lstArticles.List(0))
    
    
'''Get Page

sDataParam = "GET" & " /w/api.php?action=query&prop=revisions&titles=" + Trim(strPageName) + "&rvprop=content&rvlimit=1&format=xml"
PostData = ""
PageSource = ""
WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop


Dim position1 As Integer ''temp var
position1 = 0
position1 = InStr(PageSource, "<rev>") + 4
PageSource = Right(PageSource, Len(PageSource) - position1)
position1 = 0
On Error Resume Next
position1 = InStr(PageSource, "</rev>") - 1

''err handler, if page does not exist for one reason or another (possible delete by sysop)
''or if there's an error and content aren't available
If position1 = -1 Then
    MsgBox "Error, no content in page " & strPageName & "." & vbCrLf & "Click ok to continue"
    lstArticles.RemoveItem 0 ''remove current item
    CmdGetFirstItem_Click ''rework on the next item
    Exit Sub ''and continue
End If


PageSource = Left(PageSource, position1)

PageSource = Replace(PageSource, """, """")

'''Deal with page contents
    If Len(PageSource) < 600 Then
     Text1.Text = "Too short"

     '' do some exiting and stuff
     lstArticles.RemoveItem 0
     'Command3_Click ' repeat
     Exit Sub
    End If
    
    
    
    Dim i As Integer
   ''' tags that will make us skip the page
    For i = 1 To lstSkipTags.ListCount
    If InStr(PageSource, lstSkipTags.List(i - 1)) Then
        '''skipping article cuz it is already tagged
        lstArticles.RemoveItem 0
        Text1.Text = "Tagged with: " & lstSkipTags.List(i - 1)
        Exit Sub
        ''Command3_Click repeat
    End If
    Next
End If


strArticleContent = DecodeUTF8(PageSource)

Text1.Text = "I got 'em"
End Sub


Private Sub cmdGetChunk_Click()

strArticleContent = Right(strArticleContent, Len(strArticleContent) / 1.1)   'to get some text from around the middle
strArticleContent = Left(strArticleContent, 130)  'to get some text from around the middle
strArticleContent = Right(strArticleContent, Len(strArticleContent) - InStr(strArticleContent, " "))
strArticleContent = Left(strArticleContent, InStr(Len(strArticleContent) - 10, strArticleContent, " "))

Text1.Text = "Got Chunk:" & vbCr & strArticleContent
End Sub

Private Sub cmdMimick_Click()
'strArticleContent = "æíßíÈíÏíÇ"
'Text1.Text = strArticleContent
'lstArticles.AddItem "ßÇáßí"
strPageName = "User:LordAnubisCSB/test"
End Sub

Private Sub cmdNormalise_Click()
strArticleContent = normalisewikitext(strArticleContent)

Text1.Text = "Normalised Successfully:" & vbCr & strArticleContent
End Sub

Private Sub cmdYahooFind_Click()
YahooAPI (strArticleContent)
'strURLFound = DecodeUTF8(strURLFound)
Text1.Text = "Found: " & vbCr & strURLFound
End Sub

Private Sub cmdPrependtoWiki_Click()
''use strPageName, it has the name of the copyvio page


'''First, get the existing page, parse tokens..etc..
sDataParam = "GET" & " /w/index.php?title=" & strPageName & "&action=edit"
PostData = ""
PageSource = ""
WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop


'''Now we should have the original article text from Wiki in strTextArea

GetTokens

'''Set Summary and Tag to use
strSummaryEdit = "Marking possible copyvio"
strTag = "{{" + strTagMain + "|1=" + Trim(strURLFound) + "}}"
strTag = Replace(strTag, "http://", "")
strTag = Statementize2(strTag) + vbCr

If InStr(strURLFound, "wikipedia") Then
strSummaryEdit = "Marking copy page from another wiki article"
strTag = "{{" + strTagWiki + "|1=" + Trim(strURLFound) + "}}"
strTag = Replace(strTag, "http://", "")
strTag = Statementize2(strTag) + vbCr
End If

''''ok, now we have Tags, Tokens, and Summary

'''Now Edit and tag the page
sDataParam = "POST" & " /w/index.php?title=" & strPageName & "&action=submit"
PostData = "wpSection=" & "&wpSummary=" & strSummaryEdit & "&wpSave=wpSave" & "&wpEditToken=" & strET & strMore & "&wpTextbox1=" & strTag & strTextarea
WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop

'''By Now it should've edited the page and saved it
''--------------

'''Now add to log page, similar process

'sDataParam = "GET" & " /w/index.php?title=" & strLogPage & "&action=edit"
'PostData = ""
'PageSource = ""
'WinSockCon


'Do Until Winsock1.State = 0
'DoEvents
'Loop
'''Now we should have the original Logpage from Wiki in strTextArea

'GetTokens




'strSummaryEdit = "Adding the copyvio page to Log"


''error handler/diagnostic, should log an error on the logpage
If lstArticles.ListCount = 0 Then
lstArticles.AddItem "ÎØÃ"
lstArticles.AddItem "English"
lstArticles.AddItem "ÚÑÈí"
End If

''borrow the strTag variable
'strTag = "*{{URL|1=" + strWiki + "/wiki/" + Statementize2(Replace(lstArticles.List(0), " ", "_")) + " " + strPageName + "}}" + vbCrLf + vbCrLf + "**{{From}} {{URL|1=" + Replace(strURLFound, "http://", "") + "}}" + vbCrLf + vbCrLf
strTag = "|-" & vbCr & "|[[" + lstArticles.List(0) + "]]" + vbCrLf + "|{{From}} [" + strURLFound + "]"


If InStr(strURLFound, "wikipedia") Then
'strSummaryEdit = "Adding the wiki copy to Log"
'strTag = "*{{URL|1=" + strWiki + "/wiki/" + Statementize2(Replace(lstArticles.List(0), " ", "_")) + " " + strPageName + "}}" + vbCrLf + vbCrLf + "**{{Is a wiki copy from}} {{URL|1=" + Replace(strURLFound, "http://", "") + "}}" + vbCrLf + vbCrLf
strTag = "|-" & vbCr & "|[[" + lstArticles.List(0) + "]]" + vbCrLf + "|{{Is a wiki copy from}} [" + strURLFound + "]"
End If

'strTag = Statementize2(strTag)

'sDataParam = "POST" & " /w/index.php?title=" & strLogPage & "&action=submit"
'PostData = "wpSection=" & "&wpSummary=" & strSummaryEdit & "&wpSave=wpSave" & "&wpEditToken=" & strET & strMore & "&wpTextbox1=" & strTextarea & strTag
'PageSource = ""
'WinSockCon

'Do Until Winsock1.State = 0
'DoEvents
'Loop

txtLog.Text = txtLog.Text + vbCrLf + Statementize2(strTag)

'''Done
Text1.Text = "All Done"

End Sub

Sub GetTokens()


strTextarea = Right(PageSource, Len(PageSource) - InStr(PageSource, "<textarea"))
strTextarea = Right(strTextarea, Len(strTextarea) - InStr(strTextarea, ">"))
strTextarea = Left(strTextarea, InStr(strTextarea, "</textarea") - 1)
strTextarea = Replace(strTextarea, "&lt;", "<")
strTextarea = Replace(strTextarea, "&gt;", ">")
strTextarea = Replace(strTextarea, """, """")
strTextarea = Replace(strTextarea, "&amp;", "&")



'''Find edit token and put in StrET
strET = Left(PageSource, InStr(PageSource, "name=""wpEditToken"" />") - 1)
Do While InStr(strET, "<input type='hidden' value=""") > 0
strET = Right(strET, Len(strET) - InStr(strET, "<input type='hidden' value="""))
Loop
strET = Right(strET, Len(strET) - InStr(strET, "value=") - 5) ''once more to filter
strET = Trim(Replace(strET, """", ""))

''url-encode it
strET = Statementize2(strET)

''Get Starttime, Endtime and put them in one var (strMore)



strStarttime = Left(PageSource, InStr(PageSource, "name=""wpStarttime"" />") - 1)
Do While InStr(strStarttime, "<input type='hidden' value=""") > 0
strStarttime = Right(strStarttime, Len(strStarttime) - InStr(strStarttime, "<input type='hidden' value="""))
Loop
strStarttime = Right(strStarttime, Len(strStarttime) - InStr(strStarttime, "value=") - 5) ''once more to filter artifacts
strStarttime = Trim(Replace(strStarttime, """", ""))

strEdittime = Left(PageSource, InStr(PageSource, "name=""wpEdittime"" />") - 1)
Do While InStr(strEdittime, "<input type='hidden' value=""") > 0
strEdittime = Right(strEdittime, Len(strEdittime) - InStr(strEdittime, "<input type='hidden' value="""))
Loop
strEdittime = Right(strEdittime, Len(strEdittime) - InStr(strEdittime, "value=") - 5) ''once more to filter artifacts
strEdittime = Trim(Replace(strEdittime, """", ""))

strMore = "&wpStarttime=" & strStarttime & "&wpEdittime=" & strEdittime

End Sub

Private Sub cmdFormatLog_Click()
''get Log page tokens
sDataParam = "GET" & " /w/index.php?title=" & strLogPage & "&action=edit"
PostData = ""
PageSource = ""
WinSockCon


Do Until Winsock1.State = 0
DoEvents
Loop
'''Now we should have the original Logpage from Wiki in strTextArea

GetTokens


strTag = vbCr & "|}." + vbCrLf
sDataParam = "POST" & " /w/index.php?title=" & strLogPage & "&action=submit"
PostData = "wpSection=" & "&wpSummary=" & "Bot done" & "&wpSave=wpSave" & "&wpEditToken=" & strET & strMore & "&wpTextbox1=" & strTextarea & txtLog & strTag ''to fix some flaw in the conversion
PageSource = ""
WinSockCon

Do Until Winsock1.State = 0
DoEvents
Loop

Text1.Text = "Log updated"
End Sub


Sub YahooBinaryCompare()
'strYahooQuery
PageSource = Left(PageSource, InStr(PageSource, "</Summary>") - 1)
PageSource = Right(PageSource, Len(PageSource) - InStr(PageSource, "<Summary>") - 8)
PageSource = DecodeUTF8(PageSource)
PageSource = Replace(PageSource, ".", "") ''remove all dots

strArticleContent = Replace(strArticleContent, ".", "") ''same, remove all dots.

Dim binPagesource() As String
binPagesource = Split(PageSource, Chr(32)) ''split words on a word-by-word basis in a binary var.

Dim binpagesource2() As String
binpagesource2 = Split(strArticleContent, Chr(32))

Dim i As Integer, j As Integer, intMatch As Integer, intNomatch As Integer

For i = 1 To UBound(binPagesource)
    intNomatch = intNomatch + 1
    For j = 1 To UBound(binpagesource2)
        If binPagesource(i - 1) = binpagesource2(j - 1) Then
            intMatch = intMatch + 1
            intNomatch = intNomatch - 1
            Exit For
        End If
    Next
Next

If intNomatch > 0 And intMatch / (intMatch + intNomatch) < 0.9 Then ''give ourselves 90% binary significance
    strURLFound = ""
End If
End Sub

الكودات الفرعية/الثانوية[عدل]

يتم استخدام كود مشابه جداً من أجل تدقيق كل الصفحات الموجودة على الويكي بطريقة عشوائية، يتم هذا بعمل بعض التغييرات البسيطة من ضمنها تغيير جلب الصفحات الجديدة:

sDataParam = "GET" & " /w/api.php?action=query&list=random&rnlimit=" + Trim(Str(Val(txtNoofPages))) + "&rnnamespace=0&format=xml" ''get the number of pages to work on from the txtNoofPages


أما بالنسبة للكودات الثانوية التي يتم إستخدامها فهناك عدد منها وهم:

  • DecodeUTF8/EncodeUTF8 يقومون بعمليات لوغارثمية تقوم بتحويل الكتابات من وإلى تشفير يو تي إف 8 (وهو المستخدم على ويكيبيديا العربية)
  • HextoDec، كود صغير قمت بكتابته بنفسي يقوم بتحويل رقم الهيكسا إلى رقم عشري.
  • Statementize2/Statementize، كود بسيط (وربما غبي بعض الشيء) قمت بعمله بنفسي، يقوم بتحويل الكتابة العربية إلى url-encode، لكي يستطيع الياهوو وويكيبيديا العربية قراءتهم.
  • normalisewikitext، كود يقوم بإزالة الأقواس وعبارات الويكي.

ملفات المصدر[عدل]

سوف أقوم بتحميل هذه الملفات لاحقاً لكي يتمكن المستخدمين من تطويرها.