Initial commit
This commit is contained in:
28
mp3/Vergleich.py
Normal file
28
mp3/Vergleich.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
|
||||
tmp = []
|
||||
filenames = []
|
||||
|
||||
with open('Uebersicht_der_Wörter_20250421.txt', 'r', encoding='utf-8') as input_file:
|
||||
for line in input_file:
|
||||
#Erzeuge ein Array mit den Wörtern
|
||||
tmp.append(int(line.split('\t')[0]))
|
||||
|
||||
|
||||
#Einlesen eines Ordners
|
||||
for root, dirs, files in os.walk("."):
|
||||
for file in files:
|
||||
if file.endswith(".mp3"):
|
||||
filenames.append(int(file.split('-')[0]))
|
||||
|
||||
def vergleichen(a, b): # Vergleichsfunktion
|
||||
if a not in b:
|
||||
return a
|
||||
|
||||
|
||||
# Vergleichen von tmp und filenames, was nicht enthalten ist wird ausgegeben
|
||||
for i in tmp:
|
||||
#print("i: ",i)
|
||||
#print(vergleichen(str(i), filenames))
|
||||
if i not in filenames:
|
||||
print (i)
|
||||
Reference in New Issue
Block a user