capitol

Crates.iocapitol
lib.rscapitol
version0.6.0
created_at2025-01-17 19:04:33.049292+00
updated_at2026-01-22 18:14:37.24247+00
descriptionParse United States Congress legislative document citations
homepage
repositoryhttps://codeberg.org/blackerby/capitol
max_upload_size
id1520902
size45,637
William Blackerby (blackerby)

documentation

https://docs.rs/capitol

README

Capitol

Capitol is a Rust library for converting citation strings for United States Congressional documents, e.g., 118hr815 representing the H.R.815 in the 118th Congress, into Rust types. These Rust types can be printed as URLs on Congress.gov or Govinfo, depending on the type of document.

In the current release, citations for bills, resolutions, commitee prints and reports from either chamber, public laws, and statutes at large are implemented. For example, calling Citation::parse with the argument 118hr815 returns the following:

Citation::Measure {
    congress: Some(Congress(118)),
    chamber: Chamber::House,
    measure_type: MeasureType::Bill,
    number: 815,
    version: None
}

Calling to_url on that struct return https://www.congress.gov/bill/118th-congress/house-bill/815.

Installation

Capitol is available from crates.io.

Commit count: 107

cargo fmt