Skip to content
jc-rs
GitHub

pacman

--pacmanv1.0.0

Converts `pacman` command output to JSON

command
$ pacman | jc-rs --pacman

A real pair

From the reference corpus (generic/pacman--si-graphicsmagick.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

pacmangeneric
Repository      : extra
Name            : graphicsmagick
Version         : 1.3.43-1
Description     : Image processing system
Architecture    : x86_64
URL             : http://www.graphicsmagick.org/
Licenses        : MIT
Groups          : None
Provides        : Magick.so  libGraphicsMagickWand.so=2-64  libGraphicsMagick.so=3-64  libGraphicsMagick++-Q16.so
Depends On      : bzip2  freetype2  lcms2  libltdl  libpng  libsm  libtiff  libwebp  libxext  xz
Optional Deps   : jasper: jp2 module
                  libwmf: wmf module
                  libxml2: msl, svg, url modules
                  ghostscript: pdf, ps modules
                  libheif: heic module
                  libjxl: jpeg-xl module
Conflicts With  : None
Replaces        : None
Download Size   : 2.58 MiB
Installed Size  : 13.97 MiB
Packager        : Caleb Maclennan <alerque@archlinux.org>
Build Date      : Sat 23 Mar 2024 09:55:47 PM CET
Validated By    : MD5 Sum  SHA-256 Sum  Signature
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "repository": "extra",
    "name": "graphicsmagick",
    "version": "1.3.43-1",
    "description": "Image processing system",
    "architecture": "x86_64",
    "url": "http://www.graphicsmagick.org/",
    "licenses": [
      "MIT"
    ],
    "groups": [],
    "provides": [
      "Magick.so",
      "libGraphicsMagickWand.so=2-64",
      "libGraphicsMagick.so=3-64",
      "libGraphicsMagick++-Q16.so"
    ],
    "depends_on": [
      "bzip2",
      "freetype2",
      "lcms2",
      "libltdl",
      "libpng",
      "libsm",
      "libtiff",
      "libwebp",
      "libxext",
      "xz"
    ],
    "optional_deps": [
      {
        "name": "jasper",
        "description": "jp2 module"
      },
      {
        "name": "libwmf",
        "description": "wmf module"
      },
      {
        "name": "libxml2",
        "description": "msl, svg, url modules"
      },
      {
        "name": "ghostscript",
        "description": "pdf, ps modules"
      },
      {
        "name": "libheif",
        "description": "heic module"
      },
      {
        "name": "libjxl",
        "description": "jpeg-xl module"
      }
    ],
    "conflicts_with": [],
    "replaces": [],
    "download_size": "2.58 MiB",
    "installed_size": "13.97 MiB",
    "packager": "Caleb Maclennan <alerque@archlinux.org>",
    "build_date": "Sat 23 Mar 2024 09:55:47 PM CET",
    "validated_by": [
      "MD5 Sum",
      "SHA-256 Sum",
      "Signature"
    ],
    "download_size_bytes": 2705326,
    "installed_size_bytes": 14648606,
    "build_date_epoch": 1711256147
  }
]

Fixture coverage

3/3oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs pacmanjc-rs runs the command itself and parses what it prints. Recognised for: `pacman`, `yay`

Source: crates/jc-rs-parsers/src/package/pacman.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare