WikiCrawler/Tasks/Commons/CommonsCreatorFromWikidata.cs
/// <summary>
/// Creates creator templates from the wikidata ids in 'creator_queue.txt'.
/// </summary>
Creates creator templates from the wikidata ids in 'creator_queue.txt'.
Creates creator templates from the wikidata ids in ' creator_queue . txt ' .
[BatchTask]
		public static void MakeCreators()
		{
			Api commonsApi = new Api(new Uri("https://commons.wikimedia.org"));
			Console.WriteLine("Logging in...");
			commonsApi.AutoLogIn();
			Wikidata.AutoLogIn();
			using (StreamReader reader = new StreamReader(new FileStream("creator_queue.txt", FileMode.Open), Encoding.Default))
			{
				while (!reader.EndOfStream)
				{
					Entity entity = Wikidata.GetEntity(reader.ReadLine());
					string page;
					TryMakeCreator(commonsApi, entity, "", null, out page);
				}
			}
		}
[ BatchTask ] public static void MakeCreators ( ) { Api commonsApi = new Api ( new Uri ( " " ) ) ; Console . WriteLine ( " " ) ; commonsApi . AutoLogIn ( ) ; Wikidata . AutoLogIn ( ) ; using ( StreamReader reader = new StreamReader ( new FileStream ( " " , FileMode . Open ) , Encoding . Default ) ) { while ( ! reader . EndOfStream ) { Entity entity = Wikidata . GetEntity ( reader . ReadLine ( ) ) ; string page ; TryMakeCreator ( commonsApi , entity , " " , null , out page ) ; } } }
Creates creator templates from the wikidata ids in 'creator_queue.txt'.
Creates creator templates from the wikidata ids in ' creator_queue . txt ' .