Log your command history to an analytics engine
Project description
Tail files, and do things with them.
Installation
Run pip install erudite or if it’s your thing: easy_install erudite. You’ll need to also get argparse if you’re using a Python less than 2.7.
This might work on Python 3+, but I haven’t tested it.
Examples
Send first words of your zsh history to [StatHat](http://www.stathat.com) (currently the default):
erudite –parser=zsh_history –logger=StatHatLogger –stathat-key=test@example.com ~/.zsh_history
If you just want to play around, and see what you can do:
erudite –parser=zsh_history –logger=PrintingLogger ~/.zsh_history
Developing
Parsers (used to parse lines) are in erudite/parsers.py, and loggers (used to do things with parsed lines) are in erudite/loggers.py.
Contributing
It would be totally awesome to have many many more options in this script. I’m totally open to contributions. But there are a few things that will help me:
Your fork should have a topic branch with your feature, requesting to pull against develop
Please don’t add any requirements for loggers to setup.py - catch ImportError and exit gracefully. (see StatHatLogger for an example)
If you’re adding a parser, it would be awesome if you could attach some sample input.
Just for fun, you might want to run pylint against your changes.
If you’re changing default settings, it’s totally cool. Just ask me first.
You should add yourself to Authors in the README.
In particular, here are some things/ideas that would be great to have:
Parser for [bash](http://www.gnu.org/software/bash/) history
Parser for database logs
Logger for [redis][1]/[mongo][2]/whatever nosql store you want to use
Logger for [StatsD](https://github.com/etsy/statsd)
And if you’re feeling particularly ambitious: tests
[1]: http://redis.io/ [2]: http://www.mongodb.org/
License
See LICENSE.md (hint: it’s Apache 2.0)
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 Distributions
File details
Details for the file Erudite-1.1.0.zip
.
File metadata
- Download URL: Erudite-1.1.0.zip
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afeb2b2864699f3b7918d2a638dd1c01c6eb2343be54c79a576d698247984938 |
|
MD5 | f9b9dd4ea2666e1b1f8570953ecd9daf |
|
BLAKE2b-256 | 466bf5b39782cc7510d1e5edf9bdc397320e60290e8ee12bcca5ae22fd90f06f |
File details
Details for the file Erudite-1.1.0.tar.gz
.
File metadata
- Download URL: Erudite-1.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61fd68fa95602f25abac1b41292cb3198550bfb89d3f4b19fc357bf040b92bfb |
|
MD5 | 1296f472b02bf0b233840e1361d1ff7c |
|
BLAKE2b-256 | 85d9cfe1eab8ec2ee849bc801909b9a992bc3923a2f3e2f954f6f2a030b25707 |