49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Pf2eDataScrapper.Importers.Implementations.FoundryEn.Compendium;
|
|
using Pf2eDataScrapper.Importers.Repositories;
|
|
|
|
namespace Pf2eDataScrapper.Importers.Implementations.FoundryEn;
|
|
|
|
/// <summary>
|
|
/// Импортёр для модуля Pf2e FoundryVTT.
|
|
/// </summary>
|
|
internal class FoundryEnImporter : AbstractImporter
|
|
{
|
|
/// <summary>
|
|
/// Название внешней ссылки.
|
|
/// </summary>
|
|
public const string TargetName = "Pf2e FoundryVTT module";
|
|
|
|
/// <summary>
|
|
/// Отображаемое имя импортёра.
|
|
/// </summary>
|
|
public override string Name => TargetName;
|
|
|
|
/// <summary>
|
|
/// Короткое имя импортёра.
|
|
/// </summary>
|
|
public override string Slug => "foundry-en";
|
|
|
|
#region "Внедрение зависимостей"
|
|
|
|
public static void RegisterServices(IServiceCollection services)
|
|
{
|
|
services.AddSingleton<FoundryEnImporter>();
|
|
services.AddSingleton<FoundryEnRepository>();
|
|
services.AddSingleton<FoundryEnCompendium>();
|
|
|
|
services.AddSingleton<CompendiumFolderCollection>();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
/// <summary>
|
|
/// Git-репозиторий данных FoundryVTT-модуля "pf2e".
|
|
/// </summary>
|
|
/// <param name="importer"><inheritdoc cref="FoundryEnImporter"/></param>
|
|
internal class FoundryEnRepository(FoundryEnImporter importer) : GitRepository(importer, GitUrl)
|
|
{
|
|
public const string GitUrl = "https://github.com/foundryvtt/pf2e.git";
|
|
}
|