Skip to main content

Let Me Search That For You

Project description

lmstfy is an Apache2 licensed Python CLI for searching for error messages.

TODO

  • Support stdout and stderr output.

  • Filter output to only error messages.

  • Filter output to last N error messages.

Quickstart

  1. Install pipx.

  2. Then install lmstfy.

System Requirements

Python 3.6+ is required to install lmstfy. Don’t have Python 3.6 or later? See the Python 3 Installation & Setup Guide.

You also need to have pip installed on your machine for python3. Installing it varies from system to system. Consult pip’s installation instructions. Installing on Linux works best with a Linux Package Manager.

Installing via Python

$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepath
$ python3 -m pipx install lmstfy

Installing via Brew

Pipx works on MacOS, Linux, and Windows.

Pipx can be installed on macOS using brew.

$ brew install pipx
$ pipx ensurepath
$ pipx install lmstfy

Tutorial

Follow the Installation steps to install lmstfy.

Running Commands

Invoke a build system using the “run” subcommand:

$ lmstfy run make
$ lmstfy run cmake
$ lmstfy run gradlew build
$ lmstfy run maven mypackage

Invoke a hot-reloading webserver using the “run” subcommand:

$ lmstfy run python3 manage.py runserver

Invoke an interpreter using the “run” subcommand:

$ lmstfy run python3

The stdin, stdout, and stderr streams are wrapped around the executed process. Signals are also passed to the subprocess.

Piping Input

Pipe output to lmstfy.

$ ./script.sh | grep -i -C 10 error | lmstfy pipe

It’s also possible to provide metadata:

$ ./script.sh | lmstfy pipe --hint language=python3

Parsing Output

Parse log files using cat:

$ lmstfy cat log.txt

Or parse log files using curl:

$ lmstfy curl https://path/to/log.txt

Or parse the output in your terminal:

CMD-a CMD-c
$ lmstfy pipe << EOF
CMD-v EOF RET

Reference

License

Copyright 2020 Grant Jenks

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

lmstfy-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

lmstfy-0.0.1-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lmstfy-0.0.1.tar.gz.

File metadata

  • Download URL: lmstfy-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for lmstfy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d36932fbb3e4418d4bbd3e662aa71b074bb66c61638646340f96bd7698b06f00
MD5 98ec6993f65833d56e988ef77fe71418
BLAKE2b-256 2f1f5ef167ab67368b9f73c2835e432e1f8430a376276744ba8d3befa728f225

See more details on using hashes here.

File details

Details for the file lmstfy-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: lmstfy-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for lmstfy-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 767fb34edf87983468cfe4637861a8713361b757ace3fcaff2013c34db9c8c3e
MD5 dd4e1afbf73309209fa47c7eb4df45c1
BLAKE2b-256 9d071c99d782dbb091452576b238c132b74e34895c829cf415094e27b4e47816

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