C# 클래스 WikiFunctions.Tools

Provides various tools as static methods, such as getting the html of a page
파일 보기 프로젝트 열기: reedy/AutoWikiBrowser 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Diacritics string[][]
SortKeyChars string[][]
WriteDebugEnabled bool

공개 메소드들

메소드 설명
AllCaseInsensitive ( string input ) : string

Returns a regex case insensitive version of an entire string e.g. "Category" returns "[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]"

AppendParameterToTemplate ( string templateCall, string parameter, string newValue ) : string

Appends the input parameter and value to the input template

AppendParameterToTemplate ( string templateCall, string parameter, string newValue, bool unspaced ) : string

Appends the input parameter and value to the input template Determines whether to put parameter on newline, and whether to put space after pipe based on existing template parameters' formatting

ApplyKeyWords ( string title, string text ) : string

Applies the key words "%%title%%" etc. https://meta.wikimedia.org/wiki/Help:Magic_words

ApplyKeyWords ( string title, string text, bool escape ) : string

Applies the key words "%%title%%" etc. https://meta.wikimedia.org/wiki/Help:Magic_words

BasePageName ( string title ) : string

Works like MediaWiki's {{BASEPAGENAME}} by retrieving page's parent name

Beep ( ) : void

Beeps

BuildPostDataString ( NameValueCollection postvars ) : string

Converts a NameValueCollection of parameter names and values into an API command string

CaseInsensitive ( string input ) : string

Returns a regex case insensitive version of a string for the first letter only e.g. "Category" returns "[Cc]ategory"

CaseInsensitiveStringCompare ( string one, string two ) : bool

Case-Insensitive String Comparison

CleanSortKey ( string defaultsort ) : string

Cleans sortkeys: removes diacritics, except for ru, fr, pl wikis Cleans up/removes specific characters per WP:SORTKEY

ConvertDate ( string inputDate, Parsers locale ) : string

Returns the input date in the requested format (American or International). If another Locale is passed in the input date is returned. For en-wiki only.

ConvertDate ( string inputDate, Parsers locale, bool AmericanInputDate ) : string

Returns the input date in the requested format (American or International). If another Locale is passed in the input date is returned. For en-wiki only.

ConvertFromLocalLineEndings ( string input ) : string

Converts all line endings to \n

ConvertFromTalk ( List
list ) : List

Turns a list of talk pages into a list of the associated articles.

ConvertFromTalk ( Article a ) : string

Turns a talk page into its associated article

ConvertFromTalk ( string a ) : string

Turns a talk page into its associated article

ConvertNamespace ( List
list, int NewNamespace ) : List

Turns a list of pages into a list of pages in the input namespace Does not convert Special pages

ConvertNamespace ( Article a, int NewNamespace ) : string

Turns a list of pages into a list of pages in the input namespace Does not convert Special pages

ConvertToLocalLineEndings ( string input ) : string

Converts all line endings are the environment default

ConvertToTalk ( List
list ) : List

Turns a list of articles into an list of the associated talk pages.

ConvertToTalk ( Article a ) : string

Turns an article into its associated talk page

ConvertToTalk ( string a ) : string

Turns an article into its associated talk page

Copy ( ListBox box ) : void

Copy selected items from a listbox

Copy ( ListView view ) : void

Copy selected items from a listview

CopyToClipboard ( object data, bool copy ) : void

Wrapper function for setting text to clipboard. Clears clipboard and waits before continuing

CopyToClipboard ( string text ) : void

Wrapper function for setting text to clipboard. Clears clipboard and waits before continuing

DateBeforeToday ( string date ) : bool

Attempts to parse the input string as a date, if parsed returns whether the date is before the system date Otherwise returns false

DatesCount ( string text ) : int>.Dictionary

Counts the number of dates of International/American/ISO format in the text

DeduplicateList ( List input ) : List

Returns a dediplicated list, using .NET 3.5 Distinct() function if available

DuplicateTemplateParameters ( string templatecall ) : int>.Dictionary

Returns duplicate named parameters in a template call

DuplicateWikiLinks ( string text ) : List

Returns a sorted list of duplicate wikilinks in the input text (links converted to first letter upper) in format: name (count)

EditArticleInBrowser ( string title ) : void

Opens the specified articles edit page

ExpandTemplate ( string articleText, string articleTitle, string>.Dictionary regexes, bool includeComment ) : string

Expands (substitutes) template calls using the API

FilterSomeArticles ( List
unfilteredArticles ) : List

Filter out articles which we definitely do not want to edit and remove duplicates. (Filters MediaWiki (and talk) NS, Commons, and where NS is less than 0)

FirstChars ( string str, int count ) : string

Returns substring at the start of a given string

FirstDifference ( string a, string b ) : int

Returns index of first character different between strings

FirstToUpperAndRemoveHashOnArray ( string input ) : string[]

FixupDefaultSort ( string s ) : string

Removes recognised diacritics and double quotes, converts to Proper Case per [[WP:CAT]]

FixupDefaultSort ( string defaultsort, bool isArticleAboutAPerson ) : string

Removes recognised diacritics and double quotes, converts to Proper Case per [[WP:CAT]]

FlashWindow ( Control window ) : void

Flashes the given form in the taskbar

GetDomain ( string url ) : string

Returns the domain name from a URL e.g. bbc.co.uk from http://www.bbc.co.uk/1212

GetHTML ( string url ) : string

Gets the HTML from the given web address.

GetHTML ( string url, Encoding enc ) : string

Gets the HTML from the given web address.

GetHTML ( string url, Encoding enc, string &responseURL ) : string

Gets the HTML from the given web address.

GetHTML ( string url, string &responseURL ) : string

Gets the HTML from the given web address.

GetMd5Sum ( string input ) : string

Calculates md5sum of a string, see http://msdn.microsoft.com/en-us/library/system.security.cryptography.md5%28v=vs.110%29.aspx

GetMetaContentValue ( string pagesource, string metaname ) : string

Returns the value of an HTML meta tag

GetNamespaceString ( Article a ) : string

GetNamespaceString ( string title ) : string

Returns a string just including the namespace of the article

GetNumberFromUser ( bool edits, int max ) : int

Shows the user an input box to select a number

GetTemplateArgument ( string templateCall, int argument ) : string

Returns the requested argument from the input template call

GetTemplateArgumentCount ( string template ) : int

Returns the number of arguments to the input template call, positional and named parameters

GetTemplateArgumentCount ( string template, bool populatedparametersonly ) : int

Returns the number of arguments to the input template call, positional if populatedparametersonly=false, and named parameters

GetTemplateArgumentIndex ( string templateCall, int argument ) : int

Returns the index of the given argument from the input template call

GetTemplateName ( string templateCall ) : string

Returns the name of the input template, excess whitespace removed, underscores replaced with spaces

GetTemplateParameterValue ( string templateCall, string parameter ) : string

Returns the value of the input parameter in the input template

GetTemplateParameterValue ( string templateCall, string parameter, bool caseInsensitiveParameterName ) : string

Returns the value of the input parameter in the input template

GetTemplateParameterValues ( string templateCall ) : string>.Dictionary

Returns a dictionary of all named parameters used in the template and the value used. If the parameter is specified with no value, an empty string is returned as the value. If there are duplicate parameters, the value of the first (may be blank) is reported.

GetTemplateParametersValues ( string templateCall, List parameters ) : List

Returns the values of given parameters for a template call

GetTemplateParametersValues ( string templateCall, List parameters, bool caseInsensitiveParameterNames ) : List

Returns the values of given parameters for a template call

GetTitleFromURL ( string link ) : string

Extracts page title from URL

GetZerothSection ( string articleText ) : string

Matches the first section of an article, if the article has sections, else the whole article

