translate.storage.subtitles.SubtitleFile

Package translate :: Package storage :: Module subtitles :: Class SubtitleFile |
[hide private]
[frames] | no frames]

# Class SubtitleFile

source code

A subtitle file

Nested Classes | [hide private]
| UnitClass The class of units that will be instantiated and used by this class

Instance Methods | [hide private]
__init__(self, inputfile=None, unitclass=UnitClass) construct an Subtitle file, optionally reading in from inputfile. | source code
__str__(self) Converts to a string representation that can be parsed back using parsestring(). | source code
_parse(self) | source code
_parsefile(self, storefile) | source code
parse(self, data) parser to process the given source string | source code
Inherited from `base.TranslationStore`: `__getstate__`, `__setstate__`, `add_unit_to_index`, `addsourceunit`, `addunit`, `findid`, `findunit`, `findunits`, `getids`, `getsourcelanguage`, `gettargetlanguage`, `getunits`, `isempty`, `makeindex`, `remove_unit_from_index`, `require_index`, `save`, `savefile`, `setsourcelanguage`, `settargetlanguage`, `translate`, `unit_iter` Inherited from `base.TranslationStore` (private): `_assignname` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`

Class Methods | [hide private]
parsefile(cls, storefile) parse the given file | source code
parsestring(cls, storestring) Converts the string representation back to an object. | source code

Class Variables | [hide private]
Inherited from `base.TranslationStore`: `Extensions`, `Mimetypes`, `Name`, `suggestions_in_format` Inherited from `base.TranslationStore` (private): `_binary`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, inputfile=None, unitclass=UnitClass) (Constructor) | source code
construct an Subtitle file, optionally reading in from inputfile. Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
Converts to a string representation that can be parsed back using parsestring(). Overrides: object.__str__ (inherited documentation)

### parsefile(cls, storefile) Class Method | source code
parse the given file Overrides: base.TranslationStore.parsefile

### parsestring(cls, storestring) Class Method | source code
Converts the string representation back to an object. Overrides: base.TranslationStore.parsestring (inherited documentation)

### parse(self, data) | source code
parser to process the given source string Overrides: base.TranslationStore.parse (inherited documentation)