Metadata-Version: 2.1
Name: coating
Version: 0.0.2
Summary: A filter with an pointer interface 🦝
Author-email: Pieli <pieli.dev@gmail.com>
Project-URL: Homepage, https://github.com/Pieli/coating
Project-URL: Bug Tracker, https://github.com/Pieli/coating/issues
Keywords: vim,bash,cli,unix,rice,tui,hci,interaction,unix-philosophy
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4 ==4.12.2
Requires-Dist: bs4 ==0.0.1
Requires-Dist: lxml ==4.9.3
Requires-Dist: soupsieve ==2.5

<p align="center">
  <img src="https://github.com/Pieli/coating/blob/main/assets/coating_logo_small.png" />
</p>
<p align="center">
 <a href="https://github.com/Pieli/coating/actions/workflows/pylint.yml">
    <img src="https://github.com/Pieli/coating/actions/workflows/pylint.yml/badge.svg">
  </a>
 <a href="https://github.com/Pieli/coating/actions/workflows/python-publish.yml">
    <img src="https://github.com/Pieli/coating/actions/workflows/python-publish.yml/badge.svg?branch=main">
  </a>
</p>


`coating` creates a clickable pane, based on the standard input.

or more precise:  
  
`coating` reads lines from STDIN, allowing you to interactively select a value, which is then returned to STDOUT.

![example_interaction](assets/example_interaction.gif)

* coating enables interactive filters in piped commands
* a unix-philosophy experiment
* brings the mouse to the cli :)
* a fzf inspired tool
<p align="center">
  <img width=80% src="https://github.com/Pieli/coating/blob/main/assets/demo.gif" />
</p>


**But, what does it do?**  
- Every non-white space becomes a token
- Every token will be possible element for selection
- After a selection, the token will be returned through standard output

## Usage
Here are some examples, after the [installation step](#installation)  

This will open the selected file/directory of the current directory in vim:
```sh
vim $(ls -C | coating)
```

Another possible usage is this:
```sh
ls -C | coating | xargs xdg-open
```
This opens the selected file with it's standard application.

For more ways to use `coating` check out the `examples` directory.  

### Html Parser
- when run with the `--tags` flag, coating will look for HTML tags (excluding semantics) and makes tag bodies clickable.
- this function allows for a predefinition of clickable elements, in contrast to the default case, where every non-whitespace character is clickable
- if the tags are nested, only the highest level of tags is clickable
- in the case ther are no tags in the text, every word will be tokenized and clickable.

<p align="center">
  <img width=70% src="https://github.com/Pieli/coating/blob/main/assets/ice-cream.gif" />
</p>


## Installation
> [!Note]
> only tested / written for linux

You can install `coating` from the PyPI repositories using the following command:
```
pip install coating
```
or check the realease page for a manual installation.

on ubuntu first install ncurses-term:
```
apt install ncurses-term
```


## Issues

> [!Important]
> This tool currently supports python3.10 and upwards

On version with a python version lower than 3.10 the `curses.BUTTON5` constant is not supported.

Please report possible issues [here](https://github.com/Pieli/coating/issues). 

## License

This project is licensed under the [GPLv3 License](LICENSE).

---
Made with love by 🦝

