Simple Python library to return your shell history or dump to a nicely formatted JSON file.
Project description
Shhistory
Simple Python library to return your shell history or dump to a JSON file.
You can install this library via pip:
pip install shhistory
Example
A quick example to print the JSON data to stdout:
# test.py
from shhistory import ShellHistory
print(ShellHistory.get_shell_history())
You can also create a quick bash utility with this library by piping to jq
for nicer formatting:
python3 test.py | jq
If you would like to analyze the data more securely, you can also dump to a file:
from shhistory import ShellHistory
print(ShellHistory.dump_shell_history())
NOTE: Windows is not currently supported. This may be added in a future update.
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
shhistory-0.1.9.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file shhistory-0.1.9.tar.gz
.
File metadata
- Download URL: shhistory-0.1.9.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.31.0 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84f52dbfb610421bbd2cd807dbe0ac7c7fef8c4e0633da902390c1587e02d491 |
|
MD5 | 98558e3b21da5ed5a110da09ae3571c5 |
|
BLAKE2b-256 | 8cbd9992a9cdee10a86b6a1f1e7694b48a9d6de3b7ead7c72516ab53e551bf0d |
File details
Details for the file shhistory-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: shhistory-0.1.9-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.31.0 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e527fd6a8d8bae6b611ac939d72ee18420f98624b34d87c2591dc6954f42e6 |
|
MD5 | b43d24709b649a610076415a5de74c45 |
|
BLAKE2b-256 | 3970791c3cc90420a666c30763108164dddcf4bf1f5e9a7a6b2c13895f06fa32 |