Browse code

Add related projects to readme

Robert Cranston authored on 13/06/2026 20:23:03
Showing 1 changed files
... ...
@@ -67,6 +67,23 @@ DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
67 67
 debian  inst     arm64  unknown   99.0.0   https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso  ERR
68 68
 ```
69 69
 
70
+## Related projects
71
+
72
+-   [`dl-distro`](https://codeberg.org/bashuser30/dl-distro): Bash script for
73
+    downloading and verifying OS images. Supports ~700 images from ~40 Linux
74
+    distros. Lacks some Raspberry Pi images.
75
+    -   [`data.json`](https://codeberg.org/bashuser30/dl-distro/src/branch/master/data.json)
76
+-   [`distro-info`](https://packages.debian.org/distro-info): Information about
77
+    releases of Debian and Ubuntu. Lacks support for other distros and distro
78
+    URLs.
79
+    -   [`debian.csv`](https://debian.pages.debian.net/distro-info-data/debian.csv)
80
+    -   [`ubuntu.csv`](https://debian.pages.debian.net/distro-info-data/ubuntu.csv)
81
+-   [`libosinfo`](https://libosinfo.org): Command line tools and APIs to query
82
+    a database of metadata about operating systems among other things. It has
83
+    way more coverage, including non-Linux operating systems, but does not
84
+    include image URLs. Part of the [Virt Tools](https://www.virt-tools.org)
85
+    family, so mostly focused on distro variants suitable for virtualization.
86
+
70 87
 ## License
71 88
 
72 89
 Licensed under the [ISC License][] unless otherwise noted, see the
Browse code

Colorize query result

Robert Cranston authored on 22/05/2026 23:42:29
Showing 1 changed files
... ...
@@ -38,6 +38,7 @@ distro-url [query] [guess] [<distro> [<variant> [<arch> [<codename> [<version> [
38 38
 -   [POSIX][] [shell][].
39 39
 -   `column`, optional, for formatting.
40 40
 -   `curl`, optional, for query mode.
41
+-   `tput`, optional, for color.
41 42
 
42 43
 [POSIX]: https://en.wikipedia.org/wiki/POSIX
43 44
 [shell]: https://en.wikipedia.org/wiki/Unix_shell
Browse code

Add query mode

Robert Cranston authored on 22/05/2026 23:28:22
Showing 1 changed files
... ...
@@ -14,9 +14,11 @@ manually updated, which means they may be out of date.
14 14
 ## Usage
15 15
 
16 16
 ```
