translate.storage.project.Project

Package translate :: Package storage :: Module project :: Class Project |
[hide private]
[frames] | no frames]

# Class Project

source code

Manages a project store as well as the processes involved in a project workflow.

Instance Methods | [hide private]
__init__(self, projstore=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
__del__(self) | source code
add_source(self, srcfile, src_fname=None) Proxy for `self.store.append_sourcefile()`. | source code
add_source_convert(self, srcfile, src_fname=None, convert_options=None, extension=None) Convenience method that calls add_source and convert_forward and returns the results from both. | source code
close(self) Proxy for `self.store.close()`. | source code
convert_forward(self, input_fname, template=None, output_fname=None, **options) Convert the given input file to the next type in the process: Source document (eg. | source code
export_file(self, fname, destfname) Export the file with the specified filename to the given destination. | source code
get_file(self, fname) Proxy for `self.store.get_file()`. | source code
get_proj_filename(self, realfname) Proxy for `self.store.get_proj_filename()`. | source code
get_real_filename(self, projfname) Try and find a real file name for the given project file name. | source code
remove_file(self, projfname, ftype=None) Proxy for `self.store.remove_file()`. | source code
save(self, filename=None) Proxy for `self.store.save()`. | source code
update_file(self, proj_fname, infile) Proxy for `self.store.update_file()`. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

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

Method Details | [hide private]

### __init__(self, projstore=None) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### convert_forward(self, input_fname, template=None, output_fname=None, **options) | source code
Convert the given input file to the next type in the process: Source document (eg. ODT) -> Translation file (eg. XLIFF) -> Translated document (eg. ODT). Parameters: `input_fname` (basestring) - The project name of the file to convert `convert_options` (dict (optional)) - Passed as-is to `translate.convert.factory.convert()`.

### export_file(self, fname, destfname) | source code
Export the file with the specified filename to the given destination. This method will raise FileNotInProjectError via the call to ProjectStore.get_file() if `fname` is not found in the project.