update readme

This commit is contained in:
tnichols217 2025-02-16 23:45:54 -05:00
parent 4a2d191117
commit b14695a147
4 changed files with 6 additions and 10 deletions

View File

@ -16,11 +16,11 @@ A nix flake is also provided with the `#branding` attribute, this is useful for
## Branding elements ## Branding elements
The `src/colors` folder contains color variants for different color schemes for models. All files referenced from the `build.py` builder will be built as a variant of the branding. The `src/colors` folder contains color variants for different color schemes for models. All files referenced from the `src/build.py` builder will be built as a variant of the branding.
## Build process ## Build process
The build process is managed by the `build.py` script The build process is managed by the `src/build.py` script
1. It iterates over specified color schemes 1. It iterates over specified color schemes
2. It iterates over logo variants, including the logomark, logo, OX logo, and stacked logomark variants 2. It iterates over logo variants, including the logomark, logo, OX logo, and stacked logomark variants
@ -29,3 +29,4 @@ The build process is managed by the `build.py` script
5. Releases: 5. Releases:
- For the GitHub release, a zip file will be made containing all the variants - For the GitHub release, a zip file will be made containing all the variants
- For the nix flake, all raw files are provided in the `result` folder - For the nix flake, all raw files are provided in the `result` folder
- An additional attribute `.#branding-nopng` is provided for quicker builds

View File

@ -1,4 +1,4 @@
{ stdenv, imagemagick, envsubst, python3Full, zip, ... }: { stdenv, imagemagick, envsubst, python3Full, zip, nopng ? false, ... }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "BetaNuBranding"; pname = "BetaNuBranding";
version = "1.0.0"; version = "1.0.0";
@ -9,6 +9,7 @@ stdenv.mkDerivation {
buildPhase = '' buildPhase = ''
python build.py python build.py
${if nopng then "" else "mogrify -format png -density 2500 -background none out/*.svg" }
''; '';
installPhase = '' installPhase = ''

View File

@ -45,6 +45,7 @@
}; };
packages = rec { packages = rec {
branding = pkgs.callPackage ./build.nix { }; branding = pkgs.callPackage ./build.nix { };
branding-nopng = pkgs.callPackage ./build.nix { nopng = true; };
deploy = pkgs.callPackage ./deploy.nix { src = branding; }; deploy = pkgs.callPackage ./deploy.nix { src = branding; };
default = branding; default = branding;
}; };

View File

@ -1,6 +1,3 @@
from typing import Any
import subprocess import subprocess
colors = [ "black", "color", "red", "white" ] colors = [ "black", "color", "red", "white" ]
@ -58,8 +55,4 @@ for color in colors:
{build(f"{des}{image[0]}-{color}.svg")} {build(f"{des}{image[0]}-{color}.svg")}
''' '''
script += '''
mogrify -format png -density 2500 -background none out/*.svg
'''
_ = subprocess.run(["bash", "-c", script], check=True) _ = subprocess.run(["bash", "-c", script], check=True)