コード例 #1
0
ファイル: read.py プロジェクト: pollination/path
class ReadInt(Function):
    """Read content of a text file as an integer."""

    src = Inputs.path(description='Path to a input text file.',
                      path='input_path')

    @command
    def read_integer(self):
        return 'echo parsing text information to an integer...'

    data = Outputs.int(description='The content of text file as an integer.',
                       path='input_path')
コード例 #2
0
ファイル: read.py プロジェクト: pollination/path
class ReadJSONList(Function):
    """Read the content of a JSON file as a list."""

    src = Inputs.path(description='Path to a input JSON file.',
                      path='input_path')

    @command
    def list_dir(self):
        return 'echo parsing JSON information to a list...'

    data = Outputs.list(description='The content of JSON file as a list.',
                        path='input_path')
コード例 #3
0
ファイル: copy.py プロジェクト: pollination/path
class Copy(Function):
    """Copy a file or folder to a destination."""

    src = Inputs.path(
        description='Path to a input file or folder.', path='input_path'
    )

    @command
    def copy_file(self):
        return 'echo copying input path...'

    dst = Outputs.path(
        description='Output file or folder.', path='input_path'
    )
コード例 #4
0
ファイル: copy.py プロジェクト: pollination/path
class CopyMultiple(Function):
    """Copy a file or folder to multiple destinations."""

    src = Inputs.path(
        description='Path to a input file or folder.', path='input_path'
    )

    @command
    def copy_file(self):
        return 'echo copying input path...'

    dst_1 = Outputs.path(description='Output 1 file or folder.', path='input_path')

    dst_2 = Outputs.path(description='Output 2 file or folder.', path='input_path')

    dst_3 = Outputs.path(description='Output 3 file or folder.', path='input_path')

    dst_4 = Outputs.path(description='Output 4 file or folder.', path='input_path')

    dst_5 = Outputs.path(description='Output 5 file or folder.', path='input_path')

    dst_6 = Outputs.path(description='Output 6 file or folder.', path='input_path')