Added CLI logic to generate pipes

This commit is contained in:
2022-05-22 18:48:33 +02:00
parent d1bb266d49
commit d694c408c0
6 changed files with 50 additions and 2 deletions

View File

@@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
"""
cpl-core sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
sh-edraft Common Python library
:copyright: (c) 2020 - 2022 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
__title__ = 'cpl_core.pipes'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
__version__ = '2022.6.3'
from collections import namedtuple
# imports:
from .first_char_to_lower_pipe import FirstCharToLowerPipe
from .pipe_abc import PipeABC
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='2022', minor='6', micro='3')

View File

@@ -1,9 +0,0 @@
from cpl_core.pipes.pipe_abc import PipeABC
class FirstCharToLowerPipe(PipeABC):
def __init__(self): pass
def transform(self, value: any, *args):
return f'{value[0].lower()}{value[1:]}'

View File

@@ -1,10 +0,0 @@
from abc import ABC, abstractmethod
class PipeABC(ABC):
@abstractmethod
def __init__(self): pass
@abstractmethod
def transform(self, value: any, *args): pass