WikiCrawler/Batch/BatchUploader.cs
/// <summary>
/// Run any additional logic immediately before the article is uploaded (such as creating dependency pages).
/// </summary>
Run any additional logic immediately before the article is uploaded (such as creating dependency pages).
Run any additional logic immediately before the article is uploaded ( such as creating dependency pages ) .
protected virtual void PreUpload(string key, Article article)
	{
		int takenOnIndex = article.revisions[0].text.IndexOf("{{taken on|", StringComparison.CurrentCultureIgnoreCase);
		if (takenOnIndex >= 0)
		{
			int takenOnCloseIndex = article.revisions[0].text.IndexOf("}}", takenOnIndex);
			int dateStart = takenOnIndex + "{{taken on|".Length;
			string date = article.revisions[0].text.Substring(dateStart, takenOnCloseIndex - dateStart);
			CommonsUtility.EnsureTakenOnCategories(Api, date);
		}
	}
protected virtual void PreUpload ( string key , Article article ) { int takenOnIndex = article . revisions [ 0 ] . text . IndexOf ( " " , StringComparison . CurrentCultureIgnoreCase ) ; if ( takenOnIndex >= 0 ) { int takenOnCloseIndex = article . revisions [ 0 ] . text . IndexOf ( " " , takenOnIndex ) ; int dateStart = takenOnIndex + " " . Length ; string date = article . revisions [ 0 ] . text . Substring ( dateStart , takenOnCloseIndex - dateStart ) ; CommonsUtility . EnsureTakenOnCategories ( Api , date ) ; } }
Run any additional logic immediately before the article is uploaded (such as creating dependency pages).
Run any additional logic immediately before the article is uploaded ( such as creating dependency pages ) .
// create categories for {{taken on}} if present
key
string
article
Article