All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnd_fts_metadataextractor_wrapper.py
Go to the documentation of this file.
1 
2 from twisted.internet import defer, threads
3 from twisted.python import log
4 
5 import fts.util
6 import fts.metadata_extractors
7 import json
8 
9 class sbnd_extractor(fts.metadata_extractors.MetadataExtractorRunCommand):
10 
11  name="sbnd_extractor"
12 
13  @defer.inlineCallbacks
14  def extract( self, filestate, *args, **kwargs):
15 
16  mddata = yield self._runCommand("/sbnd/app/users/sbndpro/soft/srcs/sbndutil/scripts/poms/sbndpoms_metadata_extractor.sh", filestate.getLocalFilePath())
17  md = json.loads(mddata)
18 
19  # fix any metadata fields here
20  # md['xxx'] = blah(md['yy']) or whatever
21 
22  defer.returnValue(md)