Format xonsh history to post it to Github or another page.
Project description
Format xonsh history to post it to Github or another page.
If you like the idea click ⭐ on the repo and stay tuned.
Installation
To install use pip:
xpip install xontrib-hist-format
# or: xpip install -U git+https://github.com/anki-code/xontrib-hist-format
Usage
xontrib load hist_format
hist-format --help # Basic command
hist-md # Markdown format shortcut
hist-txt # Text format shortcut
usage: hist-format [-h] [-f FORMAT] [-c COUNT] [-l]
optional arguments:
-h, --help show this help message and exit
-f FORMAT, --format FORMAT
Format: md, txt.
-c COUNT, --count COUNT
Count of commands
-l, --lines Add additional lines before and after.
Example
Run commands:
echo 123
ls / | head -n 3
Run hist-format:
hist-md -c 2 -l # latest 2 commands with header and footer as line
As result you will get the output that you can copy and paste to the Github comment or md-file:
hist-format output:
echo 123
#123
ls / | head -n 3
#boot
#cdrom
#dev
hist-format commands:
echo 123
ls / | head -n 3
Clipboard
You can redirect the output to clipboard. Example for xclip:
hist-md | xclip
Known issues
Not every command has output in the __xonsh__.history
.
Credits
- This package is the part of ergopack - the pack of ergonomic xontribs.
- This package was created with xontrib cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for xontrib-hist-format-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c5394d0b974968a8226b933c51beafdef51cdaa6f2701e6b983d553fa8d72e |
|
MD5 | 88ae3936f8d404008639f30adfa58702 |
|
BLAKE2b-256 | 1736cbda042ebe2b410e1fe7584cb97479e5a0bfb871dc6da46aa4adfcb4f2f0 |
Close
Hashes for xontrib_hist_format-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 309679cf79acd63bebc9a5053a5bcf42ef402fa49fede04bd3e1ef87d93a89b4 |
|
MD5 | 59307cccb57d0051f6a357b13c88257a |
|
BLAKE2b-256 | ca090af52efb9c2abbbf149c7c8188546cbf74f6ff656d09c3c36e5f820f1081 |