Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 189 lines (102 sloc) 3.923 kb
f827493 @falconindy have a man page
authored
1 =head1 NAME
2
d9e1761 @falconindy unify language: alpm data extraction tool
authored
3 expac - alpm data extraction utility
f827493 @falconindy have a man page
authored
4
5 =head1 SYNOPSIS
6
7 Usage: I<expac> [options] E<lt>formatE<gt> targets...
8
9 =head1 DESCRIPTION
10
11 expac is a data extraction tool for alpm databases. It features printf-like
12 flexibility and aims to be used as a simple tool for other pacman based
13 utilities which don't link against the library. It uses pacman.conf as a config
14 file for locating and loading your local and sync databases.
15
88b6976 @falconindy cleanup/improve usage and documentation
authored
16 Invoking expac consists of supplying a format string, which is generally
17 described by one to many of the formatting tokens (see the B<FORMATTING>
18 section), any relevant options and zero to many targets. The format string
19 B<must> be the first non-option argument. Targets can be a simple package name,
20 a query string (in the case of a search), or in repo/package syntax when the
21 -sync option is supplied.
f827493 @falconindy have a man page
authored
22
23 =head1 OPTIONS
24
25 =over 4
26
27 =item B<-Q, --query>
28
29 Search the local database for provided targets. This is the default behavior.
30
88b6976 @falconindy cleanup/improve usage and documentation
authored
31 =item B<-S, --sync>
32
33 Search the sync databases for provided targets.
34
f827493 @falconindy have a man page
authored
35 =item B<-s, --search>
36
37 Search for packages matching the strings specified by targets. This is a
38 boolean AND query and regex is allowed.
39
3664af8 @falconindy add support for searching by group
authored
40 =item B<-g, --group>
41
42 Return packages matching the specified targets as package groups.
43
3857cd0 @falconindy add --config option to point at another pacman.conf
authored
44 =item B<--config> <file>
45
46 Read from I<file> for alpm initialization instead of I</etc/pacman.conf>.
47
765fc11 @falconindy add -H, --humansize parameter for formatting package sizes
authored
48 =item B<-H, --humansize> <size>
49
50 Format package sizes in SI units according to I<size>. Valid options are:
51
52 B, K, M, G, T, P, E, Z, Y
53
ccd22f9 @falconindy add -1 option for limited -S operations
authored
54 =item B<-1, --readone>
55
56 Stop searching after the first result. This only has an effect on -S operations
57 without -s.
58
f827493 @falconindy have a man page
authored
59 =item B<-d, --delim> <string>
60
61 Separate each package with the specified I<string>. The default value is a
62 newline character.
63
64 =item B<-l, --listdelim> <string>
65
66 Separate each list item with the specified I<string>. Lists are any interpreted
67 sequence specified with a capital letter. The default value is two spaces.
68
7ec0a2f @falconindy add -p option to alpm_pkg_load arguments
authored
69 =item B<-p, --file>
70
261c9a9 @falconindy ignore -S and -Q options for -p.
authored
71 Interpret targets as paths to local files.
7ec0a2f @falconindy add -p option to alpm_pkg_load arguments
authored
72
f827493 @falconindy have a man page
authored
73 =item B<-t, --timefmt> <format>
74
75 Output time described by the specified I<format>. This string is passed directly
76 to strftime(3). The default format is %c.
77
78 =item B<-v, --verbose>
79
80 Output more. `Package not found' errors will be shown, and empty field values
81 will display as 'None'.
82
83 =item B<-h, --help>
84
85 Display the help message and quit.
86
87 =back
88
89 =head1 FORMATTING
90
91 The format argument allows the following interpreted sequences:
92
93 %B backup files
94
95 %C conflicts with
96
97 %D depends on
98
99 %E depends on (no version strings)
100
101 %F files (only with -Q)
102
103 %G groups
104
105 %L licenses
106
107 %N required by
108
109 %O optional deps
110
da0fbab @falconindy add %o for optdepends without descriptions
authored
111 %o optional deps (no descriptions)
112
f827493 @falconindy have a man page
authored
113 %P provides
114
115 %R replaces
116
117 %S provides (no version strings)
118
119 %a architecture
120
121 %b build date
122
123 %d description
124
125 %f filename (only with -S)
126
40cd830 @falconindy add %g formatter for base64 signature
authored
127 %g base64 encoded PGP signature (only with -S)
128
a099ff1 @falconindy add %h formatter for sha256sum
authored
129 %h sha256sum
130
c860104 @JohnFrazier Add 'V' format for package validation methods.
JohnFrazier authored
131 %V package validation method
132
d35f8eb @falconindy add install reason as %w
authored
133 %i has install scriptlet (only with -Q)
f827493 @falconindy have a man page
authored
134
a971ee4 @falconindy %k is sync only
authored
135 %k download size (only with -S)
f827493 @falconindy have a man page
authored
136
137 %l install date (only with -Q)
138
139 %m install size
140
63291c8 @falconindy add %M for only modified backup files
authored
141 %M modified backup files (only with -Q)
142
f827493 @falconindy have a man page
authored
143 %n package name
144
145 %p packager name
146
147 %r repo
148
149 %s md5sum
150
151 %u project URL
152
153 %v version
154
a89229e @falconindy man: add note about %w being restricted to -Q
authored
155 %w install reason (only with -Q)
d35f8eb @falconindy add install reason as %w
authored
156
928f60e @falconindy add %! as an auto-increment record counter
authored
157 %! result number (auto-incremented counter, starts at 0)
158
f827493 @falconindy have a man page
authored
159 %% literal %
160
e835af7 @falconindy allow real printf formatters for simple strings
authored
161 Note that for any lowercase tokens aside from %m and %k, full printf support is
162 allowed, e.g. %-20n. This does not apply to any list based, date, or numerical
163 output.
164
165 Standard backslash escape sequences are supported, as per printf(1).
f827493 @falconindy have a man page
authored
166
88b6976 @falconindy cleanup/improve usage and documentation
authored
167 =head1 EXAMPLES
168
169 Emulate pacman's search function:
170
171 =over 4
172
173 $ expac -Ss '%r/%n %v\n %d' <search terms>
174
175 =back
176
177 List the oldest 10 installed packages (by build date):
178
179 =over 4
180
181 $ expac --timefmt=%s '%b\t%n' | sort -n | head -10
182
183 =back
184
f827493 @falconindy have a man page
authored
185 =head1 AUTHOR
186
187 Dave Reisner E<lt>d@falconindy.comE<gt>
188
Something went wrong with that request. Please try again.