Skip to main content

Doc-FZF: Modular CLI Documentation Fuzzy Finder

Fuzzy Search documentation from the CLI and open them in the browser.

See it in action here https://terminalizer.com/view/2c3935cf1418

Disclaimer This tool was built to learn FZF capabilities. Feel free to use it or extend it.

Usage

doc-fzf ansible
doc-fzf ansible -q yum

Installation

pip3 install doc-fzf

Verify your installation:

doc-fzf -h
usage: doc-fzf.py [-h] [-q QUERY] module_name

doc-fzf.

positional arguments:
module_name  Name of the module to search

optional arguments:
-h, --help   show this help message and exit
-q QUERY     Query the docs

Extending Doc-FZF

doc-fzf is a modular application. It can load modules at runtime that scrap websites in any way you like.

Any module should always contain:

  • class name must always be Scrapper(FZFDoc)
  • self.documentation_url attribute
  • def get_documentation(self): function that must always return a tuple ("url", "description")
from doc_fzf.pyfzf import FZFDoc


class Scrapper(FZFDoc):
    def __init__(self):
        self.base_url = "https://docs.python.org/3"
        self.documentation_url = "{0}/py-modindex.html".format(self.base_url)
        FZFDoc.__init__(self, self.documentation_url)

    def get_documentation(self):
        """ Return a tuple of (url, description)
        """
        docs = get_online_documentation()
        for doc in docs:
            yield (doc.url, doc.description)

Here is the ansible documentation example

Road Map

  • Module definition
  • FZFDoc base class
  • File system cache layer
  • Load modules at runtime

References

Metadata

Release files for doc-fzf 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doc-fzf 0.0.7
File Size Uploaded
doc-fzf-0.0.7.tar.gz 5.3 kB Details

Release files / doc-fzf-0.0.7.tar.gz

Download URL doc-fzf-0.0.7.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
43508d044f9981ffa49285f76eae6563215d026dfac3afd7b3d1c812c2bd41f0
BLAKE2b-256 checksum
How to use checksums
d0b997d2a4401496594ef7c84329df7876afae3ba1de7b126b15f5ed2a4f1979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page