anitomy_dart 1.0.1
anitomy_dart: ^1.0.1 copied to clipboard
A pure Dart parser for extracting anime metadata from release filenames.
Anitomy Dart #
A pure Dart port of Anitomy, the anime release filename parser. It extracts titles, episode numbers, release groups, checksums, codecs, resolutions, and other metadata without native dependencies.
Installation #
dart pub add anitomy_dart
For Flutter projects, use flutter pub add anitomy_dart instead.
Usage #
Parse a filename, then read the detected elements by category:
import 'package:anitomy_dart/anitomy_dart.dart';
void main() {
final anitomy = Anitomy();
final filename =
'[TaigaSubs]_Toradora!_(2008)_-_01v2_-_Tiger_and_Dragon_[1280x720_H.264_FLAC][1234ABCD].mkv';
if (!anitomy.parse(filename)) {
return;
}
print(anitomy.elements.get(ElementCategory.animeTitle)); // Toradora!
print(anitomy.elements.get(ElementCategory.episodeNumber)); // 01
print(anitomy.elements.get(ElementCategory.releaseGroup)); // TaigaSubs
print(anitomy.elements.get(ElementCategory.videoResolution)); // 1280x720
}
Parsing behavior can be customized before calling parse:
final anitomy = Anitomy()
..options.parseEpisodeTitle = false
..options.ignoredStrings.add('[WebsiteName]');
Tests #
The regression suite uses Anitomy's upstream filename corpus. Run it with:
dart test
License #
Anitomy Dart is available under the Mozilla Public License 2.0, matching the license of the original Anitomy source from which it was ported.
Contributing #
Contributions are welcome. Please open an issue or submit a pull request if you have suggestions or improvements.