change 0.0.9 change: ^0.0.9 copied to clipboard
A Changelog manipulation library. Read/modify/write your CHANGELOG.md. Inspired by keepachangelog.com.
import 'dart:io';
import 'package:change/model.dart';
/// This example shows how to parse a changelog.
/// Run it from the project root folder: `dart example/main.dart`
void main() async {
final file = File('CHANGELOG.md');
final changelog = Changelog.fromLines(await file.readAsLines());
final releases = changelog.releases;
final latest = releases.last;
print('Changelog contains ${releases.length} releases');
print('The latest is ${latest.version} released on ${latest.date}');
}