6 Commits

Author SHA1 Message Date
github-actions
2321e8ba09 GitHub bot: changelog 2025-11-20 16:07:51 +00:00
Alexandre
a71a226d89 Update version to 2025.11.09 2025-11-20 16:40:17 +01:00
GitHub Actions
24bd6fc267 Revert 'Update config.yaml' [nobuild] 2025-11-20 13:52:18 +00:00
Alexandre
074a74da56 Update config.yaml 2025-11-20 14:30:36 +01:00
Alexandre
80229baa0d Remove language maintainer script logic
Removed language maintainer script logic from 81-modifications.sh.
2025-11-20 14:25:58 +01:00
Alexandre
ddaf94e1d2 Simplify file sanitization process in workflow
Refactor sanitization logic to handle text files directly without conditional checks.
2025-11-20 13:23:34 +01:00
4 changed files with 11 additions and 39 deletions

View File

@@ -56,18 +56,14 @@ jobs:
find . -type f | while read -r file; do
MIME_TYPE=$(file --mime-type -b "$file")
[[ "$MIME_TYPE" != text/* ]] && continue
if [[ "$MIME_TYPE" == text/* ]]; then
echo "Sanitizing $file"
# 1⃣ Replace exotic spaces → regular space
# 2⃣ Strip 0x0D (CR) at end of every line
perl -CSD -pe "
s/${UNICODE_SPACES_REGEX}/ /g; # space normalization
s/\r$//; # CRLF → LF
" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
else
echo "Skipping non-text file: $file ($MIME_TYPE)"
fi
echo "Sanitizing $file"
# Edit in place, preserving file permissions and metadata
perl -i -CSD -pe "
s/${UNICODE_SPACES_REGEX}/ /g; # space normalization
s/\r$//; # CRLF → LF
" "$file"
done
# ────────────────────────────────────────────────────────────────
# 2. Ensure every *.sh script is executable

View File

@@ -1,3 +1,5 @@
## 2025.11.09 (20-11-2025)
- Minor bugs fixed
## 2025.11.07 (16-11-2025)
- Minor bugs fixed
## 2025.11.06 (15-11-2025)

View File

@@ -116,5 +116,5 @@ tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi
usb: true
version: 2025.11.07
version: 2025.11.09
video: true

View File

@@ -56,36 +56,10 @@ echo "... adapting labels according to birdnet.conf"
if grep -q '^DATABASE_LANG=' /config/birdnet.conf; then
export "$(grep -m1 '^DATABASE_LANG=' /config/birdnet.conf)"
bashio::log.info "Setting language to ${DATABASE_LANG:-en}"
if [[ -f "$HOME/BirdNET-Pi/scripts/utils/maintainer.py" ]]; then
PYTHONPATH="$HOME/BirdNET-Pi:$HOME/BirdNET-Pi/scripts:$HOME/BirdNET-Pi/scripts/utils:${PYTHONPATH:-}" \
python3 - <<'PY' 1>/dev/null
import importlib.util
import os
import sys
home = os.environ.get("HOME", "/home/pi")
birdnet_root = os.path.join(home, "BirdNET-Pi")
for path in (birdnet_root,
os.path.join(birdnet_root, "scripts"),
os.path.join(birdnet_root, "scripts", "utils")):
if path not in sys.path:
sys.path.insert(0, path)
if importlib.util.find_spec("scripts.utils.maintainer") is None:
raise RuntimeError("Language maintainer module not found; skipping.")
from scripts.utils.maintainer import create_language
database_lang = os.environ.get("DATABASE_LANG", "en")
create_language(database_lang)
PY
else
bashio::log.warning "Language maintainer script not found; skipping translation generation."
fi
else
bashio::log.warning "DATABASE_LANG not found in configuration. Using default labels."
fi
/./"$HOME"/BirdNET-Pi/scripts/install_language_label.sh
# Remove Ram drive option from webui
echo "... removing Ram drive from webui as it is handled from HA"