| name | add-backup-format |
| description | Use when adding a new manga backup format to the converter, implementing target or source support for a format, or extending the pipeline to support a new manga app backup type. Triggers include "add format", "implement target builder", "add source support", "support a new manga app backup", "new backup type", "import support for", "export to format". |
Add Backup Format
Overview
Adding a backup format has two independent dimensions: source (reading/importing backups) and target (building/exporting backups). Both require pipeline registration. A format can be source-only, target-only, or both.
All format code lives in packages/mangabackupconverter_cli/. The pipeline layer in lib/src/pipeline/ ties formats together. Detailed interface signatures and code patterns are in references/implementation-details.md.
When to Use
- Adding import support for a new manga app's backup file
- Adding export/target support so the pipeline can build backups in a format
- Registering a new format in the pipeline (BackupFormat, ConversionStrategy)
- Extending an existing format with source or target capabilities it lacks
Do NOT use for modifying existing format models without adding a new format.
Part A: Source Format Support
Add the ability to read and import a backup file.
Checklist
Part B: Pipeline Registration
Register the format so the pipeline can select and route it.
Checklist
Part C: Target Format Support
Add the ability to build/export a backup in this format from migration results.
Checklist
Part D: Testing
Checklist
Test conventions
- Import
package:checks/checks.dart + package:test/scaffolding.dart (not package:test/test.dart)
- Avoid barrel import (
mangabackupconverter_lib.dart) when names clash with package:test (e.g. Skip)
- Use
--reporter expanded for dart test (not -v)
- dart_mappable models with
with ...Mappable cannot be const-constructed in tests
Key References
Exact interface signatures, data type fields, annotation patterns, builder walkthrough, and code examples: see references/implementation-details.md.
Key source files:
lib/src/common/convertable.dart — ConvertableBackup, MangaSearchEntry
lib/src/pipeline/backup_format.dart — BackupFormat sealed class
lib/src/pipeline/target_backup_builder.dart — TargetBackupBuilder, AidokuBackupBuilder
lib/src/pipeline/source_manga_data.dart — normalized data types
lib/src/pipeline/plugin_source.dart — PluginSource interface, search result types
lib/src/pipeline/plugin_loader.dart — PluginLoader sealed class
lib/src/pipeline/conversion_strategy.dart — determineStrategy()
lib/src/converter.dart — MangaBackupConverter
lib/mangabackupconverter_lib.dart — barrel exports
All paths relative to packages/mangabackupconverter_cli/.