class documentation
A mix-in class for ZimTranslator that implements reading from path.
If you inherit from this class in addition to the ZimTranslator class, the translator will read the ZIM file at PathReaderMixIn.inpath and write to PathReaderMixIn.outpath.
This class has its own constructor, which allows you to more easily set inpath and outpath. However, this does not call ZimTranslator.__init__, so be sure to call that translator as well!
| Method | __init__ |
The default constructor. |
| Method | get |
Return the policy to use for the input ZIM file. |
| Method | get |
Return the policy to use for the output ZIM file. |
| Method | open |
Open the input ZIM based on the specified inpath. |
| Method | open |
Open the input ZIM based on the specified inpath. |
| Class Variable | allow |
whether overwriting existing files is allowed (default: yes) |
| Instance Variable | inpath |
path to ZIM file to read from |
| Instance Variable | outpath |
path to ZIM file to write to |
Return the policy to use for the input ZIM file.
By default this will be a ZIM file for reasonable performance.
| Returns | |
pyzim.policy.Policy | the policy to use for the input ZIM file. |
Return the policy to use for the output ZIM file.
By default this will be a ZIM file for a good compression.
| Returns | |
pyzim.policy.Policy | the policy to use for the input ZIM file. |