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 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388e5dad70058b6a992f15d60b654d41a3b9ad9544758326337e97fb0e1f7820 |
|
MD5 | 01951f0066fe3c720261078e74035920 |
|
BLAKE2b-256 | 210d322c2f714f3308325b38b7445f08a2b88eda0cc5c3ef855a08a7735a15cd |
Close
Hashes for xontrib_hist_format-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9025f74d3b6f3b15bcd80051d611ea94cdd0417e438c6beae0f2c46cea9c9bef |
|
MD5 | 455a64a3dfa2af3dce2e2a049ba81de6 |
|
BLAKE2b-256 | 52baeb1b6bb2d65d55fb09d3b837d279b84cf405bf48edd0b16730808655674f |