wkps.wio package¶
Submodules¶
wkps.wio.basewkpio module¶
- filename
sppas.src.wkps.wio.basewkpio.py
- author
Laurent Vouriot, Brigitte Bigi
- contact
- summary
Base class for any reader and writer of a workspace.
- class wkps.wio.basewkpio.sppasBaseWkpIO(name=None)[source]¶
Bases:
wkps.workspace.sppasWorkspace
Base class for any reader-writer of a workspace.
- __init__(name=None)[source]¶
Initialize a new workspace reader-writer instance.
- Parameters
name – (str) A workspace name
wkps.wio.wannotationpro module¶
- filename
sppas.src.wkps.wio.wannotationpro.py
- author
Laurent Vouriot, Brigitte Bigi
- contact
- summary
A reader/writer of antw workspace file format.
An AnnotationPro workspace (antw) is an xml file
Here is an example of a very simple antw file
<?xml version=”1.0” standalone=”yes”?> <WorkspaceDataSet xmlns=”http://tempuri.org/WorkspaceDataSet.xsd”>
- <WorkspaceItem>
<Id>b1b36c56-652c-4390-81ce-8eabd4b0260f</Id> <IdGroup>00000000-0000-0000-0000-000000000000</IdGroup> <Name>annprows.ant</Name> <OpenCount>0</OpenCount> <EditCount>4</EditCount> <ListenCount>5</ListenCount> <Accepted>false</Accepted>
</WorkspaceItem>
</WorkspaceDataSet>
<WorkspaceItem /> correspond to a file <Name /> is the name of the said file
each filename of the workspace got an id <Id /> a group id <idGroup /> and some information about the edition of the file how many times it has been opened <OpenCount />, how many editions (adding segment, layer, meta… each char typed count as an edition) <EditCount /> how many times it has been listened (played) <ListenCount /> <Accepted/> ?
- class wkps.wio.wannotationpro.sppasWANT(name=None)[source]¶
Bases:
sppas.src.wkps.wio.basewkpio.sppasBaseWkpIO
Reader and writer to import/export a workspace from/to annotationpro.
- __init__(name=None)[source]¶
Initialize aa sppasWANT instance.
- Parameters
name – (str) The name of the workspace
- static detect(filename)[source]¶
Check whether a file is of antw format or not.
- Parameters
filename – (str) Name of the file to detect
- Returns
(bool)
wkps.wio.wjson module¶
- filename
sppas.src.wkps.wio.wjson.py
- author
Brigitte Bigi
- contact
- summary
A reader/writer of wjson workspace file format.
- class wkps.wio.wjson.sppasWJSON(name=None)[source]¶
Bases:
wkps.wio.basewkpio.sppasBaseWkpIO
Reader and writer of a workspace in wjson format.
- __init__(name=None)[source]¶
Initialize a sppasWJSON instance.
- Parameters
name – (str) The name of the workspace
wkps.wio.wkpreadwrite module¶
- filename
sppas.src.wkps.wio.wkpreadwrite.py
- author
Laurent Vouriot, Brigitte Bigi
- contact
- summary
A reader/writer of any supported workspace file format.
- class wkps.wio.wkpreadwrite.WkpFormatProperty(extension)[source]¶
Bases:
object
Represent one format and its properties.
- class wkps.wio.wkpreadwrite.sppasWkpRW(filename)[source]¶
Bases:
object
A reader/writer of any supported workspace file format.
- WORKSPACE_TYPES = {'antw': <class 'wkps.wio.wannotationpro.sppasWANT'>, 'wjson': <class 'wkps.wio.wjson.sppasWJSON'>}¶
Module contents¶
- filename
sppas.src.wkps.wio.__init__.py
- author
Laurent Vouriot, Brigitte Bigi
- contact
- summary
Readers and writers of workspaces data.
- class wkps.wio.WkpFormatProperty(extension)[source]¶
Bases:
object
Represent one format and its properties.
- class wkps.wio.sppasWJSON(name=None)[source]¶
Bases:
wkps.wio.basewkpio.sppasBaseWkpIO
Reader and writer of a workspace in wjson format.
- __init__(name=None)[source]¶
Initialize a sppasWJSON instance.
- Parameters
name – (str) The name of the workspace
- class wkps.wio.sppasWkpRW(filename)[source]¶
Bases:
object
A reader/writer of any supported workspace file format.
- WORKSPACE_TYPES = {'antw': <class 'wkps.wio.wannotationpro.sppasWANT'>, 'wjson': <class 'wkps.wio.wjson.sppasWJSON'>}¶