searchf


Namesearchf JSON
Version 1.18 PyPI version JSON
download
home_pagehttps://github.com/human3/searchf
SummaryA text-based application running in terminals to search into text files
upload_time2024-03-09 03:31:50
maintainer
docs_urlNone
authorAdrien Felon
requires_python
licenseApache 2.0
keywords search file terminal console highlighter keyword curses utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # [searchf](https://github.com/human3/searchf)

![Latest Version](https://img.shields.io/pypi/v/searchf)

Utility program to interactively search keywords in text files. Works in terminals thanks to curses.

![Peek 2022-12-26 19-53](https://user-images.githubusercontent.com/15265841/209608799-c1db8f61-bfad-49ca-8f1e-fe12637f80cb.gif)

## Installation

`pip install searchf`

Requirements:
- Python 3.6 or greater
- Terminal with color support (ie. `TERM=screen-256color` or `TERM=xterm-256color`).

## Features

- Filters can either include or exclude file content
- Filters can persist to disk
- Multiple highlight and colorization modes (press `h` to cycle through all modes)
- Color palettes (press `c` to cycle through all palettes)
- Various other display modes (`l` toggles line numbers visibility, `k` toggles line wrapping, ...)
- Multiple views (press `1`, `2`, `3` to switch) with possibility to pass filters of one view to another view (try `!`, `@`, `#`)
- Common search key bindings (`/`, then `n` for next, `p` for previous)
- Common key bindings to scroll up/down pages or goto line
- Terminal resizing

## Usage

`searchf <FILE>`

- Press `f` to enter keyword in a new filter
- Press `?` for help

Press `ENTER` to define the first keyword of a filter and reveal only the lines containing that keyword. Press `+` to add another keyword to the current filter in order to further narrow down the lines currently displayed.

A filter is a list of keywords that a line must contain to match and get highlighted in a specific color. By defining multiple filters, you can reveal more content of the file. By default, lines not matching any filter are hidden, but you can progressively reveal context surrounding matching lines by pressing `m` multiple times, all the way to the whole content of the file. Filters can also be used to filter out content you do not want to see (press `x` to toggle this mode).

![Screenshot searchf help](https://user-images.githubusercontent.com/15265841/209476860-4e4e4600-0333-43f2-9cd7-65777448f927.png)

## Why?

This tool is born from my need to interactively search into log files, with the ability to backtrack when hitting dead ends (hence the use of push/pop of filter and keyword), and to go down some exploratory paths on the side (hence the support of views). I use it most when I'm not fully aware of what I am searching for...

To be more specific, I often have to dig into build log files, which are a raw aggregate of many heterogenous sources (numerous compiler output, deployment scripts, test run and results, ...) resulting in rather unstructured output. The only commonality being that everything is more or less line-oriented. When a build failure occurs, searchf helps me find hints of the root cause which can be hiding about anywhere.

So this tool ends up making little or no assumption on the input file, which can be anything, unstructured and heterogenous, as long as it is line oriented.

## Development

Please refer to [DEV.md](https://github.com/human3/searchf/blob/master/docs/DEV.md) for further information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/human3/searchf",
    "name": "searchf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "search,file,terminal,console,highlighter,keyword,curses,utilities",
    "author": "Adrien Felon",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/5d/d9/700a2d37486350736dbbd8fb6516cb05ffeba9da6b9e5fb5dee6139b1740/searchf-1.18.tar.gz",
    "platform": null,
    "description": "# [searchf](https://github.com/human3/searchf)\n\n![Latest Version](https://img.shields.io/pypi/v/searchf)\n\nUtility program to interactively search keywords in text files. Works in terminals thanks to curses.\n\n![Peek 2022-12-26 19-53](https://user-images.githubusercontent.com/15265841/209608799-c1db8f61-bfad-49ca-8f1e-fe12637f80cb.gif)\n\n## Installation\n\n`pip install searchf`\n\nRequirements:\n- Python 3.6 or greater\n- Terminal with color support (ie. `TERM=screen-256color` or `TERM=xterm-256color`).\n\n## Features\n\n- Filters can either include or exclude file content\n- Filters can persist to disk\n- Multiple highlight and colorization modes (press `h` to cycle through all modes)\n- Color palettes (press `c` to cycle through all palettes)\n- Various other display modes (`l` toggles line numbers visibility, `k` toggles line wrapping, ...)\n- Multiple views (press `1`, `2`, `3` to switch) with possibility to pass filters of one view to another view (try `!`, `@`, `#`)\n- Common search key bindings (`/`, then `n` for next, `p` for previous)\n- Common key bindings to scroll up/down pages or goto line\n- Terminal resizing\n\n## Usage\n\n`searchf <FILE>`\n\n- Press `f` to enter keyword in a new filter\n- Press `?` for help\n\nPress `ENTER` to define the first keyword of a filter and reveal only the lines containing that keyword. Press `+` to add another keyword to the current filter in order to further narrow down the lines currently displayed.\n\nA filter is a list of keywords that a line must contain to match and get highlighted in a specific color. By defining multiple filters, you can reveal more content of the file. By default, lines not matching any filter are hidden, but you can progressively reveal context surrounding matching lines by pressing `m` multiple times, all the way to the whole content of the file. Filters can also be used to filter out content you do not want to see (press `x` to toggle this mode).\n\n![Screenshot searchf help](https://user-images.githubusercontent.com/15265841/209476860-4e4e4600-0333-43f2-9cd7-65777448f927.png)\n\n## Why?\n\nThis tool is born from my need to interactively search into log files, with the ability to backtrack when hitting dead ends (hence the use of push/pop of filter and keyword), and to go down some exploratory paths on the side (hence the support of views). I use it most when I'm not fully aware of what I am searching for...\n\nTo be more specific, I often have to dig into build log files, which are a raw aggregate of many heterogenous sources (numerous compiler output, deployment scripts, test run and results, ...) resulting in rather unstructured output. The only commonality being that everything is more or less line-oriented. When a build failure occurs, searchf helps me find hints of the root cause which can be hiding about anywhere.\n\nSo this tool ends up making little or no assumption on the input file, which can be anything, unstructured and heterogenous, as long as it is line oriented.\n\n## Development\n\nPlease refer to [DEV.md](https://github.com/human3/searchf/blob/master/docs/DEV.md) for further information.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A text-based application running in terminals to search into text files",
    "version": "1.18",
    "project_urls": {
        "Homepage": "https://github.com/human3/searchf"
    },
    "split_keywords": [
        "search",
        "file",
        "terminal",
        "console",
        "highlighter",
        "keyword",
        "curses",
        "utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f53671c811e18b6c9695af1e74eebb0757720926f532f27068530f8f1a092ff0",
                "md5": "e795fcf7bb48e3808f5e506e64f173f8",
                "sha256": "2ea0e7c48afad78378dccfe4ebcf6d510ad4f7d55e872c3e57787a81845d5a8a"
            },
            "downloads": -1,
            "filename": "searchf-1.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e795fcf7bb48e3808f5e506e64f173f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 51068,
            "upload_time": "2024-03-09T03:31:49",
            "upload_time_iso_8601": "2024-03-09T03:31:49.015116Z",
            "url": "https://files.pythonhosted.org/packages/f5/36/71c811e18b6c9695af1e74eebb0757720926f532f27068530f8f1a092ff0/searchf-1.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5dd9700a2d37486350736dbbd8fb6516cb05ffeba9da6b9e5fb5dee6139b1740",
                "md5": "96b653a6cc51cf8c0ae6658f1f96ea7d",
                "sha256": "6d6ba96cda4ac95e1412f6ab85566015eae9c38332217c8f5507bfb4f08ab293"
            },
            "downloads": -1,
            "filename": "searchf-1.18.tar.gz",
            "has_sig": false,
            "md5_digest": "96b653a6cc51cf8c0ae6658f1f96ea7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45067,
            "upload_time": "2024-03-09T03:31:50",
            "upload_time_iso_8601": "2024-03-09T03:31:50.972966Z",
            "url": "https://files.pythonhosted.org/packages/5d/d9/700a2d37486350736dbbd8fb6516cb05ffeba9da6b9e5fb5dee6139b1740/searchf-1.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-09 03:31:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "human3",
    "github_project": "searchf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "searchf"
}
        
Elapsed time: 0.19888s