Crate debian_changelog

source ·
Expand description

A lossless parser for Debian changelog files.

For its format specification, see Debian Policy.

Example:

use std::io::Read;
let contents = r#"rustc (1.70.0+dfsg1-1) unstable; urgency=medium

  * Upload to unstable

 -- Jelmer Vernooij <jelmer@debian.org>  Wed, 20 Sep 2023 20:18:40 +0200
"#;
let changelog: debian_changelog::ChangeLog = contents.parse().unwrap();
assert_eq!(
    vec![("rustc".to_string(), "1.70.0+dfsg1-1".parse().unwrap())],
    changelog.entries().map(
        |e| (e.package().unwrap(), e.version().unwrap()))
    .collect::<Vec<_>>());

Modules§

  • Functions to parse the changes from a changelog entry.
  • Text wrapping functions

Structs§

Enums§

  • See https://manpages.debian.org/bookworm/dpkg-dev/deb-changelog.5.en.html Let’s start with defining all kinds of tokens and composite nodes.

Functions§