Adding a visual presentation of licensing

This commit is contained in:
Alexander Hill 2026-01-17 15:08:56 -05:00
parent 378e4d31d8
commit dc84a744bf
3 changed files with 40 additions and 0 deletions

View File

@ -20,6 +20,8 @@ While it may sound too good to be true, that's because it is. Maple Linux does n
Maple Linux is built upon software created by various developers, and is distributed under various licenses as a result. While it isn't one of the main goals of the system, especially since Linux itself is copyleft, I aim to create an operating system that's as free as I can reasonably make it. Maple Linux is built upon software created by various developers, and is distributed under various licenses as a result. While it isn't one of the main goals of the system, especially since Linux itself is copyleft, I aim to create an operating system that's as free as I can reasonably make it.
![Licensing Summary](licensebar.svg)
| Software | Copyright Holder | License | Alignment | | Software | Copyright Holder | License | Alignment |
| ----------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------ | | ----------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------ |
| Autoconf | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft | | Autoconf | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |

29
licensebar.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh -e
# Usage: ./licensebar.sh <copyleft count> <slightly copyleft count> <free count> <mixed count> <slightly copyright count> <copyright count>
# Yes, this is cursed, but it was the simplest way I could think of automating this. ~ahill
BAR_BORDER=3
BAR_HEIGHT=16
BAR_TOTAL=$(expr $1 + $2 + $3 + $4 + $5 + $6)
BAR_WIDTH=1024
BAR_END=$(expr $BAR_WIDTH - $BAR_BORDER)
BAR_INNER=$(expr $BAR_WIDTH - \( 2 \* $BAR_BORDER \))
BAR_OFFSET=$BAR_BORDER
render_segment() {
size=$(printf %.0f $(echo "($BAR_INNER / $BAR_TOTAL) * $2" | bc -l))
echo "<rect fill=\"$1\" height=\"$(expr $BAR_HEIGHT - \( 2 \* $BAR_BORDER \))\" width=\"$size\" x=\"$BAR_OFFSET\" y=\"$BAR_BORDER\" />"
BAR_OFFSET=$(expr $BAR_OFFSET + $size)
}
echo "<svg height=\"$BAR_HEIGHT\" version=\"1.1\" width=\"$BAR_WIDTH\" xmlns=\"http://www.w3.org/2000/svg\">"
echo "<rect fill=\"black\" height=\"100%\" width=\"100%\" />"
render_segment blue $1
render_segment cornflowerblue $2
render_segment white $3
render_segment mediumpurple $4
render_segment indianred $5
render_segment crimson $6
echo "</svg>"

9
licensebar.svg Normal file
View File

@ -0,0 +1,9 @@
<svg height="16" version="1.1" width="1024" xmlns="http://www.w3.org/2000/svg">
<rect fill="black" height="100%" width="100%" />
<rect fill="blue" height="10" width="545" x="3" y="3" />
<rect fill="cornflowerblue" height="10" width="95" x="548" y="3" />
<rect fill="white" height="10" width="355" x="643" y="3" />
<rect fill="mediumpurple" height="10" width="0" x="998" y="3" />
<rect fill="indianred" height="10" width="24" x="998" y="3" />
<rect fill="crimson" height="10" width="0" x="1022" y="3" />
</svg>

After

Width:  |  Height:  |  Size: 510 B