The API Contract and Data Models for the Yukari Ecosystem https://www.nuget.org/packages/Yukari.Core
Find a file
2026-03-12 19:43:52 -03:00
Yukari.Core style(csharp): format all code with CSharpier 2026-02-23 17:19:49 -03:00
.gitignore Initial commit 2025-09-04 01:30:28 -03:00
dotnet-tools.json style(csharp): format all code with CSharpier 2026-02-23 17:19:49 -03:00
LICENSE Initial commit 2025-09-04 01:30:28 -03:00
README.md docs(readme): initial readme content 2026-03-12 19:43:52 -03:00
Yukari.Core.sln refactor: reorganize project directories 2025-09-04 02:22:52 -03:00

⚙️ Yukari.Core

NuGet Version GitHub last commit GitHub repo size

📖 Overview

Yukari.Core is the central library of contracts and data models for the Yukari ecosystem.

It defines the IComicSource interface and all the necessary templates (Comic, Chapter, ChapterPage, Filter, etc.) that must be implemented by comic plugins/sources.

The main application Yukari (a modern manga, webtoon, and comic book reader for Windows, built on WinUI 3 + .NET) dynamically loads these plugins to search, list, and read content from different websites and services without needing to modify the main code.

✍️ How to Create a ComicSource

  • Create a new Class Library project (.NET 10)
  • Install the package:
    <PackageReference Include="Yukari.Core" Version="*" />
    
  • Implement IComicSource:
    public class MyComicSource : IComicSource
    {
        public string Name => "My Source";
        public string Version => "1.0.0+core1.4.0"; // match your Yukari.Core version
        public string? LogoUrl => null;
        public string? Description => "Example comic source";
    
        public IReadOnlyList<Filter> Filters => Array.Empty<Filter>();
        public IReadOnlyDictionary<string, string> Languages =>
            new Dictionary<string, string> { ["en"] = "English" };
    
        public Task<IReadOnlyList<Comic>> SearchAsync(
            string query,
            IReadOnlyDictionary<string, IReadOnlyList<string>> filters,
            CancellationToken ct = default
        )
        {
            // Implement search logic here
            return Task.FromResult<IReadOnlyList<Comic>>(Array.Empty<Comic>());
        }
    
        // Implement remaining methods: GetTrendingAsync, GetDetailsAsync, GetChapterDetailsAsync,
        // GetAllChaptersAsync, GetChapterPagesAsync...
    
        public ValueTask DisposeAsync() => ValueTask.CompletedTask;
    }
    
  • Build → get the .dll
  • Publish as a new repo in the org (or your own), with Releases containing the DLL. Current examples:

🗒️ Notes

  • Use a single/shared HttpClient instance with proper User-Agent
  • Consider static lazy initialization for Filters and Languages
  • Respect rate limits and implement proper error handling
  • Return empty collections or null instead of throwing when no data is found (when reasonable)
  • All async methods should support CancellationToken
  • XML documentation on public members is highly appreciated

🤝 Contributing

Contributions are welcome! You can help improve Yukari.Core in several ways:

  • 🐛 Report issues: Found a bug or unexpected behavior? Open an issue describing the problem.
  • Suggest features: Have an idea to make Yukari.Core better? Share it in the issues tab.
  • 🔧 Submit pull requests: Fix bugs, improve code quality, or add new features.

📜 License

This project is licensed under the GPL-3.0. See the LICENSE file for details.