WikiCrawler/Batch/BatchUploader.cs
/// <summary>
/// Get a string that should be used for the file's 'author' field.
/// </summary>
Get a string that should be used for the file's 'author' field.
Get a string that should be used for the file ' s ' author ' field .
protected virtual string GetAuthor(string name, string lang, out Creator creator)
	{
		creator = null;
		string finalResult = "";
		foreach (string author in ParseAuthor(name))
		{
			if (CreatorUtility.TryGetCreator(author, out creator))
			{
				creator.Usage++;
				if (!string.IsNullOrEmpty(creator.Author))
				{
					finalResult += creator.Author;
					continue;
				}
			}
			if (!string.IsNullOrEmpty(lang))
			{
				finalResult += "{{" + lang + "|" + author + "}}";
			}
			else
			{
				finalResult = StringUtility.Join("; ", finalResult, author);
			}
		}
		return finalResult;
	}
protected virtual string GetAuthor ( string name , string lang , out Creator creator ) { creator = null ; string finalResult = " " ; foreach ( string author in ParseAuthor ( name ) ) { if ( CreatorUtility . TryGetCreator ( author , out creator ) ) { creator . Usage ++ ; if ( ! string . IsNullOrEmpty ( creator . Author ) ) { finalResult += creator . Author ; continue ; } } if ( ! string . IsNullOrEmpty ( lang ) ) { finalResult += " " + lang + " " + author + " " ; } else { finalResult = StringUtility . Join ( " " , finalResult , author ) ; } } return finalResult ; }
Get a string that should be used for the file's 'author' field.
Get a string that should be used for the file ' s ' author ' field .
//TODO: support multiple creators // if we get here, there is not yet a mapping for this creator //TODO: better support for tags with plaintext
name
string
lang
string
Creator
out