kellyjonbrazil / jc

CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
MIT License
7.91k stars 210 forks source link

Fix documentation for apt-get-sqq parser #555

Closed kellyjonbrazil closed 5 months ago

kellyjonbrazil commented 7 months ago

The documentation would be better with something like this as an usage example:

$ apt-get -sqq upgrade | jc --apt-get-sqq

or

$ jc apt-get -sqq full-upgrade

Missing out upgrade or dist-upgrade or full-upgrade from the command results in a command that fails:

apt-get -sqq 
E: Command line option 's' [from -sqq] is not understood in combination with the other options.

Originally posted by @chriscroome in https://github.com/kellyjonbrazil/jc/issues/340#issuecomment-2026320141

chriscroome commented 7 months ago

Thanks @kellyjonbrazil it is working well:

apt-get -sqq upgrade | jc --apt-get-sqq -Py
---
- operation: unpack
  package: firefox-nightly-l10n-en-gb
  broken: 126.0a1~20240328092313
  proposed_pkg_ver: 126.0a1~20240328213634 namespaces/moz-fx-productdelivery-pr-38b5/repositories/mozilla:mozilla
  existing_pkg_ver:
  architecture: all
- operation: unpack
  package: firefox-nightly
  broken: 126.0a1~20240328092313
  proposed_pkg_ver: 126.0a1~20240328213634 namespaces/moz-fx-productdelivery-pr-38b5/repositories/mozilla:mozilla
  existing_pkg_ver:
  architecture: amd64
- operation: configure
  package: firefox-nightly-l10n-en-gb
  broken:
  proposed_pkg_ver: 126.0a1~20240328213634 namespaces/moz-fx-productdelivery-pr-38b5/repositories/mozilla:mozilla
  existing_pkg_ver:
  architecture: all
- operation: configure
  package: firefox-nightly
  broken:
  proposed_pkg_ver: 126.0a1~20240328213634 namespaces/moz-fx-productdelivery-pr-38b5/repositories/mozilla:mozilla
  existing_pkg_ver:
  architecture: amd64
kellyjonbrazil commented 6 months ago

Updates in the dev branch and will make it in the next release.

https://github.com/kellyjonbrazil/jc/blob/dev/jc/parsers/apt_get_sqq.py

kellyjonbrazil commented 5 months ago

Fixed in v1.25.3