xontrib-pipeliner

Let your pipe lines flow thru the Python code in xonsh.

BSD-2-CLAUSE License

Downloads
912
Stars
56
Committers
2
xontrib-pipeliner - 0.3.4 Latest Release

Published by anki-code over 3 years ago

plx

  • Print command to stderr instead of stdout.
xontrib-pipeliner - 0.3.3

Published by anki-code over 3 years ago

  • Fix ppl command for Mac
  • Added "Known issues" for ppl command on Mac
xontrib-pipeliner - 0.3.2

Published by anki-code about 4 years ago

Compiled python.

xontrib-pipeliner - 0.3.1

Published by anki-code about 4 years ago

PyPi package maintenance.

xontrib-pipeliner - 0.3.0

Published by anki-code about 4 years ago

New experimental feature - syntax highlighting using xonsh prompt:

If you're using xonsh prompt and want to use pipeliner with syntax highlighting instead of string there is experimental
feature that catch pl @(<python>) calls and uses the expression from the xonsh python substitution as pipeliner argument.
Example:

echo echo | pl @(line + '!')
# In the xonsh prompt it's equals to:
echo echo | pl "line + '!'" 
xontrib-pipeliner - 0.2.4

Published by anki-code about 4 years ago

Now you can begin the pipe from Python head:

pl "'\\n'.join(list('ABCDEFG'))" | pl "line + ('!' if num%2 else '?')" | grep '!'
B!
D!
F!
xontrib-pipeliner - 0.2.3

Published by anki-code about 4 years ago

Package maintenance

xontrib-pipeliner - 0.2.2

Published by anki-code about 4 years ago

Docs improvement.

xontrib-pipeliner - 0.2.1

Published by anki-code about 4 years ago

Added plx and pplx commands to run execx(f"{plx_command}") most shorter way.

For example when you want to rename files you can do it Pythonic way:

$ mkdir -p /tmp/plx-test && cd /tmp/plx-test
$ touch 111 222 333 && ls
111 222 333

$ ls | plx "mv {line} prefix-{line}"
mv 111 prefix-111
mv 222 prefix-222
mv 333 prefix-333

$ ls
prefix-111 prefix-222 prefix-333

Echo example:

$ ls | plx 'echo {line} # {num}'
echo prefix-111 # 0
prefix-111
echo prefix-222 # 1
prefix-222
echo prefix-333 # 2
prefix-333
xontrib-pipeliner - 0.2.0

Published by anki-code about 4 years ago

  • Added ability to skip the line by returning None (NoneType). It also makes the output of pl "execx(...)" more clear.
  • Added color for errors to separate lines and stack trace.
xontrib-pipeliner - 0.1.8

Published by anki-code about 4 years ago

Bump package update

xontrib-pipeliner - 0.1.7

Published by anki-code about 4 years ago

Added catching trivial errors

xontrib-pipeliner - 0.1.6

Published by anki-code about 4 years ago

Fix dependency

xontrib-pipeliner - 0.1.5

Published by anki-code about 4 years ago

Github Actions bump

xontrib-pipeliner - 0.1.4

Published by anki-code about 4 years ago

Fix dependency

xontrib-pipeliner - 0.1.3

Published by anki-code about 4 years ago

Added exception processing in ppl

xontrib-pipeliner - 0.1.2

Published by anki-code about 4 years ago

Added showing the line that rises exception to pl:

$ echo "1;2\n3;4\nqwe" > test.txt

$ cat test.txt
1;2
3;4
qwe

$ cat test.txt | pl "line.split(';')[1]"
IndexError: list index out of range
2
4
Error line 3: qwe
xontrib-pipeliner - 0.1.1

Published by anki-code over 4 years ago

Fixed multicore context

xontrib-pipeliner - 0.1.0

Published by anki-code over 4 years ago

  • Added multicore pipelining with ppl command
  • Fix import modules before using pipeliner
xontrib-pipeliner - 0.0.2

Published by anki-code over 4 years ago