add some documentation
This commit is contained in:
parent
fb8e215680
commit
fb0e727f7e
|
|
@ -20,6 +20,11 @@ from .options import OptionStore, Option
|
||||||
|
|
||||||
|
|
||||||
class Input(OptionStore):
|
class Input(OptionStore):
|
||||||
|
"""Store for a input file.
|
||||||
|
|
||||||
|
:param file: Path to the input file
|
||||||
|
:param args: A list of Stores that should be appended
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, file, *args):
|
def __init__(self, file, *args):
|
||||||
self.file = file
|
self.file = file
|
||||||
|
|
@ -28,14 +33,20 @@ class Input(OptionStore):
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return chain(OptionStore.__iter__(self), ['-i', self.file])
|
return chain(OptionStore.__iter__(self), ['-i', self.file])
|
||||||
|
|
||||||
class Output(OptionStore):
|
|
||||||
|
|
||||||
|
class Output(OptionStore):
|
||||||
|
"""Store for a output file.
|
||||||
|
|
||||||
|
:param file: Path in which the file should be saved
|
||||||
|
:param args: A list of Stores that should be appended
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, file, *args):
|
def __init__(self, file, *args):
|
||||||
self.file = file
|
self.file = file
|
||||||
OptionStore.__init__(self, *args)
|
OptionStore.__init__(self, *args)
|
||||||
|
|
||||||
def overwrite(self):
|
def overwrite(self):
|
||||||
|
"""Overwrite the file if it already exist"""
|
||||||
self.add_option('-y', None)
|
self.add_option('-y', None)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
@ -44,7 +55,16 @@ class Output(OptionStore):
|
||||||
|
|
||||||
|
|
||||||
class FFmpeg(OptionStore):
|
class FFmpeg(OptionStore):
|
||||||
|
"""This class represent the FFmpeg command.
|
||||||
|
|
||||||
|
It behaves like a list. If you iterate over the class it will yield
|
||||||
|
small parts from the ffmpeg command with it arguments. The arguments
|
||||||
|
for the command are in the Option classes. They can be appended directly
|
||||||
|
or through one or more Stores.
|
||||||
|
|
||||||
|
:param binary: The binary subprocess should execute at the :meth:`run`
|
||||||
|
:param args: A list of Stores that should be appended
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, binary="ffmpeg", *args):
|
def __init__(self, binary="ffmpeg", *args):
|
||||||
self.binary = binary
|
self.binary = binary
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue