mirror of
https://github.com/Yukari-App/Core.git
synced 2026-03-19 12:04:27 -03:00
The API Contract and Data Models for the Yukari Ecosystem
https://www.nuget.org/packages/Yukari.Core
- C# 100%
| Yukari.Core | ||
| .gitignore | ||
| dotnet-tools.json | ||
| LICENSE | ||
| README.md | ||
| Yukari.Core.sln | ||
⚙️ Yukari.Core
📖 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:
- Plugin.MangaDex
- Plugin.ComicK (archived)
Browse all: Yukari-App repositories → Plugin.*
🗒️ Notes
- Use a single/shared
HttpClientinstance with proper User-Agent - Consider static lazy initialization for Filters and Languages
- Respect rate limits and implement proper error handling
- Return empty collections or
nullinstead 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.