robots_txt_processor 1.0.0 copy "robots_txt_processor: ^1.0.0" to clipboard
robots_txt_processor: ^1.0.0 copied to clipboard

A robots.txt Dart package, useful to parse robots information and convert into more manageable object.

example/example.dart

import 'package:robots_txt_processor/robots_txt_processor.dart';

void main() {
  // Initialize RobotsTxtProcessor
  final RobotsTxtProcessor processor = RobotsTxtProcessor();

  // Process a robots.txt string with only one user-agent
  RobotsTxt robotsTxt = processor.process('User-agent: googlebot');
  print(robotsTxt.groups[0].userAgent);

  // Process a robots.txt string with only one sitemap
  robotsTxt = processor.process('Sitemap: http://example.com/sitemap.xml');
  print(robotsTxt.sitemap[0]);
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A robots.txt Dart package, useful to parse robots information and convert into more manageable object.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on robots_txt_processor