expac
expac copied to clipboard
alpm data extraction utility
=head1 NAME
expac - alpm data extraction utility
=head1 SYNOPSIS
Usage: I
=head1 DESCRIPTION
expac is a data extraction tool for alpm databases. It features printf-like flexibility and aims to be used as a simple tool for other pacman based utilities which don't link against the library. It uses pacman.conf as a config file for locating and loading your local and sync databases.
Invoking expac consists of supplying a format string, which is generally
described by one to many of the formatting tokens (see the B<FORMATTING>
section), any relevant options and zero to many targets. The format string
B
=head1 OPTIONS
=over 4
=item B<-Q, --query>
Search the local database for provided targets. This is the default behavior.
=item B<-S, --sync>
Search the sync databases for provided targets.
=item B<-s, --search>
Search for packages matching the strings specified by targets. This is a boolean AND query and regex is allowed.
=item B<-g, --group>
Return packages matching the specified targets as package groups.
=item B<--config>
Read from I
=item B<-H, --humansize>
Format package sizes in SI units according to I
B, K, M, G, T, P, E, Z, Y
=item B<-1, --readone>
Stop searching after the first result. This only has an effect on -S operations without -s.
=item B<-d, --delim>
Separate each package with the specified I
=item B<-l, --listdelim>
Separate each list item with the specified I
=item B<-p, --file>
Interpret targets as paths to local files.
=item B<-t, --timefmt>
Output time described by the specified I
=item B<-v, --verbose>
Output more. `Package not found' errors will be shown, and empty field values will display as 'None'.
=item B<-V, --version>
Display version information and quit.
=item B<-h, --help>
Display the help message and quit.
=back
=head1 FORMATTING
The format argument allows the following interpreted sequences:
%a architecture
%B backup files
%b build date
%C conflicts with (no version strings)
%D depends on
%d description
%E depends on (no version strings)
%e package base
%f filename (only with -S)
%F files (only with -Q)
%g base64 encoded PGP signature (only with -S)
%G groups
%H conflicts with
%h sha256sum
%i has install scriptlet (only with -Q)
%k download size (only with -S)
%l install date (only with -Q)
%L licenses
%m install size
%M modified backup files (only with -Q)
%n package name
%N required by
%O optional deps
%o optional deps (no descriptions)
%p packager name
%P provides
%R replaces (no version strings)
%r repo
%s md5sum
%S provides (no version strings)
%T replaces
%u project URL
%V package validation method
%v version
%w install reason (only with -Q)
%! result number (auto-incremented counter, starts at 0)
%% literal %
Note that for any lowercase tokens aside from %m and %k, full printf support is allowed, e.g. %-20n. This does not apply to any list based, date, or numerical output.
Standard backslash escape sequences are supported, as per printf(1).
=head1 EXAMPLES
Emulate pacman's search function:
=over 4
$ expac -Ss '%r/%n %v\n %d'
=back
List the oldest 10 installed packages (by build date):
=over 4
$ expac --timefmt=%s '%b\t%n' | sort -n | head -10
=back
=head1 AUTHOR
Dave Reisner E