Ejemplo n.º 1
0
        private static async Task GenerateSitemap()
        {
            var config = new Config();
            var client = new VocaDbClient(config.SiteRootUrl);

            log.Info("Getting entries from VocaDB");

            var artists = await client.GetArtists();

            var albums = await client.GetAlbums();

            var songs = await client.GetSongs();

            var tags = await client.GetTags();

            log.Info("Generating sitemap");

            var generator = new SitemapGenerator(config.SiteRootUrl, config.SitemapRootUrl);

            generator.Generate(config.OutFolder, new Dictionary <EntryType, IEnumerable <object> > {
                { EntryType.Artist, artists.Cast <object>() },
                { EntryType.Album, albums.Cast <object>() },
                { EntryType.Song, songs.Cast <object>() },
                { EntryType.Tag, tags },
            });
        }
Ejemplo n.º 2
0
        private static async Task GenerateSitemap()
        {
            var config = new Config();
            var client = new VocaDbClient(config.SiteRootUrl);

            s_log.Info("Getting entries from VocaDB");

            var artists = await client.GetArtists();

            var albums = await client.GetAlbums();

            var events = await client.GetEvents();

            var songs = await client.GetSongs();

            var tags = await client.GetTags();

            s_log.Info("Generating sitemap");

            var generator = new SitemapGenerator(config.SiteRootUrl, config.SitemapRootUrl);

            generator.Generate(config.OutFolder, new Dictionary <EntryType, IEnumerable <EntryReference> > {
                { EntryType.Artist, artists.Select(e => new EntryReference(e)) },
                { EntryType.Album, albums.Select(e => new EntryReference(e)) },
                { EntryType.ReleaseEvent, events.Items.Select(e => new EntryReference(e.Id, e.UrlSlug)) },
                { EntryType.Song, songs.Select(e => new EntryReference(e)) },
                { EntryType.Tag, tags.Items.Select(e => new EntryReference(e.Id, e.UrlSlug)) },
            });
        }
Ejemplo n.º 3
0
		private static async Task GenerateSitemap() {
			
			var config = new Config();
			var client = new VocaDbClient(config.SiteRootUrl);

			log.Info("Getting entries from VocaDB");

			var artists = await client.GetArtists();
			var albums = await client.GetAlbums();
			var songs = await client.GetSongs();
			var tags = await client.GetTags();

			log.Info("Generating sitemap");

			var generator = new SitemapGenerator(config.SiteRootUrl, config.SitemapRootUrl);
			generator.Generate(config.OutFolder, new Dictionary<EntryType, IEnumerable<object>> {
				{ EntryType.Artist, artists.Cast<object>() },
				{ EntryType.Album, albums.Cast<object>() },
				{ EntryType.Song, songs.Cast<object>() },
				{ EntryType.Tag, tags },
			});

		}