cleanup: remove unused files
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
def config_to_settings(path):
|
||||
# Returns settings dict from BirdNET-pi text format.
|
||||
# Consider refactoring to use ConfigParser files, or another standardized format.
|
||||
settings = {}
|
||||
with open(path, 'r') as f:
|
||||
this_run = f.readlines()
|
||||
for i in this_run:
|
||||
key = i.split("=")[0]
|
||||
value = "=".join(i.split("=")[1:])[:-1]
|
||||
# Trim for strings, not ideal
|
||||
if value.startswith('"') and value.endswith('"'):
|
||||
value = value[1:-1]
|
||||
if value.startswith("'") and value.endswith("'"):
|
||||
value = value[1:-1]
|
||||
settings[key] = value
|
||||
return settings
|
||||
Reference in New Issue
Block a user