Skip to main content

utility for curating Arch Linux software package lists

Project description

pcurate

Pcurate is a command line utility with the purpose of 'curating' or carefully arranging lists of explicitly installed Arch Linux software packages.

I created this because I was often updating text files with lists of installed software and notes concerning many packages. It became a chore to manage that information for a number of uniquely configured hosts, and keeping it in sync with changes.

This utility provides a convenient way to organize software stacks into package lists which can either be fed back to the package manager for automatic installation, or simply used for reference and planning.

Features include

  • Tagging/categorization of curated packages, for easier filtering and sorting
  • Alternate package descriptions can be set, such as the reason for installation
  • Data is exportable to a simple package list or comma delimited (csv) format
  • Optional filter.txt file for specifying packages or package groups to be excluded
  • Option to limit display output to only include either native or foreign packages

Note: Package version information is untracked because Arch Linux is a rolling release distribution, and this utility is not meant to aid in maintaining partial upgrades. If needed, notes on versioning can be stored in a package tag or description attribute.

Installation

Install or upgrade to latest version using pip

$ python -m pip install pcurate --user --upgrade

Usage

$ pcurate -h
pcurate

Usage:
  pcurate PACKAGE_NAME [-u | -s [-t TAG] [-d DESCRIPTION]]
  pcurate ( -c | -r | -m ) [-n | -f] [-v]
  pcurate ( -h | --help | --version)

Options:
  -u --unset              Unset package curated status
  -s --set                Set package curated status
  -t tag --tag tag        Set package tag
  -d desc --desc desc     Set package description
  -c --curated            Display all curated packages
  -r --regular            Display packages not curated
  -m --missing            Display missing curated packages
  -n --native             Limit display to native packages
  -f --foreign            Limit display to foreign packages
  -v --verbose            Display additional info (csv)
  -h --help               Display help
  --version               Display pcurate version

Examples

Display information for a package

$ pcurate firefox

Set a package as curated status (a keeper)

$ pcurate -s vim

Unset a package to revoke its curated status (and remove any tag or custom description)

$ pcurate -u emacs

Set a package with an optional tag and custom description

$ pcurate -s mousepad -t editors -d "my cat installed this"

The following is a command I use to interactively mark multiple packages as curated. Tab or Shift+Tab to mark or unmark, commit with Enter or cancel with Esc. This requires fzf to be installed.

$ pcurate -r | fzf -m | xargs -I % pcurate -s %

Package List examples

Display a list of regular packages (those which are installed but not yet curated)

$ pcurate -r

Display a list of curated packages that are missing (either no longer installed or their install reason has been changed to dependency).

$ pcurate -m

Set curated status for all packages listed in an existing pkglist.txt file (a simple text file containing a newline separated list of package names)

$ cat pkglist.txt | xargs -I % pcurate -s %

Export all curated native packages to a new pkglist.txt file

$ pcurate -cn > pkglist.txt

Send the resulting pkglist.txt to package manager for automatic installation

$ pacman -S --needed - < pkglist.txt

Write a detailed list of curated packages to csv format so you can view it as a spreadsheet, etc.

$ pcurate -cv > pkglist.csv

Configuration

$XDG_CONFIG_HOME/pcurate or ~/.config/pcurate is the default location for the package database and filter.txt file. The optional filter.txt file is a simple newline separated list of packages or package groups. Single line comments can also be added.

Any packages or members of package groups listed in the filter.txt will be purged from the pcurate database and excluded from command output. Filter rules are only applied against regular packages.

License

The MIT License (MIT)

Copyright © 2021 Scott Reed

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pcurate-0.1.6.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

pcurate-0.1.6-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pcurate-0.1.6.tar.gz.

File metadata

  • Download URL: pcurate-0.1.6.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.16.0-arch1-1

File hashes

Hashes for pcurate-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a68088aaa92f486b6ba9e32cd9a58d5379fa20294c3f30373a802f3572939dd2
MD5 2f7b85352784841bce7d8c07878613b4
BLAKE2b-256 554336f4973b9701444008467f695e2565e6f6f0cc57879dc5aa7cf6f442ecbf

See more details on using hashes here.

File details

Details for the file pcurate-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pcurate-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.16.0-arch1-1

File hashes

Hashes for pcurate-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 31ac29870787301dfa7eb6106b65fb04a208f12c193ed021b2b8b09d66bcd527
MD5 bba5af04fa845b0104b69e2230bf85f6
BLAKE2b-256 cfcfd20ae3d77b636231a6a070aa1e11bea036d38260184dd4c7e012aa163a9c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page