dpkg-query-json

Crates.iodpkg-query-json
lib.rsdpkg-query-json
version0.1.12
sourcesrc
created_at2021-05-31 13:52:50.450122
updated_at2021-05-31 16:08:24.73465
descriptionA crate for parsing "dpkg-query" in json. Debian/Ubuntu.
homepage
repositoryhttps://github.com/py-whl-rust/dpkg-query-json
max_upload_size
id404237
size9,160
(py-whl-rust)

documentation

README

dpkg-query-json

A crate for parsing “dpkg-query” in json.

Examples

use dpkg_query_json::QueryFieldPackage;
let fields = vec![String::from("Package"),
String::from("Version"),
String::from("Architecture")];
let packages = vec![String::from("dpkg")];
QueryFieldPackage::new(fields, packages).json(); //Map<String, Value>

// {"dpkg": Object({"Architecture": String("amd64"), "Version": String("1.19.7ubuntu3")})}
use dpkg_query_json::QueryFieldPackage;
let fields = vec![String::from("Package"),
String::from("Version"),
String::from("Architecture")];
let packages = vec![String::from("dpkg")];
QueryFieldPackage::new(fields, packages).json_string(); //String

// "{\"dpkg\":{\"Architecture\":\"amd64\",\"Version\":\"1.19.7ubuntu3\"}}"

Package information fields

Architecture

Bugs

Conffiles

Config-Version

Conflicts

Breaks

Depends

Description

Enhances

Essential

Filename

Installed-Size

MD5sum

MSDOS-Filename

Maintainer

Origin

Package

Pre-Depends

Priority

Provides

Recommends

Replaces

Revision

Section

Size

Source

Status

Suggests

Version

Commit count: 4

cargo fmt