17
-distro-url [guess] [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
17
+distro-url [query] [guess] [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
18 18
 ```
19 19
 
20
+-   `query`: Optional verbatim string, turning on query mode which will query
21
+    the [mirror][]s for each [URL][] to check that they are valid.
20 22
 -   `guess`: Optional verbatim string, switching from the default filter mode
21 23
     to guess mode. Filter mode interprets the rest of the parameters as
22 24
     [glob][]s (defaulting to `*`, matching everything) to filter an internal
... ...
@@ -35,6 +37,7 @@ distro-url [guess] [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>
35 37
 
36 38
 -   [POSIX][] [shell][].
37 39
 -   `column`, optional, for formatting.
40
+-   `curl`, optional, for query mode.
38 41
 
39 42
 [POSIX]: https://en.wikipedia.org/wiki/POSIX
40 43
 [shell]: https://en.wikipedia.org/wiki/Unix_shell
... ...
@@ -58,9 +61,9 @@ ubuntu    desktop-raspi  arm64  resolute  26.04    https://cdimage.ubuntu.com/ub
58 61
 ubuntu    server-raspi   arm64  resolute  26.04    https://cdimage.ubuntu.com/ubuntu/releases/resolute/release/ubuntu-26.04-preinstalled-server-arm64+raspi.img.xz
59 62
 edubuntu  desktop-raspi  arm64  resolute  26.04    https://cdimage.ubuntu.com/edubuntu/releases/resolute/release/edubuntu-26.04-preinstalled-desktop-arm64+raspi.img.xz
60 63
 
61
-$ distro-url guess debian inst arm64 unknown 99.0.0
62
-DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
63
-debian  inst     arm64  unknown   99.0.0   https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso
64
+$ distro-url query guess debian inst arm64 unknown 99.0.0
65
+DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL                                                                                      QUERY
66
+debian  inst     arm64  unknown   99.0.0   https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso  ERR
64 67
 ```
65 68
 
66 69
 ## License
Browse code

Add filter mode and make it the default

Robert Cranston authored on 22/05/2026 23:27:50
Showing 1 changed files
... ...
@@ -14,14 +14,21 @@ manually updated, which means they may be out of date.
14 14
 ## Usage
15 15
 
16 16
 ```
17
-distro-url [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
17
+distro-url [guess] [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
18 18
 ```
19 19
 
20
+-   `guess`: Optional verbatim string, switching from the default filter mode
21
+    to guess mode. Filter mode interprets the rest of the parameters as
22
+    [glob][]s (defaulting to `*`, matching everything) to filter an internal
23
+    list of known good parameter combinations. Guess mode interprets the rest
24
+    of the parameters as fixed strings (defaulting to sensible values for the
25
+    given `<distro>`) and will do its best to construct a [URL][] out of them.
20 26
 -   `<distro>`: The [distro][] to print the [URL][] for.
21 27
 -   `<variant>`, `<arch>`, `<codename>`, `<version>`: Optional parameters to
22 28
     select a different [image][] than the default.
23 29
 -   `<mirror>`: Optional override of the default [mirror][].
24 30
 
31
+[glob]: https://en.wikipedia.org/wiki/Glob_(programming)
25 32
 [mirror]: https://en.wikipedia.org/wiki/Mirror_site
26 33
 
27 34
 ## Dependencies
... ...
@@ -35,15 +42,23 @@ distro-url [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
35 42
 ## Examples
36 43
 
37 44
 ```sh
38
-$ distro-url debian
39
-DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
40
-debian  gnome    amd64  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0-live/amd64/iso-hybrid/debian-live-13.5.0-amd64-gnome.iso
41
-
42 45
 $ distro-url debian netinst
43
-DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
44
-debian  netinst  amd64  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/amd64/iso-cd/debian-13.5.0-amd64-netinst.iso
45
-
46
-$ distro-url debian inst arm64 unknown 99.0.0
46
+DISTRO  VARIANT  ARCH     CODENAME  VERSION  URL
47
+debian  netinst  amd64    trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/amd64/iso-cd/debian-13.5.0-amd64-netinst.iso
48
+debian  netinst  arm64    trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/arm64/iso-cd/debian-13.5.0-arm64-netinst.iso
49
+debian  netinst  armhf    trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/armhf/iso-cd/debian-13.5.0-armhf-netinst.iso
50
+debian  netinst  ppc64el  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/ppc64el/iso-cd/debian-13.5.0-ppc64el-netinst.iso
51
+debian  netinst  riscv64  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/riscv64/iso-cd/debian-13.5.0-riscv64-netinst.iso
52
+debian  netinst  s390x    trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/s390x/iso-cd/debian-13.5.0-s390x-netinst.iso
53
+
54
+$ distro-url '*' '*raspi*'
55
+DISTRO    VARIANT        ARCH   CODENAME  VERSION  URL
56
+debian    raspi          arm64  trixie    13.5.0   https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-raspi-arm64-daily.tar.xz
57
+ubuntu    desktop-raspi  arm64  resolute  26.04    https://cdimage.ubuntu.com/ubuntu/releases/resolute/release/ubuntu-26.04-preinstalled-desktop-arm64+raspi.img.xz
58
+ubuntu    server-raspi   arm64  resolute  26.04    https://cdimage.ubuntu.com/ubuntu/releases/resolute/release/ubuntu-26.04-preinstalled-server-arm64+raspi.img.xz
59
+edubuntu  desktop-raspi  arm64  resolute  26.04    https://cdimage.ubuntu.com/edubuntu/releases/resolute/release/edubuntu-26.04-preinstalled-desktop-arm64+raspi.img.xz
60
+
61
+$ distro-url guess debian inst arm64 unknown 99.0.0
47 62
 DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
48 63
 debian  inst     arm64  unknown   99.0.0   https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso
49 64
 ```
Browse code

Print header and variables in a table

Robert Cranston authored on 22/05/2026 23:24:09
Showing 1 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 # [`distro-url`][]
2 2
 
3
-Print [Linux][] [distro][] [image][] [URL][]s.
3
+Print [Linux][] [distro][] info, including [image][] [URL][]s.
4 4
 
5 5
 Note that the latest versions are hard coded, which means they will need to be
6 6
 manually updated, which means they may be out of date.
... ...
@@ -27,6 +27,7 @@ distro-url [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
27 27
 ## Dependencies
28 28
 
29 29
 -   [POSIX][] [shell][].
30
+-   `column`, optional, for formatting.
30 31
 
31 32
 [POSIX]: https://en.wikipedia.org/wiki/POSIX
32 33
 [shell]: https://en.wikipedia.org/wiki/Unix_shell
... ...
@@ -35,13 +36,16 @@ distro-url [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
35 36
 
36 37
 ```sh
37 38
 $ distro-url debian
38
-https://cdimage.debian.org/debian-cd/13.5.0-live/amd64/iso-hybrid/debian-live-13.5.0-amd64-gnome.iso
39
+DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
40
+debian  gnome    amd64  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0-live/amd64/iso-hybrid/debian-live-13.5.0-amd64-gnome.iso
39 41
 
40 42
 $ distro-url debian netinst
41
-https://cdimage.debian.org/debian-cd/13.5.0/amd64/iso-cd/debian-13.5.0-amd64-netinst.iso
43
+DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
44
+debian  netinst  amd64  trixie    13.5.0   https://cdimage.debian.org/debian-cd/13.5.0/amd64/iso-cd/debian-13.5.0-amd64-netinst.iso
42 45
 
43 46
 $ distro-url debian inst arm64 unknown 99.0.0
44
-https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso
47
+DISTRO  VARIANT  ARCH   CODENAME  VERSION  URL
48
+debian  inst     arm64  unknown   99.0.0   https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso
45 49
 ```
46 50
 
47 51
 ## License
Browse code

Add implementation

Robert Cranston authored on 08/05/2026 23:30:11
Showing 1 changed files
... ...
@@ -2,12 +2,48 @@
2 2
 
3 3
 Print [Linux][] [distro][] [image][] [URL][]s.
4 4
 
5
+Note that the latest versions are hard coded, which means they will need to be
6
+manually updated, which means they may be out of date.
7
+
5 8
 [`distro-url`]: https://git.rcrnstn.net/rcrnstn/distro-url
6 9
 [Linux]: https://en.wikipedia.org/wiki/Linux
7 10
 [distro]: https://en.wikipedia.org/wiki/Linux_distribution
8 11
 [image]: https://en.wikipedia.org/wiki/Optical_disc_image
9 12
 [URL]: https://en.wikipedia.org/wiki/URL
10 13
 
14
+## Usage
15
+
16
+```
17
+distro-url [<distro> [<variant> [<arch> [<codename> [<version> [<mirror>]]]]]]
18
+```
19
+
20
+-   `<distro>`: The [distro][] to print the [URL][] for.
21
+-   `<variant>`, `<arch>`, `<codename>`, `<version>`: Optional parameters to
22
+    select a different [image][] than the default.
23
+-   `<mirror>`: Optional override of the default [mirror][].
24
+
25
+[mirror]: https://en.wikipedia.org/wiki/Mirror_site
26
+
27
+## Dependencies
28
+
29
+-   [POSIX][] [shell][].
30
+
31
+[POSIX]: https://en.wikipedia.org/wiki/POSIX
32
+[shell]: https://en.wikipedia.org/wiki/Unix_shell
33
+
34
+## Examples
35
+
36
+```sh
37
+$ distro-url debian
38
+https://cdimage.debian.org/debian-cd/13.5.0-live/amd64/iso-hybrid/debian-live-13.5.0-amd64-gnome.iso
39
+
40
+$ distro-url debian netinst
41
+https://cdimage.debian.org/debian-cd/13.5.0/amd64/iso-cd/debian-13.5.0-amd64-netinst.iso
42
+
43
+$ distro-url debian inst arm64 unknown 99.0.0
44
+https://cdimage.debian.org/debian-cd/99.0.0/arm64/iso-dvd/debian-99.0.0-arm64-DVD-1.iso
45
+```
46
+
11 47
 ## License
12 48
 
13 49
 Licensed under the [ISC License][] unless otherwise noted, see the
Browse code

Add license

Robert Cranston authored on 08/05/2026 22:49:24
Showing 1 changed files
... ...
@@ -7,3 +7,11 @@ Print [Linux][] [distro][] [image][] [URL][]s.
7 7
 [distro]: https://en.wikipedia.org/wiki/Linux_distribution
8 8
 [image]: https://en.wikipedia.org/wiki/Optical_disc_image
9 9
 [URL]: https://en.wikipedia.org/wiki/URL
10
+
11
+## License
12
+
13
+Licensed under the [ISC License][] unless otherwise noted, see the
14
+[`LICENSE`][] file.
15
+
16
+[ISC License]: https://choosealicense.com/licenses/isc
17
+[`LICENSE`]: LICENSE
Browse code

Add readme

Robert Cranston authored on 08/05/2026 22:48:26
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+# [`distro-url`][]
2
+
3
+Print [Linux][] [distro][] [image][] [URL][]s.
4
+
5
+[`distro-url`]: https://git.rcrnstn.net/rcrnstn/distro-url
6
+[Linux]: https://en.wikipedia.org/wiki/Linux
7
+[distro]: https://en.wikipedia.org/wiki/Linux_distribution
8
+[image]: https://en.wikipedia.org/wiki/Optical_disc_image
9
+[URL]: https://en.wikipedia.org/wiki/URL