HTMLListToWiki ( string text, string bullet ) : string

Turns an HTML list into a wiki style list using the input bullet style (with space)

HasDiacritics ( string s ) : bool

Returns whether the given string contains recognised diacritics

HowMuchStartsWith ( string text, Regex Items, bool allowHeading ) : int

returns how much of the given text starts with only items matched by the given regex, allowing for whitespace only E.g. whether a portion of text starts only with one or more wiki templates

InterwikiCount ( string text ) : int

Returns number of interwiki links in the text

IsIP ( string s ) : bool

Checks whether given string is a valid IP address

IsRedirect ( string articletext ) : bool

Tests article to see if it is a redirect

IsRedirectOrSoftRedirect ( string articletext ) : bool

Tests article to see if it is a redirect OR a soft redirect using {{soft redirect}}

IsRomanNumber ( string s ) : bool

checks if given string represents a small Roman number

IsSectionOrReasonTemplate ( string templateCall ) : bool

Returns whether template call is a section template or has reason parameter

IsSectionOrReasonTemplate ( string templateCall, string articletext ) : bool

Returns whether template call is a section template or has reason parameter Checks articletext for any {{multiple issues}} section templates

IsSubnodeOf ( TreeNode refnode, TreeNode testnode ) : bool

returns true if testnode is the same or a subnode of refnode

IsValidTitle ( string articleTitle ) : bool

Tests article title to see if it is valid

IsWikimediaProject ( ProjectEnum p ) : bool

Returns true if given project belongs to Wikimedia

LinkCount ( string text ) : int

Returns the number of mainspace wikilinks i.e. [[links]] in the string

LinkCount ( string text, int limit ) : int

Returns the number of mainspace wikilinks i.e. [[links]] in the string, capped at the input limit

ListToStringCommaSeparator ( List items ) : string
ListToStringWithSeparatorAndWordSuffix ( List items, string separator, string suffix, string lastseparator ) : string

Creates a string from a list with the following additions: Specify a separator to be used between all elements in the list Specify a suffix to be added to each element in the list Specify a lastseparator that will be used between the last two elements in the list

MakeHumanCatKey ( string name, string articletext ) : string

Returns Category key from article name e.g. "David Smith" returns "Smith, David". special case: "John Doe, Jr." turns into "Doe, Jonn Jr." https://en.wikipedia.org/wiki/Wikipedia:Categorization_of_people

MergeTemplateParametersValues ( string templateCall, List parameters, string newparameter, bool caseInsensitiveParameterNames ) : string

Merges the values of given parameters to a new one for a template call

MessageBox ( string message ) : void

Wrapper for System.Windows.Forms.MessageBox.Show() - So things dont have to reference the Forms library

NestedTemplateRegex ( ICollection templatenames ) : Regex

Returns a regex to match the input templates Supports nested templates and comments at end of template call

NestedTemplateRegex ( ICollection templatenames, bool compiled ) : Regex

Returns a regex to match the input templates Supports nested templates and comments at end of template name

NestedTemplateRegex ( string templatename ) : Regex

Returns a regex to match the input template Supports nested templates and comments at end of template name

NestedTemplateRegex ( string templatename, bool compiled ) : Regex

Returns a regex to match the input template Supports nested templates and comments at end of template call

Newline ( string s ) : string

Prepends a newline to the string, only if string not empty

Newline ( string s, int n ) : string

Prepends the specified number of newlines to the string, only if string not empty

OpenArticleHistoryInBrowser ( string title ) : void

Opens the specified article's history in the browser

OpenArticleInBrowser ( string title ) : void

OpenArticleLogInBrowser ( string page ) : void
OpenDiffInBrowser ( int newId ) : void

Opens the specified diff in the browser in the current project

OpenDiffInBrowser ( string URLLong, int newId ) : void

Opens the specified diff in the browser to the specified project

OpenENArticleInBrowser ( string title, bool userspace ) : void

Forces the loading of a page in En.Wiki Used for 'static' links to the english wikipedia

OpenURLInBrowser ( string url ) : void

Error supressed URL opener in default browser (Windows) or Firefox/Chromium/Konqueror for Wine

OpenUserTalkInBrowser ( string username ) : void

Opens the specified user's talk page in the browser

PipeCleanedTemplate ( string templateCall, bool commentsastilde ) : string

Removes pipes that are not the pipe indicating the end of the parameter's value

PostData ( NameValueCollection postvars, string url ) : string

Performs HTTP post of given variables to given URL

ReAddDiacritics ( string WithDiacritics, string WithoutDiacritics ) : string
RedirectTarget ( string articleText ) : string

Gets the target of the redirect

RegexMatchCount ( Regex regex, string input ) : int

Get the number of times the regex matches the input string

RegexMatchCount ( string regex, string input ) : int

Get the number of times the regex matches the input string

RegexMatchCount ( string regex, string input, RegexOptions opts ) : int

Get the number of times the regex matches the input string

RemoveDiacritics ( string s ) : string

substitutes characters with diacritics with their Latin equivalents

RemoveDuplicateTemplateParameters ( string templatecall ) : string

Removes duplicate (same or null) named parameters from template calls

RemoveDuplicateTemplateParameters ( string templatecall, string>.Dictionary templateparams ) : string

Removes duplicate (same or null) named parameters from template calls

RemoveExcessTemplatePipes ( string templatecall ) : string

Removes excess pipes from template calls, any where two pipes with no value/only whitespace between

RemoveHashFromPageTitle ( string title ) : string

Removes the # and text after from a page title. Some redirects redirect to sections, the API doesnt like this

RemoveInvalidChars ( string articleTitle ) : string

Removes Invalid Characters from an Article articleTitle

RemoveMatches ( string str, IList matches ) : string

Removes every matched pattern. To be used only if MatchCollection is needed for something else, otherwise Regex.Replace(foo, "") will be faster

RemoveMatches ( string str, MatchCollection matches ) : string

Removes every matched pattern. To be used only if MatchCollection is needed for something else, otherwise Regex.Replace(foo, "") will be faster

RemoveNamespaceString ( string title ) : string

Returns a string with the namespace removed

RemoveSyntax ( string text ) : string

Removes underscores and wiki syntax from links

RemoveTemplateParameter ( string templateCall, string parameter ) : string

Removes the input parameter from the input template

RemoveTemplateParameter ( string templateCall, string parameter, bool removeLastMatch ) : string

Removes the input parameter from the input template

RemoveTemplateParameter ( string articletext, string templatename, string parameter ) : string

Removes the input parameter from all instances of the input template in the article text

RemoveTemplateParameters ( string templateCall, List parameters ) : string

Removes the input parameters from the input template

RenameTemplate ( string templateCall, string newtemplatename ) : string

Renames the input template to the new name given

RenameTemplate ( string templateCall, string newtemplatename, bool keepFirstLetterCase ) : string

Renames the input template to the new name given

RenameTemplate ( string articletext, string templatename, string newtemplatename ) : string

Renames all matches of the given template name in the input text to the new name given

RenameTemplate ( string articletext, string templatename, string newtemplatename, bool keepFirstLetterCase ) : string

Renames all matches of the given template name in the input text to the new name given

RenameTemplate ( string articletext, string templatename, string newtemplatename, int count ) : string

Renames the input template to the new name given

RenameTemplateParameter ( string templateCall, string>.Dictionary templateparams ) : string

Renames the given template named parameters in the input template

RenameTemplateParameter ( string templateCall, List oldparameters, string newparameter ) : string

Renames the given template named parameters in the input template

RenameTemplateParameter ( string templateCall, string oldparameter, string newparameter ) : string

Renames the given template named parameter in the input template call

