feat(flake): use sentence case on descriptions
This commit is contained in:
parent
c993013203
commit
a306e192a4
3 changed files with 17 additions and 6 deletions
15
flake.nix
15
flake.nix
|
@ -1,9 +1,20 @@
|
|||
{
|
||||
description = "Flake Template Hell";
|
||||
outputs = _: {
|
||||
outputs = _: let
|
||||
stringToCharacters = str: builtins.genList (p: builtins.substring p 1 str) (builtins.stringLength str);
|
||||
upperCase = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
lowerCase = stringToCharacters "abcdefghijklmnopqrstuvwxyz";
|
||||
toUpper = builtins.replaceStrings lowerCase upperCase;
|
||||
toLower = builtins.replaceStrings upperCase lowerCase;
|
||||
addContextFrom = src: target: builtins.substring 0 0 src + target;
|
||||
toSentenceCase = str: let
|
||||
firstChar = builtins.substring 0 1 str;
|
||||
restChars = builtins.substring 1 (builtins.stringLength str) str;
|
||||
in addContextFrom str (toUpper firstChar + toLower restChars);
|
||||
in {
|
||||
templates = builtins.mapAttrs (name: _: {
|
||||
path = ./templates/${name};
|
||||
description = "Template for ${name} projects.";
|
||||
description = "Template for ${toSentenceCase name} projects.";
|
||||
}) (builtins.readDir ./templates);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
}: let
|
||||
ps = python3Packages;
|
||||
in ps.buildPythonApplication {
|
||||
pname = "sm64pcport-for-dummies";
|
||||
version = "2025.03";
|
||||
pname = "REPLACE_ME";
|
||||
version = "REPLACE_VER";
|
||||
|
||||
src = builtins.filterSource (path: _: baseNameOf path != ".git") ../.;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[project]
|
||||
name = "REPLACE_ME"
|
||||
description = "Dumbed-down frontend for the SM64 PC Port compiler."
|
||||
version = "2025.03"
|
||||
description = "REPLACE DESC"
|
||||
version = "REPLACE_VER"
|
||||
|
||||
[project.scripts]
|
||||
REPLACE_ME = "REPLACE_ME.__main__:main"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue