parse metadata on the server side
This commit is contained in:
7
owrx/meta.py
Normal file
7
owrx/meta.py
Normal file
@ -0,0 +1,7 @@
|
||||
class MetaParser(object):
|
||||
def __init__(self, handler):
|
||||
self.handler = handler
|
||||
def parse(self, meta):
|
||||
fields = meta.split(";")
|
||||
dict = {v[0] : "".join(v[1:]) for v in map(lambda x: x.split(":"), fields)}
|
||||
self.handler.write_metadata(dict)
|
Reference in New Issue
Block a user