ReplaceOnce ( StringBuilder text, string oldValue, string newValue ) : bool

Replaces first occurrence of a given text within a StringBuilder

ReplaceOnce ( string &text, string oldValue, string newValue ) : bool

Replaces first occurrence of a given text within a string

ReplacePartOfString ( string source, int position, int length, string replace ) : string

For disambiguation - replaces part of a string with another string

ReplaceWith ( string input, MatchCollection matches, char rwith ) : string

Replaces the values of all matches with a given character

ReplaceWith ( string input, MatchCollection matches, char rwith, int keepGroup ) : string

Replaces the values of all matches with a given character

ReplaceWith ( string input, Regex regex, char rwith ) : string

Replaces all matches of a given regex in a string with a character such that the length of the string remains the same

ReplaceWith ( string input, Regex regex, char rwith, int keepGroup ) : string

Replaces all matches of a given regex in a string with a character such that the length of the string remains the same

ReplaceWithSpaces ( string input, MatchCollection matches ) : string

Replaces the values of all matches with spaces

ReplaceWithSpaces ( string input, MatchCollection matches, int keepGroup ) : string

Replaces the values of all matches with spaces

ReplaceWithSpaces ( string input, Regex regex ) : string

Replaces all matches of a given regex in a string with space characters such that the length of the string remains the same

ReplaceWithSpaces ( string input, Regex regex, int keepGroup ) : string

Replaces all matches of a given regex in a string with space characters such that the length of the string remains the same

RomanToInt ( string Roman ) : string

Converts Roman numerals in the range I to CCCCXCIX to Arabic number

ServerName ( string url ) : string

Returns URL stripped of protocol and subdirectories, e.g. http://en.wikipedia.org/wiki/ --> en.wikipedia.org

SetTemplateParameterValue ( string templateCall, string parameter, string newvalue ) : string

Sets the template parameter value to the new value input: if the template already has the parameter then its value is updated, otherwise the new value is appended

SetTemplateParameterValue ( string templateCall, string parameter, string newvalue, bool prependSpace ) : string

Sets the template parameter value to the new value input: if the template already has the parameter then its value is updated, otherwise the new value is appended

SplitLines ( string source ) : string[]

Splits a string of text to separate lines. Supports every line ending possible - CRLF, CR, LF

SplitToSections ( string articleText ) : string[]

Splits wikitext to sections based on any level wiki heading. Includes zeroth section

StringBetween ( string source, string start, string end ) : string

returns content of a given string that lies between two other strings where there are multiple matches for one or more of the other strings, the shortest matching portion of the source string is returned

StripNamespaceColon ( string ns ) : string

Strips trailing colon from a namespace name, e.g. "User:" -> "User"

SubPageName ( string title ) : string

TemplateNameRegex ( ) : Regex
TemplateToMagicWord ( string articleText ) : string

Replaces magic word templates with magic words, ignores templates with no arguments

TitleCaseEN ( string text ) : string

Returns the trimmed input string in Title Case if: string all upper case string all lower case Otherwise returns lower/mixed case words in Title Case and UPPER case in UPPER

TurnFirstToLower ( string input ) : string

Returns version of the string with first character in lower case

TurnFirstToUpper ( string input ) : string

Returns version of the string with first character in upper case but not on wiktionary

TurnFirstToUpperNoProjectCheck ( string input ) : string

Returns version of the string with first character in upper case

UnescapeXML ( string s ) : string

Replaces escaped characters in XML with the single character: apostrophe, quote, greater than, less than, ampersand

UnformattedTextNotChanged ( string originalArticleText, string articleText ) : bool

Returns whether the unformatted text content is the same in the two strings Rule is: unformatted text must be entirely missing in new string, or present exactly as before

UnknownTemplateParameters ( string templatecall, List knownParameters ) : List

Checks template calls using named parameters for unknown parameters

UpdateTemplateParameterValue ( string templateCall, string parameter, string newvalue ) : string

Sets the template parameter value to the new value input, only if the template already has the parameter (with or without a value)

WikiDecode ( string title ) : string

Decodes URL-encoded page titles into a normal string

WikiEncode ( string title ) : string

Replaces spaces with underscores for article title names

WordCount ( string text ) : int

Returns word count of the string

WordCount ( string text, int limit ) : int

Returns word count of the string

WriteDebug ( string @object, string text ) : void

Writes debug log message with timestamp to nearest millisecond

WriteTextFile ( StringBuilder message, string file, bool append ) : void

Writes a message to the given file in the directory of the application.

WriteTextFile ( string message, string file, bool append ) : void

Writes a message to the given file in the directory of the application.

WriteTextFileAbsolutePath ( StringBuilder message, string file, bool append ) : void

Writes a message to the given file in the specified location.

WriteTextFileAbsolutePath ( string message, string file, bool append ) : void

Writes a message to the given file in the specified location.

비공개 메소드들

메소드 설명
DeduplicateListHS ( List input ) : List
DirectoryDelimiter ( ) : string

Returns directory delimiter: normally \ but / if running under Mono

FlashWindow ( IntPtr hwnd, bool bInvert ) : void
PipeCleanedTemplate ( string template ) : string
RenameTemplateME ( Match m, string newTemplateName, bool keepFirstLetterCase ) : string
RenameTemplateParameterME ( Match m, string templateCall, string newparameter ) : string
TemplateToMagicWordME ( Match m ) : string
Tools ( ) : System

메소드 상세

AllCaseInsensitive() 공개 정적인 메소드

Returns a regex case insensitive version of an entire string e.g. "Category" returns "[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]"
public static AllCaseInsensitive ( string input ) : string
input string
리턴 string

AppendParameterToTemplate() 공개 정적인 메소드

Appends the input parameter and value to the input template
public static AppendParameterToTemplate ( string templateCall, string parameter, string newValue ) : string
templateCall string The input template call
parameter string The input parameter name
newValue string The input parameter value
리턴 string

AppendParameterToTemplate() 공개 정적인 메소드

Appends the input parameter and value to the input template Determines whether to put parameter on newline, and whether to put space after pipe based on existing template parameters' formatting
public static AppendParameterToTemplate ( string templateCall, string parameter, string newValue, bool unspaced ) : string
templateCall string The input template call
parameter string The input parameter name
newValue string The input parameter value
unspaced bool Whether to add the parameter value without any excess whitespace
리턴 string

ApplyKeyWords() 공개 정적인 메소드

Applies the key words "%%title%%" etc. https://meta.wikimedia.org/wiki/Help:Magic_words
public static ApplyKeyWords ( string title, string text ) : string
title string
text string
리턴 string

ApplyKeyWords() 공개 정적인 메소드

Applies the key words "%%title%%" etc. https://meta.wikimedia.org/wiki/Help:Magic_words
public static ApplyKeyWords ( string title, string text, bool escape ) : string
title string
text string
escape bool
리턴 string

BasePageName() 공개 정적인 메소드

Works like MediaWiki's {{BASEPAGENAME}} by retrieving page's parent name
public static BasePageName ( string title ) : string
title string Title to process
리턴 string

Beep() 공개 정적인 메소드

Beeps
public static Beep ( ) : void
리턴 void

BuildPostDataString() 공개 정적인 메소드

Converts a NameValueCollection of parameter names and values into an API command string
public static BuildPostDataString ( NameValueCollection postvars ) : string
postvars System.Collections.Specialized.NameValueCollection
리턴 string

CaseInsensitive() 공개 정적인 메소드

Returns a regex case insensitive version of a string for the first letter only e.g. "Category" returns "[Cc]ategory"
public static CaseInsensitive ( string input ) : string
input string
리턴 string

CaseInsensitiveStringCompare() 공개 정적인 메소드

