DotNetWikiBot Framework Documentation

The PageList type exposes the following members.

Methods

  NameDescription
Public methodAdd
This function adds specified page to the end of this PageList.
Public methodAddTemplate
Adds a specified template to the end of all pages in PageList.
Public methodAddToCategory
Adds all pages in PageList to the specified category by adding links to that category in pages texts.
Public methodClear
Removes all pages from PageList.
Public methodComparePagesByTitles
Compares pages by titles in language-specific manner. This is required to compare titles in Japanese, Chinese, etc. properly
Public methodContains(String)
This function returns true, if a page with specified title exists in this PageList. This function corrects all namespace prefixes in this PageList before comparison.
Public methodContains(Page)
This function returns true, if this PageList contains page with the same title and same revision ID with page passed as a parameter. Before comparison this function corrects all namespace prefixes in this PageList and in title of Page passed as a parameter.
Public methodCorrectNsPrefixes
Function changes default English namespace prefixes to correct local prefixes (e.g. for German wiki-sites it changes "Category:..." to "Kategorie:...").
Public methodCount
This function returns the number of pages in PageList.
Public methodFillAllFromCategory
This function fills this PageList with pages from specified category page, subcategories are also included.
Public methodFillAllFromCategoryTree
Gets all levels of subcategories of some wiki category (that means subcategories, sub-subcategories, and so on) and fills this PageList with titles of all pages, found in all levels of subcategories. The multiplicates of recurring pages are removed. Subcategory pages are included. This operation may be very time-consuming and traffic-consuming. The function clears the PageList before filling begins.
Public methodFillAndLoadFromFiles
Gets page titles and page texts from all ".txt" files in the specified directory (folder). Each file becomes a page. Page titles are constructed from file names. Page text is read from file contents. If any Unicode numeric codes (also known as numeric character references or NCRs) of the forbidden characters (forbidden in filenames) are recognized in filenames, those codes are converted to characters (e.g. "|" is converted to "|").
Public methodFillAndLoadFromXmlDump
Gets page titles and page text from local XML dump. This function consumes much resources.
Public methodFillFromAllPages(String, Int32, Boolean, Int32)
Gets page titles for this PageList from "Special:Allpages" MediaWiki page. That means a list of pages in alphabetical order.
Public methodFillFromAllPages(String, Int32, Boolean, Int32, String)
Gets page titles for this PageList from "Special:Allpages" MediaWiki page. That means a list of pages in alphabetical order.
Public methodFillFromCategory
Fills this PageList with pages from specified category page. Subcategories are not included, call FillAllFromCategory(String) function instead to get category contents with subcategories.
Public methodFillFromCategoryTree
Gets all levels of subcategories of some wiki category (that means subcategories, sub-subcategories, and so on) and fills this PageList with titles of all pages, found in all levels of subcategories. The multiplicates of recurring pages are removed. Subcategory pages are excluded from resultant list, call FillAllFromCategoryTree(String) function instead to get PageList with subcategories on board. This operation may be very time-consuming and traffic-consuming. The function clears the PageList before filling begins.
Public methodFillFromChangedWatchedPages
Gets page titles for this PageList from list of recently changed watched articles (watched by bot account). The function does not internally remove redirecting pages from the results. Call RemoveRedirects()()()() manually, if you need it. And the function neither filters namespaces, nor clears the existing PageList, so new titles will be added to the existing in PageList.
Public methodFillFromCustomApiQuery
Gets page titles for this PageList from results of specified custom API query. Not all queries are supported and can be parsed automatically. The function does not clear the existing PageList, so new titles will be added to existing.
Public methodFillFromCustomLog
Gets page titles for this PageList from specified MediaWiki events log. The following logs are supported: block, protect, rights, delete, upload, move, import, patrol, merge, suppress, review, stable, spamblacklist, gblblock, renameuser, globalauth, gblrights, abusefilter, newusers. The function does not filter namespaces and does not clear the existing PageList, so new pages will be added to existing pages.
Public methodFillFromCustomSpecialPage
Gets page titles for this PageList from specified special page. The following special pages are supported (other were not tested): Ancientpages, BrokenRedirects, Deadendpages, Disambiguations, DoubleRedirects, Listredirects, Lonelypages, Longpages, Mostcategories, Mostimages, Mostlinkedcategories, Mostlinkedtemplates, Mostlinked, Mostrevisions, Fewestrevisions, Shortpages, Uncategorizedcategories, Uncategorizedpages, Uncategorizedimages, Uncategorizedtemplates, Unusedcategories, Unusedimages, Wantedcategories, Wantedfiles, Wantedpages, Wantedtemplates, Unwatchedpages, Unusedtemplates, Withoutinterwiki. The function doesn't filter namespaces and does not clear PageList, so new pages will be added to existing pages.
Public methodFillFromFile
Gets page titles from UTF8-encoded file. Each title must be on a new line. The function does not clear the existing PageList, new pages will be added.
Public methodFillFromGoogleSearchResults
Gets page titles for this PageList from Google search results. The function gets pages of all namespaces and it does not clear the existing PageList, so new pages will be added.
Public methodFillFromLinksToPage
Gets titles of pages which link to specified page. Results include redirects, call RemoveRedirects()()()() to get rid of them. The function does not clear the existing PageList, so new titles will be added.
Public methodFillFromPageHistory
Gets page history and fills this PageList with specified number of recent page revisions. Pre-existing pages will be removed from this PageList. Only revision identifiers, user names, timestamps and comments are loaded, not the texts. Call Load()()()() to load the texts of page revisions. PageList[0] will be the most recent revision.
Public methodFillFromPageLinks
Gets page titles for this PageList from links in some wiki page. All links will be retrieved, from all namespaces, except interwiki links to other sites. Use FilterNamespaces(array<Int32>[]()[][]) or RemoveNamespaces(array<Int32>[]()[][]) function to remove pages from unwanted namespaces (categories, images, etc.)
Public methodFillFromPagesUsingImage
Gets titles of pages, in which the specified image file is included. Function also works with non-image files.
Public methodFillFromRecentChanges
Gets page titles for this PageList from recent changes page, "Special:Recentchanges". File uploads, page deletions and page renamings are not included, use FillFromCustomLog(String, String, String, Int32) function instead to fill from respective logs. The function does not clear the existing PageList, so new titles will be added. Use FilterNamespaces(array<Int32>[]()[][]) or RemoveNamespaces(array<Int32>[]()[][]) functions to remove pages from unwanted namespaces.
Public methodFillFromSearchResults
Gets page titles for this PageList from site's internal search results. The function does not filter namespaces. And the function does not clear the existing PageList, so new titles will be added.
Public methodFillFromTransclusionsOfPage
Gets titles of pages which transclude (embed) the specified page. The function does not clear the existing PageList, so new titles will be added.
Public methodFillFromUserContributions
Gets page titles for this PageList from user contributions of specified user. The function does not remove redirecting pages from the results. Call RemoveRedirects()()()() manually, if you require it. And the function does not clears the existing PageList, so new titles will be added.
Public methodFillFromWatchList
Gets page titles for this PageList from watchlist of bot account. The function does not remove redirecting pages from the results. Call RemoveRedirects()()()() manually, if you need that. And the function neither filters namespaces, nor clears the existing PageList, so new titles will be added to the existing in PageList.
Public methodFilterNamespaces
Removes pages that are not in the given namespaces.
Public methodGetEnumerator
This function allows to iterate over Page objects in this PageList using "foreach" loop.
Public methodGetPage
This function allows to access individual pages in this PageList. But it's better to use simple pageList[i] syntax.
Public methodInsert
Inserts an element into this PageList at the specified index.
Public methodIsEmpty
Shows if there are any Page objects in this PageList.
Public methodLoad
Loads text for pages in PageList from site via common web interface. Please, don't use this function when going to edit big amounts of pages on popular public wikis, as it compromises edit conflict detection. In that case, each page's text should be loaded individually right before its processing and saving.
Public methodProtect
Protects or unprotects all pages in this PageList, so only chosen category of users can edit or rename it. Changing page protection modes requires administrator (sysop) rights on target wiki.
Public methodRemove
Removes a page with specified title from this PageList.
Public methodRemoveAll
Removes all pages from PageList.
Public methodRemoveDisambigs
Removes all disambiguation pages from PageList. But firstly don't forget to load the pages from site using Load()()()().
Public methodRemoveEmpty
Removes all empty pages from PageList. But firstly don't forget to load the pages from site using pageList.LoadWithMetadata().
Public methodRemoveFromCategory
Removes all pages in PageList from specified category by deleting links to that category in pages texts.
Public methodRemoveNamespaces
Removes the pages, that are in given namespaces.
Public methodRemovePage
Removes page at specified index from PageList.
Public methodRemoveRecurring
Removes all recurring pages from PageList. Only one page with some title will remain in PageList. This makes all page elements in PageList unique.
Public methodRemoveRedirects
Removes all redirecting pages from PageList. But firstly don't forget to load the pages from site using Load()()()().
Public methodRemoveTemplate
Removes a specified template from all pages in PageList.
Public methodResolveRedirects
For all redirecting pages in this PageList, this function loads the titles and texts of redirected-to pages.
Public methodRevert
Undoes the last edit of every page in this PageList, so every page text reverts to previous contents. The function doesn't affect other operations like renaming.
Public methodSave()()()()
Saves all pages in PageList to live wiki site. Uses defaultEditComment and minorEditByDefault settings. This function doesn't limit the saving speed, so in case of working on public wiki, it's better to use SaveSmoothly()()()() function in order to decrease server load.
Public methodSave(String, Boolean)
Saves all pages in PageList to live wiki site. This function doesn't limit the saving speed, so in case of working on public wiki it's better to use SaveSmoothly(Int32, String, Boolean) function in order to decrease server load.
Public methodSaveSmoothly()()()()
Saves all pages in PageList to live wiki site. The function waits for forceSaveDelay seconds (or for 5 seconds if forceSaveDelay equals zero, the default) between each page save operation in order to decrease server load. It uses defaultEditComment and minorEditByDefault settings.
Public methodSaveSmoothly(Int32)
Saves all pages in PageList to live wiki site. The function waits for specified number of seconds between each page save operation in order to decrease server load. It uses defaultEditComment and minorEditByDefault settings.
Public methodSaveSmoothly(Int32, String, Boolean)
Saves all pages in PageList to live wiki site. The function waits for specified number of seconds between each page save operation in order to decrease server load.
Public methodSaveTitlesToFile
Saves titles of all pages in PageList to the specified file. Each title on a separate line. If the target file already exists, it is overwritten.
Public methodSaveToFiles
Saves the contents of all pages in pageList to ".txt" files in specified directory. Each page is saved to separate file, the name of that file is constructed from page title. Forbidden characters in filenames are replaced with their Unicode numeric codes (also known as numeric character references or NCRs). If the target file already exists, it is overwritten.
Public methodSaveXmlDumpToFile
Loads the contents of all pages in this pageList from live wiki site via XML export interface and saves the retrieved XML content to the specified file. The functions just dumps data, it does not load pages in PageList itself, call Load()()()() or FillAndLoadFromXmlDump(String) to do that. Note that on some sites MediaWiki messages from standard namespace 8 are not available for export.
Public methodSetPageAtIndex
This function allows to set individual pages in this PageList. But it's better to use simple pageList[i] syntax.
Public methodShowTexts
Sends texts of all contained pages to console.
Public methodShowTitles
Sends titles of all contained pages to console.
Public methodSort
This function sorts all pages in PageList by titles.
Public methodUnwatch
Removes all pages in this PageList from bot account's watchlist.
Public methodWatch
Adds all pages in this PageList to bot account's watchlist.

See Also