Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib-hist-format-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

xontrib_hist_format-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file xontrib-hist-format-0.0.1.tar.gz.

File metadata

  • Download URL: xontrib-hist-format-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for xontrib-hist-format-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9a8353dbc6b6adbc8c1188b31151a8e6cc7f73712e9a4d9265af6a2bf1f4469b
MD5 7ddb349561b63953a4a37d06e0bae082
BLAKE2b-256 17cf52c21f9474f35f1b774b44b6efb26a5f76fe005a1269ef423cb719f0d56a

See more details on using hashes here.

File details

Details for the file xontrib_hist_format-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: xontrib_hist_format-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for xontrib_hist_format-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbc347bc7fc47d64e93dda92f965ba27cf818189f12464e8680e46ff75bfccf0
MD5 67650a0fd4d61a59942f053c2c8796f1
BLAKE2b-256 b913c842291c80138a964860127addeec27bdf1e790393f31e0a89b1faae70b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page