Skip to content

Commit 71f37be

Browse files
committed
Initial commit of repology
0 parents  commit 71f37be

File tree

6 files changed

+473
-0
lines changed

6 files changed

+473
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
repology
2+
repology.o
3+
repology.core

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2024 Brian Callahan <bcallah@openbsd.org>
2+
3+
Permission to use, copy, modify, and distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# repology Makefile
2+
3+
PREFIX ?= /usr/local
4+
MANDIR ?= ${PREFIX}
5+
6+
DMD ?= dmd
7+
DFLAGS ?= -O -release -inline
8+
9+
PROG = repology
10+
11+
all:
12+
${DMD} ${DFLAGS} ${PROG}.d
13+
14+
install:
15+
install -c -s -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin
16+
install -c -m 444 ${PROG}.1 ${DESTDIR}${MANDIR}/man/man1
17+
18+
uninstall:
19+
rm -f ${PREFIX}/bin/${PROG} ${PREFIX}/man/man1/${PROG}.1
20+
21+
test:
22+
@echo No tests.
23+
24+
clean:
25+
rm -f ${PROG} ${PROG}.o ${PROG}.core

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
repology
2+
========
3+
`repology` is a command line interface for Repology.org.
4+
It is primarily designed for
5+
[OpenBSD](https://www.openbsd.org/),
6+
[FreeBSD](https://www.freebsd.org/),
7+
and
8+
[NetBSD](https://www.netbsd.org/)
9+
developers, users, and port maintainers.
10+
11+
It is written in
12+
[D](https://dlang.org/).
13+
14+
Building
15+
--------
16+
If you are using
17+
[DMD](https://wiki.dlang.org/DMD):
18+
```sh
19+
$ make
20+
$ sudo make install
21+
```
22+
23+
If you are using
24+
[LDC](https://wiki.dlang.org/LDC):
25+
```sh
26+
$ make DMD=ldmd2
27+
$ sudo make install
28+
```
29+
30+
If you are using
31+
[GDC](https://wiki.dlang.org/GDC):
32+
```sh
33+
$ make DMD=gdc DFLAGS='-O2 -pipe -frelease -finline -o repology'
34+
$ sudo make install
35+
```
36+
37+
Usage examples
38+
--------------
39+
Get information about the Digital Mars D compiler:
40+
* `repology dmd`
41+
42+
Get 200 items from pkgsrc:
43+
* `repology --repo pkgsrc`
44+
45+
Get information about both Chrome and Firefox from FreeBSD ports:
46+
* `repology --repo freebsd chromium firefox`
47+
48+
Get up to 200 packages maintained by ports@openbsd.org,
49+
starting with coreutils:
50+
* `repology --maintainer ports@openbsd.org --begin coreutils`
51+
52+
See the
53+
[manual page](repology.1)
54+
for more information.
55+
56+
License
57+
-------
58+
ISC License. See
59+
[`LICENSE`](LICENSE)
60+
for more information.

repology.1

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
.\"
2+
.\" repology - Command line interface to Repology.org
3+
.\"
4+
.\" Copyright (c) 2024 Brian Callahan <bcallah@openbsd.org>
5+
.\"
6+
.\" Permission to use, copy, modify, and distribute this software for any
7+
.\" purpose with or without fee is hereby granted, provided that the above
8+
.\" copyright notice and this permission notice appear in all copies.
9+
.\"
10+
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11+
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12+
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13+
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14+
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15+
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16+
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17+
.\"
18+
.Dd June 12, 2024
19+
.Dt REPOLOGY 1
20+
.Os
21+
.Sh NAME
22+
.Nm repology
23+
.Nd command line interface to Repology.org
24+
.Sh SYNOPSIS
25+
.Nm
26+
.Op options
27+
.Op Ar package ...
28+
.Sh DESCRIPTION
29+
.Nm
30+
is a utility that retrieves package information from Repology.org.
31+
.Pp
32+
By default,
33+
.Nm
34+
retrieves information for
35+
.Ox
36+
ports, unless you are on
37+
.Fx
38+
or
39+
.Nx ,
40+
in which case
41+
.Nm
42+
will retrieve information for
43+
.Fx
44+
ports or pkgsrc, respectively.
45+
.Pp
46+
.Nm
47+
returns information in the following format:
48+
.Dl Port category/port name
49+
.Dl Port version (green if up-to-date, red if not)
50+
.Dl Latest version
51+
.Dl Maintainer email address
52+
.Pp
53+
Output is sorted by port category,
54+
then port name.
55+
.Pp
56+
As per the API documentation,
57+
.Nm
58+
returns up to 200 items in a single API call.
59+
.Pp
60+
The options are as follows:
61+
.Bl -tag -width Ds
62+
.It Fl -repo Ar REPO
63+
Override default repository selection with
64+
.Ar REPO .
65+
.It Fl -begin Ar PROJECT
66+
Get up to 200 projects starting with
67+
.Ar PROJECT .
68+
.It Fl -end Ar PROJECT
69+
Get up to 200 projects ending with
70+
.Ar PROJECT .
71+
.It Fl -search Ar NAME
72+
Project name substring to look for.
73+
.It Fl -maintainer Ar EMAIL
74+
Return projects maintained by specified
75+
.Ar EMAIL .
76+
.It Fl -category Ar NAME
77+
Return projects in specified category.
78+
.It Fl -inrepo Ar REPO
79+
Return projects present in specified
80+
.Ar REPO .
81+
.It Fl -notinrepo Ar REPO
82+
Return projects absent in specified
83+
.Ar REPO .
84+
.It Fl -repos Ar NUMBER
85+
Return projects present in specified
86+
.Ar NUMBER
87+
of repositories.
88+
Exact values and open/closed ranges are allowed,
89+
.Em e.g. ,
90+
1, 5-, -5, 2-7.
91+
.It Fl -families Ar NUMBER
92+
Return projects present in specified
93+
.Ar NUMBER
94+
of repository families.
95+
.It Fl -repos_newest Ar NUMBER
96+
Return projects which are up to date in the specified
97+
.Ar NUMBER
98+
of repositories.
99+
.It Fl -families_newest Ar NUMBER
100+
Return projects which are up to date in the specified
101+
.Ar NUMBER
102+
of repository families.
103+
.It Fl -newest
104+
Return only packages marked newest.
105+
.It Fl -outdated
106+
Return only packages marked outdated.
107+
.It Fl -problematic
108+
Return only packages marked problematic.
109+
.It Fl -sort_package
110+
Sorts output by package name instead of port category/port name.
111+
Prepends output with package name.
112+
.It Fl -version
113+
Print version information and exit.
114+
.It Fl -help
115+
Print help information and exit.
116+
.El
117+
.Sh EXIT STATUS
118+
The
119+
.Nm
120+
utility exits 0 on success, and >0 if an error occurs.
121+
.Sh EXAMPLES
122+
Get information on the Digital Mars D compiler:
123+
.Pp
124+
.Dl repology dmd
125+
.Pp
126+
Get 200 items from pkgsrc:
127+
.Pp
128+
.Dl repology --repo pkgsrc
129+
.Pp
130+
Get information about both Chrome and Firefox from
131+
.Fx
132+
ports:
133+
.Pp
134+
.Dl repology --repo freebsd chromium firefox
135+
.Pp
136+
Get up to 200 packages maintained by ports@openbsd.org,
137+
starting with coreutils:
138+
.Pp
139+
.Dl repology --maintainer ports@openbsd.org --begin coreutils
140+
.Sh AUTHORS
141+
.Nm
142+
was written by
143+
.An Brian Callahan Aq Mt bcallah@openbsd.org .

0 commit comments

Comments
 (0)