mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Compare commits
6 Commits
b1d8f53903
...
2321e8ba09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2321e8ba09 | ||
|
|
a71a226d89 | ||
|
|
24bd6fc267 | ||
|
|
074a74da56 | ||
|
|
80229baa0d | ||
|
|
ddaf94e1d2 |
18
.github/workflows/onpush_builder.yaml
vendored
18
.github/workflows/onpush_builder.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user