Develop a Callection of useful packages
Easy to use features.
pip install pykun
from pykun.file import copier
copier.quickMain()
from pykun.file import configure as cfg
cfg.read()
from pykun.file import log as logger
logger.display(list() or dict())
This Module is to give file copy in accordance with option.
- : fast-forward run function
>>> quickMain()
Usege : copier [ option ] [ option arg ]
Option :
> diffcp - inputs [ src, dest, prefix ]
> cvt - inputs [src, dest, factors ] ... cvt factors input format is json
> cvt factors format '{"DATA":[{"KEY":"CVT_MATCH_KEY", "VAL":"CVT_VAL", "OPT":"Insert Position"}]}'
> cvt factors option
>> [Tu] - text added up
>> [Td] - text added down
>> [Tb] - text before
>> [Ta] - text after
>> [Tc] - text convert
>> [Tl] - text line remove
This Module is current to give functions
- : param : file path or json string
>>> data = read('{"data":[{"key":"val", "key2":"val2", "KeY3":"Val3"}]}')
>>> print("result :",data)
>>> data = read('{"Data":[{"Key":"INVITE","vaL":"TTT","OpT":"Tc"}, {"key":"from","val":"ttfrom","opt":"Tb"}]}')
>>> print("result :",data)
result : {'DATA': [{'KEY': 'val', 'KEY2': 'val2', 'KEY3': 'Val3'}]}
result : {'DATA': [{'KEY': 'INVITE', 'VAL': 'TTT', 'OPT': 'Tc'}, {'KEY': 'from', 'VAL': 'ttfrom', 'OPT': 'Tb'}]}
This Module is current to give functions
- : param : list or dict
>>> display([1,2,3,4,5,6,[7],0,0,0, [8]])
>>> display({"key":[1,2,3,4,5,6,[7,{"InKey_val_array":[9,9,9,9]}],0,{"K":"v","K2":[10,9,8,7],"K3":"v3"},0,0,[8]]})
< Display >
| <class 'list'>
| "1"
| "2"
| "3"
| "4"
| "5"
| "6"
| | <class 'list'>
| | "7"
| "0"
| "0"
| "0"
| | <class 'list'>
| | "8"
< Display >
| <class 'dict'>
| "key"
| | <class 'list'>
| | "1"
| | "2"
| | "3"
| | "4"
| | "5"
| | "6"
| | | <class 'list'>
| | | "7"
| | | | <class 'dict'>
| | | | "InKey_val_array"
| | | | | <class 'list'>
| | | | | "9"
| | | | | "9"
| | | | | "9"
| | | | | "9"
| | "0"
| | | "K"
| | | | "v"<'K value'>
| | | "K2"
| | | | <class 'list'>
| | | | "10"
| | | | "9"
| | | | "8"
| | | | "7"
| | | "K3"
| | | | "v3"<'K3 value'>
| | "0"
| | "0"
| | | <class 'list'>
| | | "8"