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 (md) 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.
-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 was created with xontrib cookiecutter template.
- Take a look at ergopack - the pack of ergonomic xontribs.
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993171264b164a5b838db18cd1447cc8b5a0eacac9fe0d5026943e1cf9cbca14 |
|
MD5 | f7365355aef4d041c49af0ee9d18832c |
|
BLAKE2b-256 | c6926660a7dacd9c9355267bd73d8338a6256acabcb52dcf83e7c28af32c0687 |
Close
Hashes for xontrib_hist_format-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a35a0498ff845814c4a5fcdd052423218f94dd8359b2236d7801db89a0869e1 |
|
MD5 | f9fb7bafac51aedadcfdeaa21a3a2eb0 |
|
BLAKE2b-256 | 96aa23020ab8d3dc95188467a9fa68c2d8882d1adcdb03fb5431cf0f76e29270 |