upper2lower

This commit is contained in:
2025-06-19 20:32:35 +02:00
parent 28458eb959
commit 6b8e87ea5f
9 changed files with 54 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
#!/bin/bash
for f in *; do
new=$(echo "$f" | tr '[:upper:]' '[:lower:]')
mv "$f" "$new"
done

6
GoetheVerlag/mp3/011/rename.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
for i in *
do
mv "$i" "${i// /_}"
done

21
GoetheVerlag/mp3/045/convert.py Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/python3
# coding=utf-8
from pydub import AudioSegment
import sys,os
def convert(wav):
# Lade die WAV-Datei
audio = AudioSegment.from_wav(wav)
print(wav)
output = os.path.splitext(wav)[0]
outputname = output+".mp3"
# print(outputname)
# Speichere sie als MP3 (z.B. mit einer Bitrate von 192 kbps)
audio.export(outputname, format="mp3", bitrate="192k")
print("Konvertierung abgeschlossen!")
convert(sys.argv[1])

View File

@@ -0,0 +1,9 @@
#!/bin/bash
for i in $(ls *.wav)
do
python3 convert.py $i
echo $i
rm -f $i
done