Case-Insensitive String Comparison
public static CaseInsensitiveStringCompare ( string one, string two ) : bool
one string First String
two string Second String
리턴 bool

CleanSortKey() 공개 정적인 메소드

Cleans sortkeys: removes diacritics, except for ru, fr, pl wikis Cleans up/removes specific characters per WP:SORTKEY
public static CleanSortKey ( string defaultsort ) : string
defaultsort string
리턴 string

ConvertDate() 공개 정적인 메소드

Returns the input date in the requested format (American or International). If another Locale is passed in the input date is returned. For en-wiki only.
public static ConvertDate ( string inputDate, Parsers locale ) : string
inputDate string string representing a date, any format that C# can parse
locale WikiFunctions.Parse.Parsers Locale of output date required (American/International/ISO)
리턴 string

ConvertDate() 공개 정적인 메소드

Returns the input date in the requested format (American or International). If another Locale is passed in the input date is returned. For en-wiki only.
public static ConvertDate ( string inputDate, Parsers locale, bool AmericanInputDate ) : string
inputDate string string representing a date, any format that C# can parse
locale WikiFunctions.Parse.Parsers Locale of output date required (American/International/ISO)
AmericanInputDate bool Whether the input date is in American MM/DD/YYYY format
리턴 string

ConvertFromLocalLineEndings() 공개 정적인 메소드

Converts all line endings to \n
public static ConvertFromLocalLineEndings ( string input ) : string
input string
리턴 string

ConvertFromTalk() 공개 정적인 메소드

Turns a list of talk pages into a list of the associated articles.
public static ConvertFromTalk ( List
list ) : List
list List
The list of talk pages.
리턴 List

ConvertFromTalk() 공개 정적인 메소드

Turns a talk page into its associated article
public static ConvertFromTalk ( Article a ) : string
a Article The Article
리턴 string

ConvertFromTalk() 공개 정적인 메소드

Turns a talk page into its associated article
public static ConvertFromTalk ( string a ) : string
a string
리턴 string

ConvertNamespace() 공개 정적인 메소드

Turns a list of pages into a list of pages in the input namespace Does not convert Special pages
public static ConvertNamespace ( List
list, int NewNamespace ) : List
list List
The list of pages.
NewNamespace int New namespace number
리턴 List

ConvertNamespace() 공개 정적인 메소드

Turns a list of pages into a list of pages in the input namespace Does not convert Special pages
public static ConvertNamespace ( Article a, int NewNamespace ) : string
a Article The article
NewNamespace int New namespace number
리턴 string

ConvertToLocalLineEndings() 공개 정적인 메소드

Converts all line endings are the environment default
public static ConvertToLocalLineEndings ( string input ) : string
input string
리턴 string

ConvertToTalk() 공개 정적인 메소드

Turns a list of articles into an list of the associated talk pages.
public static ConvertToTalk ( List
list ) : List
list List
The list of articles.
리턴 List

ConvertToTalk() 공개 정적인 메소드

Turns an article into its associated talk page
public static ConvertToTalk ( Article a ) : string
a Article The Article
리턴 string

ConvertToTalk() 공개 정적인 메소드

Turns an article into its associated talk page
public static ConvertToTalk ( string a ) : string
a string
리턴 string

Copy() 공개 정적인 메소드

Copy selected items from a listbox
public static Copy ( ListBox box ) : void
box System.Windows.Forms.ListBox The list box to copy from
리턴 void

Copy() 공개 정적인 메소드

Copy selected items from a listview
public static Copy ( ListView view ) : void
view System.Windows.Forms.ListView The list view to copy from
리턴 void

CopyToClipboard() 공개 정적인 메소드

Wrapper function for setting text to clipboard. Clears clipboard and waits before continuing
public static CopyToClipboard ( object data, bool copy ) : void
data object
copy bool
리턴 void

CopyToClipboard() 공개 정적인 메소드

Wrapper function for setting text to clipboard. Clears clipboard and waits before continuing
public static CopyToClipboard ( string text ) : void
text string Text to copy to clipboard
리턴 void

DateBeforeToday() 공개 정적인 메소드

Attempts to parse the input string as a date, if parsed returns whether the date is before the system date Otherwise returns false
public static DateBeforeToday ( string date ) : bool
date string
리턴 bool

DatesCount() 공개 정적인 메소드

Counts the number of dates of International/American/ISO format in the text
public static DatesCount ( string text ) : int>.Dictionary
text string Text
리턴 int>.Dictionary

DeduplicateList() 공개 정적인 메소드

Returns a dediplicated list, using .NET 3.5 Distinct() function if available
public static DeduplicateList ( List input ) : List
input List
리턴 List

DuplicateTemplateParameters() 공개 정적인 메소드

Returns duplicate named parameters in a template call
public static DuplicateTemplateParameters ( string templatecall ) : int>.Dictionary
templatecall string The template call to check
리턴 int>.Dictionary

DuplicateWikiLinks() 공개 정적인 메소드

Returns a sorted list of duplicate wikilinks in the input text (links converted to first letter upper) in format: name (count)
public static DuplicateWikiLinks ( string text ) : List
text string
리턴 List

EditArticleInBrowser() 공개 정적인 메소드

Opens the specified articles edit page
public static EditArticleInBrowser ( string title ) : void
title string
리턴 void

ExpandTemplate() 공개 정적인 메소드

Expands (substitutes) template calls using the API
public static ExpandTemplate ( string articleText, string articleTitle, string>.Dictionary regexes, bool includeComment ) : string
articleText string The text of the article
articleTitle string The title of the article
regexes string>.Dictionary Dictionary of templates to substitute
includeComment bool
리턴 string

FilterSomeArticles() 공개 정적인 메소드

Filter out articles which we definitely do not want to edit and remove duplicates. (Filters MediaWiki (and talk) NS, Commons, and where NS is less than 0)
public static FilterSomeArticles ( List
unfilteredArticles ) : List
unfilteredArticles List
Original unfiltered article list
리턴 List

FirstChars() 공개 정적인 메소드

Returns substring at the start of a given string
public static FirstChars ( string str, int count ) : string
str string String to process
count int Number of chars at the beginning of str to process
리턴 string

FirstDifference() 공개 정적인 메소드

Returns index of first character different between strings
public static FirstDifference ( string a, string b ) : int
a string First string
b string Second string
리턴 int

FirstToUpperAndRemoveHashOnArray() 공개 정적인 메소드

public static FirstToUpperAndRemoveHashOnArray ( string input ) : string[]
input string
리턴 string[]

FixupDefaultSort() 공개 정적인 메소드

Removes recognised diacritics and double quotes, converts to Proper Case per [[WP:CAT]]
public static FixupDefaultSort ( string s ) : string
s string
리턴 string

FixupDefaultSort() 공개 정적인 메소드

Removes recognised diacritics and double quotes, converts to Proper Case per [[WP:CAT]]
public static FixupDefaultSort ( string defaultsort, bool isArticleAboutAPerson ) : string
defaultsort string
isArticleAboutAPerson bool
리턴 string

FlashWindow() 공개 정적인 메소드

Flashes the given form in the taskbar
public static FlashWindow ( Control window ) : void
window System.Windows.Forms.Control
리턴 void

GetDomain() 공개 정적인 메소드

Returns the domain name from a URL e.g. bbc.co.uk from http://www.bbc.co.uk/1212
public static GetDomain ( string url ) : string
url string The source URL
리턴 string

GetHTML() 공개 정적인 메소드

Gets the HTML from the given web address.
public static GetHTML ( string url ) : string
url string The URL of the webpage.
리턴 string

GetHTML() 공개 정적인 메소드

Gets the HTML from the given web address.
public static GetHTML ( string url, Encoding enc ) : string
url string The URL of the webpage.
enc System.Text.Encoding The encoding to use.
리턴 string

