def getWork(workName, movementNumber=None, fileExtensions=None): ''' Search all Corpora for a work, and return a file path or URL. N.B. does not parse the work: but it's suitable for passing to converter.parse. This method will return either a list of file paths or, if there is a single match, a single file path. If no matches are found an Exception is raised. returns a pathlib.Path object >>> import os >>> a = corpus.getWork('luca/gloria') >>> a.name 'gloria.xml' >>> a.parent.name 'luca' >>> trecentoFiles = corpus.getWork('trecento') >>> 100 < len(trecentoFiles) < 200 True ''' return manager.getWork(workName, movementNumber, fileExtensions)
def getWork(workName, movementNumber=None, fileExtensions=None): ''' Search all Corpora for a work, and return a file path or URL. N.B. does not parse the work: but it's suitable for passing to converter.parse. This method will return either a list of file paths or, if there is a single match, a single file path. If no matches are found an Exception is raised. returns a pathlib.Path object >>> import os >>> a = corpus.getWork('luca/gloria') >>> a.name 'gloria.xml' >>> a.parent.name 'luca' >>> trecentoFiles = corpus.getWork('trecento') >>> len(trecentoFiles) > 100 and len(trecentoFiles) < 200 True ''' return manager.getWork(workName, movementNumber, fileExtensions)