Auto: cleanup-2026-05-24T10-18-36Z

This commit is contained in:
2026-05-24 12:18:49 +02:00
parent 4dc460dc0c
commit 16c01a5e67
71 changed files with 1770 additions and 1731 deletions
+31 -30
View File
@@ -1,30 +1,31 @@
{ ... }:
{
perSystem = { pkgs, ... }: {
# counts how many syllabes in a string.
# not perfect. Does not handle silents e in french
# but that's what I use for writing poetry
packages.custom-syllabes = pkgs.writers.writePython3Bin "custom-syllabes" {
libraries = with pkgs; [
python3Packages.pyphen
];
} ''
import sys
import pyphen
dic = pyphen.Pyphen(lang="fr")
text = sys.stdin.read().strip()
chunks = []
total = 0
for w in text.split():
hyphenated = dic.inserted(w)
parts = hyphenated.split("-")
chunks.append("/".join(parts))
total += len(parts)
print(f"{total} ({'/'.join(chunks)})")
'';
};}
_: {
perSystem = {pkgs, ...}: {
# counts how many syllabes in a string.
# not perfect. Does not handle silents e in french
# but that's what I use for writing poetry
packages.custom-syllabes =
pkgs.writers.writePython3Bin "custom-syllabes" {
libraries = with pkgs; [
python3Packages.pyphen
];
} ''
import sys
import pyphen
dic = pyphen.Pyphen(lang="fr")
text = sys.stdin.read().strip()
chunks = []
total = 0
for w in text.split():
hyphenated = dic.inserted(w)
parts = hyphenated.split("-")
chunks.append("/".join(parts))
total += len(parts)
print(f"{total} ({'/'.join(chunks)})")
'';
};
}