GetHTML() 공개 정적인 메소드

Gets the HTML from the given web address.
public static GetHTML ( string url, Encoding enc, string &responseURL ) : string
url string The URL of the webpage.
enc System.Text.Encoding The encoding to use.
responseURL string The resolved URL of the webpage
리턴 string

GetHTML() 공개 정적인 메소드

Gets the HTML from the given web address.
public static GetHTML ( string url, string &responseURL ) : string
url string The URL of the webpage.
responseURL string The resolved URL of the webpage
리턴 string

GetMd5Sum() 공개 정적인 메소드

Calculates md5sum of a string, see http://msdn.microsoft.com/en-us/library/system.security.cryptography.md5%28v=vs.110%29.aspx
public static GetMd5Sum ( string input ) : string
input string
리턴 string

GetMetaContentValue() 공개 정적인 메소드

Returns the value of an HTML meta tag
public static GetMetaContentValue ( string pagesource, string metaname ) : string
pagesource string page source HTML
metaname string meta content name
리턴 string

GetNamespaceString() 공개 정적인 메소드

public static GetNamespaceString ( Article a ) : string
a Article
리턴 string

GetNamespaceString() 공개 정적인 메소드

Returns a string just including the namespace of the article
public static GetNamespaceString ( string title ) : string
title string
리턴 string

GetNumberFromUser() 공개 정적인 메소드

Shows the user an input box to select a number
public static GetNumberFromUser ( bool edits, int max ) : int
edits bool Is the thing being counted, user edits?
max int The maximum value the user can choose
리턴 int

GetTemplateArgument() 공개 정적인 메소드

Returns the requested argument from the input template call
public static GetTemplateArgument ( string templateCall, int argument ) : string
templateCall string The template call
argument int The argument to return
리턴 string

GetTemplateArgumentCount() 공개 정적인 메소드

Returns the number of arguments to the input template call, positional and named parameters
public static GetTemplateArgumentCount ( string template ) : int
template string The template call
리턴 int

GetTemplateArgumentCount() 공개 정적인 메소드

Returns the number of arguments to the input template call, positional if populatedparametersonly=false, and named parameters
public static GetTemplateArgumentCount ( string template, bool populatedparametersonly ) : int
template string The template call
populatedparametersonly bool
리턴 int

GetTemplateArgumentIndex() 공개 정적인 메소드

Returns the index of the given argument from the input template call
public static GetTemplateArgumentIndex ( string templateCall, int argument ) : int
templateCall string The template call
argument int The argument to find
리턴 int

GetTemplateName() 공개 정적인 메소드

Returns the name of the input template, excess whitespace removed, underscores replaced with spaces
public static GetTemplateName ( string templateCall ) : string
templateCall string the template call
리턴 string

GetTemplateParameterValue() 공개 정적인 메소드

Returns the value of the input parameter in the input template
public static GetTemplateParameterValue ( string templateCall, string parameter ) : string
templateCall string the input template call
parameter string the input parameter to find
리턴 string

GetTemplateParameterValue() 공개 정적인 메소드

Returns the value of the input parameter in the input template
public static GetTemplateParameterValue ( string templateCall, string parameter, bool caseInsensitiveParameterName ) : string
templateCall string the input template call
parameter string the input parameter to find
caseInsensitiveParameterName bool Whether to match case insensitively on parameter name
리턴 string

GetTemplateParameterValues() 공개 정적인 메소드

Returns a dictionary of all named parameters used in the template and the value used. If the parameter is specified with no value, an empty string is returned as the value. If there are duplicate parameters, the value of the first (may be blank) is reported.
public static GetTemplateParameterValues ( string templateCall ) : string>.Dictionary
templateCall string
리턴 string>.Dictionary

GetTemplateParametersValues() 공개 정적인 메소드

Returns the values of given parameters for a template call
public static GetTemplateParametersValues ( string templateCall, List parameters ) : List
templateCall string The template call
parameters List List of parameters requested
리턴 List

GetTemplateParametersValues() 공개 정적인 메소드

Returns the values of given parameters for a template call
public static GetTemplateParametersValues ( string templateCall, List parameters, bool caseInsensitiveParameterNames ) : List
templateCall string The template call
parameters List List of parameters requested
caseInsensitiveParameterNames bool Whether to match case insensitively on parameter name
리턴 List

GetTitleFromURL() 공개 정적인 메소드

Extracts page title from URL
public static GetTitleFromURL ( string link ) : string
link string Link to process
리턴 string

GetZerothSection() 공개 정적인 메소드

Matches the first section of an article, if the article has sections, else the whole article
public static GetZerothSection ( string articleText ) : string
articleText string
리턴 string

HTMLListToWiki() 공개 정적인 메소드

