A Dart library for parsing .torrent file to Torrent model/saving Torrent model to .torrent file.

codecov

Support

Usage

A simple usage example:

Parse .torrent file

import 'package:dtorrent_parser/dtorrent_parser.dart';

main() {
  ....

  var model = Torrent.parse('some.torrent');

  ....
}

Use Torrent class' static method parse to get a torrent model. The important informations of .torrent file can be found in the torrent model , such as announces list , infoHash ,etc..

Testing

Run tests:

dart test

Run tests with coverage:

dart test --coverage=coverage
dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib

Or use the provided script:

dart tool/coverage.dart

The coverage report will be generated at coverage/lcov.info and can be viewed with tools like genhtml or uploaded to services like Codecov.

Coverage is automatically uploaded to Codecov on every push and pull request via GitHub Actions.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

dtorrent_parser