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 in 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
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8353dbc6b6adbc8c1188b31151a8e6cc7f73712e9a4d9265af6a2bf1f4469b |
|
MD5 | 7ddb349561b63953a4a37d06e0bae082 |
|
BLAKE2b-256 | 17cf52c21f9474f35f1b774b44b6efb26a5f76fe005a1269ef423cb719f0d56a |
Close
Hashes for xontrib_hist_format-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbc347bc7fc47d64e93dda92f965ba27cf818189f12464e8680e46ff75bfccf0 |
|
MD5 | 67650a0fd4d61a59942f053c2c8796f1 |
|
BLAKE2b-256 | b913c842291c80138a964860127addeec27bdf1e790393f31e0a89b1faae70b1 |