Added routes to download metadata yaml files
This commit is contained in:
parent
63ffc0057a
commit
533f5d9857
3 changed files with 84 additions and 4 deletions
|
|
@ -146,6 +146,7 @@ class CaptureObject(object):
|
|||
"""Takes a full file path, and splits it into separated class properties."""
|
||||
self.filefolder, self.filename = os.path.split(filepath) # Split the full file path into a folder and a filename
|
||||
self.basename = os.path.splitext(self.filename)[0] # Split the filename out from it's file extension
|
||||
self.metadataname = "{}.yaml".format(self.basename)
|
||||
|
||||
def lock(self):
|
||||
"""Set locked flag to True."""
|
||||
|
|
@ -208,6 +209,10 @@ class CaptureObject(object):
|
|||
|
||||
return d
|
||||
|
||||
@property
|
||||
def yaml(self) -> str:
|
||||
return yaml.dump(self.metadata, default_flow_style=False)
|
||||
|
||||
@property
|
||||
def exists(self) -> bool:
|
||||
return self.stream_exists or self.file_exists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue