VeeFriends Wiki Importer - A .NET library for automating the import of character data from ClickUp, enhanced with AI and media integrations.
$ dotnet add package VeeFriends.WikiImporterVeeFriends.WikiImporter is a .NET library designed to automate the import and transformation of character data from ClickUp into a structured format, incorporating AI-driven enhancements and media assets. The library integrates with multiple services, including Google Drive, Cloudinary, and ChatGPT, to enrich character data with link previews, images, and more.
Install the VeeFriends.WikiImporter NuGet package in your project:
dotnet add package VeeFriends.WikiImporter
Configure the necessary services in your Startup.cs or Program.cs file:
using Microsoft.Extensions.DependencyInjection;
using VeeFriends.WikiImporter;
var services = new ServiceCollection();
services.AddWikiImporter(
configureChatGpt: options => { options.ApiKey = "your-api-key"; options.Model = "gpt-4"; },
configureSystemPrompt: options => { options.Prompt = "Your system prompt here"; },
configureClickUp: options => { options.ApiKey = "your-clickup-api-key"; },
configureCloudinary: options => { options.CloudName = "your-cloudinary-name"; },
configureGoogleDrive: options => { options.ApiKey = "your-google-drive-api-key"; },
linkPreviewOptions: options => { options.ApiKey = "your-link-preview-api-key"; },
configureDZineAi: options => { options.ApiKey = "your-dzine-ai-api-key"; }
);
Inject the CharacterImporter service and call ExecuteImport to start importing character data:
public class WikiImportService
{
private readonly CharacterImporter _characterImporter;
public WikiImportService(CharacterImporter characterImporter)
{
_characterImporter = characterImporter;
}
public async Task ImportCharactersAsync()
{
var importOptions = new ImportOptions
{
OnProgress = (progress, _) => Console.WriteLine($"Progress: {progress}%"),
OnError = (error, _) => Console.WriteLine($"Error: {error.Message}"),
DelayBetweenRequests = TimeSpan.FromSeconds(1),
SkipCache = false
};
await _characterImporter.ExecuteImport(importOptions, CancellationToken.None);
}
}The library provides structured error handling using logging and event-driven error reporting:
try
{
await _characterImporter.ExecuteImport(importOptions, CancellationToken.None);
}
catch (Exception ex)
{
Console.WriteLine($"Import failed: {ex.Message}");
}To extend the importer with a new data source:
CharacterImporter to include the new source.ModifyWithGoogleDrive or ModifyWithLinkPreview patterns.ServiceCollectionExtensions.VeeFriends.WikiImporter relies on several external services:
This project is licensed under the MIT License. See the LICENSE file for more details.