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] [--lines]
Format xonsh history to post it to Github or another page.
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, --show-commands-list
Show commands in distinct section.
--lines Add additional lines before and after.
Example
Run commands:
echo 123
ls / | head -n 3
Run hist-format:
hist-md -c 2 -l --lines # latest 2 commands + commands list + 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:
Output:
echo 123
#123
ls / | head -n 3
#boot
#cdrom
#dev
# Prepared by xontrib-hist-format
Commands:
echo 123
ls / | head -n 3
# Prepared by xontrib-hist-format
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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd175cb9c4b04a047ef099103570cb3c5cf82e6e17487cc1a3e35f33b3ac1c4b |
|
MD5 | 28a2a3d56a23579f2eedc0e2d1232701 |
|
BLAKE2b-256 | 3c877e05fc2146d7f9f742db4c8b26d57603299b965baa66e7b5c4aa50d5c425 |
Close
Hashes for xontrib_hist_format-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61fe055e8daf7c297da2c4ebd9fa8a95b03757f8f7e9c102c5760768275f2fee |
|
MD5 | 778302d4a914c85dded280f21a61bdeb |
|
BLAKE2b-256 | ac5d804f054086f912a5b0fa601a13dc8e0566cbf669349862390a2b826089c8 |