Turns an HTML list into a wiki style list using the input bullet style (with space)
public static HTMLListToWiki ( string text, string bullet ) : string
text string HTML text to convert to list
bullet string List style to use (# or *)
리턴 string

HasDiacritics() 공개 정적인 메소드

Returns whether the given string contains recognised diacritics
public static HasDiacritics ( string s ) : bool
s string
리턴 bool

HowMuchStartsWith() 공개 정적인 메소드

returns how much of the given text starts with only items matched by the given regex, allowing for whitespace only E.g. whether a portion of text starts only with one or more wiki templates
public static HowMuchStartsWith ( string text, Regex Items, bool allowHeading ) : int
text string Article text or section to check
Items System.Text.RegularExpressions.Regex Regex to match one or more items e.g. wiki templates
allowHeading bool Whether to also allow text to start with a heading then only the matched items
리턴 int

InterwikiCount() 공개 정적인 메소드

Returns number of interwiki links in the text
public static InterwikiCount ( string text ) : int
text string
리턴 int

IsIP() 공개 정적인 메소드

Checks whether given string is a valid IP address
public static IsIP ( string s ) : bool
s string
리턴 bool

IsRedirect() 공개 정적인 메소드

Tests article to see if it is a redirect
public static IsRedirect ( string articletext ) : bool
articletext string The article text
리턴 bool

IsRedirectOrSoftRedirect() 공개 정적인 메소드

Tests article to see if it is a redirect OR a soft redirect using {{soft redirect}}
public static IsRedirectOrSoftRedirect ( string articletext ) : bool
articletext string The article text
리턴 bool

IsRomanNumber() 공개 정적인 메소드

checks if given string represents a small Roman number
public static IsRomanNumber ( string s ) : bool
s string
리턴 bool

IsSectionOrReasonTemplate() 공개 정적인 메소드

Returns whether template call is a section template or has reason parameter
public static IsSectionOrReasonTemplate ( string templateCall ) : bool
templateCall string
리턴 bool

IsSectionOrReasonTemplate() 공개 정적인 메소드

Returns whether template call is a section template or has reason parameter Checks articletext for any {{multiple issues}} section templates
public static IsSectionOrReasonTemplate ( string templateCall, string articletext ) : bool
templateCall string
articletext string
리턴 bool

IsSubnodeOf() 공개 정적인 메소드

returns true if testnode is the same or a subnode of refnode
public static IsSubnodeOf ( TreeNode refnode, TreeNode testnode ) : bool
refnode System.Windows.Forms.TreeNode
testnode System.Windows.Forms.TreeNode
리턴 bool

IsValidTitle() 공개 정적인 메소드

Tests article title to see if it is valid
public static IsValidTitle ( string articleTitle ) : bool
articleTitle string The title.
리턴 bool

IsWikimediaProject() 공개 정적인 메소드

Returns true if given project belongs to Wikimedia
public static IsWikimediaProject ( ProjectEnum p ) : bool
p ProjectEnum
리턴 bool

LinkCount() 공개 정적인 메소드

Returns the number of mainspace wikilinks i.e. [[links]] in the string
public static LinkCount ( string text ) : int
text string
리턴 int

LinkCount() 공개 정적인 메소드

Returns the number of mainspace wikilinks i.e. [[links]] in the string, capped at the input limit
public static LinkCount ( string text, int limit ) : int
text string
limit int
리턴 int

ListToStringCommaSeparator() 공개 정적인 메소드

public static ListToStringCommaSeparator ( List items ) : string
items List
리턴 string

ListToStringWithSeparatorAndWordSuffix() 공개 정적인 메소드

Creates a string from a list with the following additions: Specify a separator to be used between all elements in the list Specify a suffix to be added to each element in the list Specify a lastseparator that will be used between the last two elements in the list
public static ListToStringWithSeparatorAndWordSuffix ( List items, string separator, string suffix, string lastseparator ) : string
items List
separator string
suffix string
lastseparator string
리턴 string

MakeHumanCatKey() 공개 정적인 메소드

Returns Category key from article name e.g. "David Smith" returns "Smith, David". special case: "John Doe, Jr." turns into "Doe, Jonn Jr." https://en.wikipedia.org/wiki/Wikipedia:Categorization_of_people
public static MakeHumanCatKey ( string name, string articletext ) : string
name string
articletext string
리턴 string

MergeTemplateParametersValues() 공개 정적인 메소드

Merges the values of given parameters to a new one for a template call
public static MergeTemplateParametersValues ( string templateCall, List parameters, string newparameter, bool caseInsensitiveParameterNames ) : string
templateCall string The template call
parameters List List of parameters requested
newparameter string The new value for the parameter
caseInsensitiveParameterNames bool Whether to match case insensitively on parameter name
리턴 string

MessageBox() 공개 정적인 메소드

Wrapper for System.Windows.Forms.MessageBox.Show() - So things dont have to reference the Forms library
public static MessageBox ( string message ) : void
message string
리턴 void

NestedTemplateRegex() 공개 정적인 메소드

Returns a regex to match the input templates Supports nested templates and comments at end of template call
public static NestedTemplateRegex ( ICollection templatenames ) : Regex
templatenames ICollection The list of template names
리턴 System.Text.RegularExpressions.Regex

NestedTemplateRegex() 공개 정적인 메소드

Returns a regex to match the input templates Supports nested templates and comments at end of template name
public static NestedTemplateRegex ( ICollection templatenames, bool compiled ) : Regex
templatenames ICollection The list of template names
compiled bool Whether to return a compiled regex
리턴 System.Text.RegularExpressions.Regex

NestedTemplateRegex() 공개 정적인 메소드

Returns a regex to match the input template Supports nested templates and comments at end of template name
public static NestedTemplateRegex ( string templatename ) : Regex
templatename string The template name
리턴 System.Text.RegularExpressions.Regex

NestedTemplateRegex() 공개 정적인 메소드

Returns a regex to match the input template Supports nested templates and comments at end of template call
public static NestedTemplateRegex ( string templatename, bool compiled ) : Regex
templatename string The template name
compiled bool Whether to return a compiled regex
리턴 System.Text.RegularExpressions.Regex

Newline() 공개 정적인 메소드

Prepends a newline to the string, only if string not empty
public static Newline ( string s ) : string
s string The input string
리턴 string

Newline() 공개 정적인 메소드

Prepends the specified number of newlines to the string, only if string not empty
public static Newline ( string s, int n ) : string
s string Input string
n int Number of newlines to prepend
리턴 string

OpenArticleHistoryInBrowser() 공개 정적인 메소드

Opens the specified article's history in the browser
public static OpenArticleHistoryInBrowser ( string title ) : void
title string
리턴 void

OpenArticleInBrowser() 공개 정적인 메소드

public static OpenArticleInBrowser ( string title ) : void
title string
리턴 void

OpenArticleLogInBrowser() 공개 정적인 메소드

public static OpenArticleLogInBrowser ( string page ) : void
page string
리턴 void

OpenDiffInBrowser() 공개 정적인 메소드

Opens the specified diff in the browser in the current project
public static OpenDiffInBrowser ( int newId ) : void
newId int
리턴 void

OpenDiffInBrowser() 공개 정적인 메소드

Opens the specified diff in the browser to the specified project
public static OpenDiffInBrowser ( string URLLong, int newId ) : void
URLLong string
newId int
리턴 void

OpenENArticleInBrowser() 공개 정적인 메소드

Forces the loading of a page in En.Wiki Used for 'static' links to the english wikipedia
public static OpenENArticleInBrowser ( string title, bool userspace ) : void
title string
userspace bool
리턴 void

OpenURLInBrowser() 공개 정적인 메소드

Error supressed URL opener in default browser (Windows) or Firefox/Chromium/Konqueror for Wine
public static OpenURLInBrowser ( string url ) : void
url string
리턴 void

OpenUserTalkInBrowser() 공개 정적인 메소드

Opens the specified user's talk page in the browser
public static OpenUserTalkInBrowser ( string username ) : void
username string
리턴 void

PipeCleanedTemplate() 공개 정적인 메소드

Removes pipes that are not the pipe indicating the end of the parameter's value
public static PipeCleanedTemplate ( string templateCall, bool commentsastilde ) : string
templateCall string The template call to clean
commentsastilde bool
리턴 string

PostData() 공개 정적인 메소드

Performs HTTP post of given variables to given URL
public static PostData ( NameValueCollection postvars, string url ) : string
postvars System.Collections.Specialized.NameValueCollection
url string
리턴 string

ReAddDiacritics() 공개 정적인 메소드

public static ReAddDiacritics ( string WithDiacritics, string WithoutDiacritics ) : string
WithDiacritics string
WithoutDiacritics string
리턴 string

RedirectTarget() 공개 정적인 메소드

Gets the target of the redirect
public static RedirectTarget ( string articleText ) : string
articleText string The text of the article
리턴 string

RegexMatchCount() 공개 정적인 메소드

Get the number of times the regex matches the input string
public static RegexMatchCount ( Regex regex, string input ) : int
regex System.Text.RegularExpressions.Regex Regex to try and match input against
input string Input string to search for matches
리턴 int

RegexMatchCount() 공개 정적인 메소드

Get the number of times the regex matches the input string
public static RegexMatchCount ( string regex, string input ) : int
regex string String to become a regex
input string Input string to search for matches
리턴 int

RegexMatchCount() 공개 정적인 메소드

Get the number of times the regex matches the input string
public static RegexMatchCount ( string regex, string input, RegexOptions opts ) : int
regex string Regex to try and match input against
input string Input string to search for matches
opts RegexOptions Regex Options
리턴 int

RemoveDiacritics() 공개 정적인 메소드

substitutes characters with diacritics with their Latin equivalents
public static RemoveDiacritics ( string s ) : string
s string
리턴 string

RemoveDuplicateTemplateParameters() 공개 정적인 메소드

Removes duplicate (same or null) named parameters from template calls
public static RemoveDuplicateTemplateParameters ( string templatecall ) : string
templatecall string The template call to clean up
리턴 string

RemoveDuplicateTemplateParameters() 공개 정적인 메소드

Removes duplicate (same or null) named parameters from template calls
public static RemoveDuplicateTemplateParameters ( string templatecall, string>.Dictionary templateparams ) : string
templatecall string The template call to clean up
templateparams string>.Dictionary Dictionary of parameter name and value found in template call
리턴 string

RemoveExcessTemplatePipes() 공개 정적인 메소드

Removes excess pipes from template calls, any where two pipes with no value/only whitespace between
public static RemoveExcessTemplatePipes ( string templatecall ) : string
templatecall string The template call to clean up
리턴 string

RemoveHashFromPageTitle() 공개 정적인 메소드

Removes the # and text after from a page title. Some redirects redirect to sections, the API doesnt like this
public static RemoveHashFromPageTitle ( string title ) : string
title string Page Title
리턴 string

RemoveInvalidChars() 공개 정적인 메소드

Removes Invalid Characters from an Article articleTitle
public static RemoveInvalidChars ( string articleTitle ) : string
articleTitle string Article Title
리턴 string

RemoveMatches() 공개 정적인 메소드

Removes every matched pattern. To be used only if MatchCollection is needed for something else, otherwise Regex.Replace(foo, "") will be faster
public static RemoveMatches ( string str, IList matches ) : string
str string String to process
matches IList List of matches of a regex on this string
리턴 string

RemoveMatches() 공개 정적인 메소드

Removes every matched pattern. To be used only if MatchCollection is needed for something else, otherwise Regex.Replace(foo, "") will be faster
public static RemoveMatches ( string str, MatchCollection matches ) : string
str string String to process
matches System.Text.RegularExpressions.MatchCollection Matches of a regex on this string
리턴 string

RemoveNamespaceString() 공개 정적인 메소드

Returns a string with the namespace removed
public static RemoveNamespaceString ( string title ) : string
title string
리턴 string

RemoveSyntax() 공개 정적인 메소드

Removes underscores and wiki syntax from links
public static RemoveSyntax ( string text ) : string
text string
리턴 string

RemoveTemplateParameter() 공개 정적인 메소드

Removes the input parameter from the input template
public static RemoveTemplateParameter ( string templateCall, string parameter ) : string
templateCall string The template call to update
parameter string The parameter to remove
리턴 string

RemoveTemplateParameter() 공개 정적인 메소드

Removes the input parameter from the input template
public static RemoveTemplateParameter ( string templateCall, string parameter, bool removeLastMatch ) : string
templateCall string
parameter string
removeLastMatch bool Whether to remove the last match, rather than the first
리턴 string

RemoveTemplateParameter() 공개 정적인 메소드

Removes the input parameter from all instances of the input template in the article text
public static RemoveTemplateParameter ( string articletext, string templatename, string parameter ) : string
articletext string
templatename string
parameter string
리턴 string

RemoveTemplateParameters() 공개 정적인 메소드

Removes the input parameters from the input template
public static RemoveTemplateParameters ( string templateCall, List parameters ) : string
templateCall string The template call to update
parameters List The parameters to remove
리턴 string

RenameTemplate() 공개 정적인 메소드

Renames the input template to the new name given
public static RenameTemplate ( string templateCall, string newtemplatename ) : string
templateCall string the template call
newtemplatename string the new template name
리턴 string

RenameTemplate() 공개 정적인 메소드

Renames the input template to the new name given
public static RenameTemplate ( string templateCall, string newtemplatename, bool keepFirstLetterCase ) : string
templateCall string the template call
newtemplatename string the new template name
keepFirstLetterCase bool Whether to keep the first letter casing of the existing template. If false, casing of new template name is used.
리턴 string

RenameTemplate() 공개 정적인 메소드

Renames all matches of the given template name in the input text to the new name given
public static RenameTemplate ( string articletext, string templatename, string newtemplatename ) : string
articletext string the page text
templatename string the old template name
newtemplatename string the new template name
리턴 string

RenameTemplate() 공개 정적인 메소드

Renames all matches of the given template name in the input text to the new name given
public static RenameTemplate ( string articletext, string templatename, string newtemplatename, bool keepFirstLetterCase ) : string
articletext string the page text
templatename string the old template name
newtemplatename string the new template name
keepFirstLetterCase bool Whether to keep the first letter casing of the existing template
리턴 string

RenameTemplate() 공개 정적인 메소드

Renames the input template to the new name given
public static RenameTemplate ( string articletext, string templatename, string newtemplatename, int count ) : string
articletext string the page text
templatename string the template call
newtemplatename string the new template name
count int The number of templates to rename
리턴 string

RenameTemplateParameter() 공개 정적인 메소드

Renames the given template named parameters in the input template
public static RenameTemplateParameter ( string templateCall, string>.Dictionary templateparams ) : string
templateCall string The template to update
templateparams string>.Dictionary Dictionary of old names, new names to apply
리턴 string

RenameTemplateParameter() 공개 정적인 메소드

Renames the given template named parameters in the input template
public static RenameTemplateParameter ( string templateCall, List oldparameters, string newparameter ) : string
templateCall string The template to update
oldparameters List List of existing template names
newparameter string New parameter name
리턴 string

RenameTemplateParameter() 공개 정적인 메소드

Renames the given template named parameter in the input template call
public static RenameTemplateParameter ( string templateCall, string oldparameter, string newparameter ) : string
templateCall string The template call to update
oldparameter string Existing parameter name
newparameter string New parameter name
리턴 string

ReplaceOnce() 공개 정적인 메소드

Replaces first occurrence of a given text within a StringBuilder
public static ReplaceOnce ( StringBuilder text, string oldValue, string newValue ) : bool
text StringBuilder Text to be processed
oldValue string Text to be replaced
newValue string Replacement text
리턴 bool

ReplaceOnce() 공개 정적인 메소드

Replaces first occurrence of a given text within a string
public static ReplaceOnce ( string &text, string oldValue, string newValue ) : bool
text string Text to be processed
oldValue string Text to be replaced
newValue string Replacement text
리턴 bool

ReplacePartOfString() 공개 정적인 메소드

For disambiguation - replaces part of a string with another string
public static ReplacePartOfString ( string source, int position, int length, string replace ) : string
source string String
position int
length int
replace string
리턴 string

ReplaceWith() 공개 정적인 메소드

Replaces the values of all matches with a given character
public static ReplaceWith ( string input, MatchCollection matches, char rwith ) : string
input string The article text to update
matches System.Text.RegularExpressions.MatchCollection Collection of matches to replace with spaces
rwith char The character to use
리턴 string

ReplaceWith() 공개 정적인 메소드

Replaces the values of all matches with a given character
public static ReplaceWith ( string input, MatchCollection matches, char rwith, int keepGroup ) : string
input string The article text to update
matches System.Text.RegularExpressions.MatchCollection Collection of matches to replace with spaces
rwith char The character to use
keepGroup int Regex match group to keep text of in replacement
리턴 string

ReplaceWith() 공개 정적인 메소드

Replaces all matches of a given regex in a string with a character such that the length of the string remains the same
public static ReplaceWith ( string input, Regex regex, char rwith ) : string
input string The article text to update
regex System.Text.RegularExpressions.Regex The regex to replace all matches of
rwith char The character to use
리턴 string

ReplaceWith() 공개 정적인 메소드

Replaces all matches of a given regex in a string with a character such that the length of the string remains the same
public static ReplaceWith ( string input, Regex regex, char rwith, int keepGroup ) : string
input string The article text to update
regex System.Text.RegularExpressions.Regex The regex to replace all matches of
rwith char The character to use
keepGroup int Regex match group to keep text of in replacement
리턴 string

ReplaceWithSpaces() 공개 정적인 메소드

Replaces the values of all matches with spaces
public static ReplaceWithSpaces ( string input, MatchCollection matches ) : string
input string The article text to update
matches System.Text.RegularExpressions.MatchCollection Collection of matches to replace with spaces
리턴 string

ReplaceWithSpaces() 공개 정적인 메소드

Replaces the values of all matches with spaces
public static ReplaceWithSpaces ( string input, MatchCollection matches, int keepGroup ) : string
input string The article text to update
matches System.Text.RegularExpressions.MatchCollection Collection of matches to replace with spaces
keepGroup int Regex match group to keep text of in replacement
리턴 string

ReplaceWithSpaces() 공개 정적인 메소드

Replaces all matches of a given regex in a string with space characters such that the length of the string remains the same
public static ReplaceWithSpaces ( string input, Regex regex ) : string
input string The article text to update
regex System.Text.RegularExpressions.Regex The regex to replace all matches of
리턴 string

ReplaceWithSpaces() 공개 정적인 메소드

Replaces all matches of a given regex in a string with space characters such that the length of the string remains the same
public static ReplaceWithSpaces ( string input, Regex regex, int keepGroup ) : string
input string The article text to update
regex System.Text.RegularExpressions.Regex The regex to replace all matches of
keepGroup int Regex match group to keep text of in replacement
리턴 string

RomanToInt() 공개 정적인 메소드

Converts Roman numerals in the range I to CCCCXCIX to Arabic number
public static RomanToInt ( string Roman ) : string
Roman string Roman numerals
리턴 string

ServerName() 공개 정적인 메소드

Returns URL stripped of protocol and subdirectories, e.g. http://en.wikipedia.org/wiki/ --> en.wikipedia.org
public static ServerName ( string url ) : string
url string URL to process
리턴 string

SetTemplateParameterValue() 공개 정적인 메소드

Sets the template parameter value to the new value input: if the template already has the parameter then its value is updated, otherwise the new value is appended
public static SetTemplateParameterValue ( string templateCall, string parameter, string newvalue ) : string
templateCall string The template call to update
parameter string The template parameter
newvalue string The new value for the parameter
리턴 string

SetTemplateParameterValue() 공개 정적인 메소드

Sets the template parameter value to the new value input: if the template already has the parameter then its value is updated, otherwise the new value is appended
public static SetTemplateParameterValue ( string templateCall, string parameter, string newvalue, bool prependSpace ) : string
templateCall string The template call to update
parameter string The template parameter
newvalue string The new value for the parameter
prependSpace bool Whether to include a space before the new value
리턴 string

SplitLines() 공개 정적인 메소드

Splits a string of text to separate lines. Supports every line ending possible - CRLF, CR, LF
public static SplitLines ( string source ) : string[]
source string String to split
리턴 string[]

SplitToSections() 공개 정적인 메소드

Splits wikitext to sections based on any level wiki heading. Includes zeroth section
public static SplitToSections ( string articleText ) : string[]
articleText string Page text
리턴 string[]

StringBetween() 공개 정적인 메소드

returns content of a given string that lies between two other strings where there are multiple matches for one or more of the other strings, the shortest matching portion of the source string is returned
public static StringBetween ( string source, string start, string end ) : string
source string
start string
end string
리턴 string

StripNamespaceColon() 공개 정적인 메소드

Strips trailing colon from a namespace name, e.g. "User:" -> "User"
public static StripNamespaceColon ( string ns ) : string
ns string Namespace string to process
리턴 string

SubPageName() 공개 정적인 메소드

public static SubPageName ( string title ) : string
title string
리턴 string

TemplateNameRegex() 공개 정적인 메소드

public static TemplateNameRegex ( ) : Regex
리턴 Regex

TemplateToMagicWord() 공개 정적인 메소드

Replaces magic word templates with magic words, ignores templates with no arguments
public static TemplateToMagicWord ( string articleText ) : string
articleText string The article text
리턴 string

TitleCaseEN() 공개 정적인 메소드

Returns the trimmed input string in Title Case if: string all upper case string all lower case Otherwise returns lower/mixed case words in Title Case and UPPER case in UPPER
public static TitleCaseEN ( string text ) : string
text string the input text
리턴 string

TurnFirstToLower() 공개 정적인 메소드

Returns version of the string with first character in lower case
public static TurnFirstToLower ( string input ) : string
input string
리턴 string

TurnFirstToUpper() 공개 정적인 메소드

Returns version of the string with first character in upper case but not on wiktionary
public static TurnFirstToUpper ( string input ) : string
input string
리턴 string

TurnFirstToUpperNoProjectCheck() 공개 정적인 메소드

Returns version of the string with first character in upper case
public static TurnFirstToUpperNoProjectCheck ( string input ) : string
input string
리턴 string

UnescapeXML() 공개 정적인 메소드

Replaces escaped characters in XML with the single character: apostrophe, quote, greater than, less than, ampersand
public static UnescapeXML ( string s ) : string
s string
리턴 string

UnformattedTextNotChanged() 공개 정적인 메소드

Returns whether the unformatted text content is the same in the two strings Rule is: unformatted text must be entirely missing in new string, or present exactly as before
public static UnformattedTextNotChanged ( string originalArticleText, string articleText ) : bool
originalArticleText string the first string to search
articleText string the second string to search
리턴 bool

UnknownTemplateParameters() 공개 정적인 메소드

Checks template calls using named parameters for unknown parameters
public static UnknownTemplateParameters ( string templatecall, List knownParameters ) : List
templatecall string The template call to check
knownParameters List List of known template parameters
리턴 List

UpdateTemplateParameterValue() 공개 정적인 메소드

Sets the template parameter value to the new value input, only if the template already has the parameter (with or without a value)
public static UpdateTemplateParameterValue ( string templateCall, string parameter, string newvalue ) : string
templateCall string The template call to update
parameter string The template parameter
newvalue string The new value for the parameter
리턴 string

WikiDecode() 공개 정적인 메소드

Decodes URL-encoded page titles into a normal string
public static WikiDecode ( string title ) : string
title string Page title to decode
리턴 string

WikiEncode() 공개 정적인 메소드

Replaces spaces with underscores for article title names
public static WikiEncode ( string title ) : string
title string
리턴 string

WordCount() 공개 정적인 메소드

Returns word count of the string
public static WordCount ( string text ) : int
text string
리턴 int

WordCount() 공개 정적인 메소드

Returns word count of the string
public static WordCount ( string text, int limit ) : int
text string
limit int
리턴 int

WriteDebug() 공개 정적인 메소드

Writes debug log message with timestamp to nearest millisecond
public static WriteDebug ( string @object, string text ) : void
@object string
text string
리턴 void

WriteTextFile() 공개 정적인 메소드

Writes a message to the given file in the directory of the application.
public static WriteTextFile ( StringBuilder message, string file, bool append ) : void
message StringBuilder The message to write.
file string The name of the file, e.g. "Log.txt".
append bool
리턴 void

WriteTextFile() 공개 정적인 메소드

Writes a message to the given file in the directory of the application.
public static WriteTextFile ( string message, string file, bool append ) : void
message string The message to write.
file string The name of the file, e.g. "Log.txt".
append bool
리턴 void

WriteTextFileAbsolutePath() 공개 정적인 메소드

Writes a message to the given file in the specified location.
public static WriteTextFileAbsolutePath ( StringBuilder message, string file, bool append ) : void
message StringBuilder The message to write.
file string The name of the file, e.g. "Log.txt".
append bool
리턴 void

WriteTextFileAbsolutePath() 공개 정적인 메소드

Writes a message to the given file in the specified location.
public static WriteTextFileAbsolutePath ( string message, string file, bool append ) : void
message string The message to write.
file string The name of the file, e.g. "Log.txt".
append bool
리턴 void

프로퍼티 상세

Diacritics 공개적으로 정적으로 프로퍼티

public static string[][] Diacritics
리턴 string[][]

SortKeyChars 공개적으로 정적으로 프로퍼티

public static string[][] SortKeyChars
리턴 string[][]

WriteDebugEnabled 공개적으로 정적으로 프로퍼티

Gets or sets value whether debug is enabled
public static bool WriteDebugEnabled
리턴 bool