Metadata-Version: 2.1
Name: bigyo
Version: 0.1.2
Summary: Python library for side-by-side diff in terminal, use difflib as its engine. Supports beautiful output with multi-width or zero-width character.
Author-email: LegenDUST <dhnam0502@naver.com>
License: MIT License
        
        Copyright (c) 2022 LegenDUST
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/dhnam/bigyo
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# bigyo

[![Downloads](https://pepy.tech/badge/bigyo)](https://pepy.tech/project/bigyo)
(Badge for me :D)

Bigyo (비교(KR): Comparison) is simple python library for side-by-side diff in terminal.

Use difflib as its engine.

Supports beautiful output with multi-width or zero-width character.

## Install

```
pip install bigyo
```

It just works!

## How to

Replace 
```py
difflib.Differ().compare(a, b)
```
to
```py
bigyo.Bigyo().compare(a, b)
```
and you get your nice side-by-side comparison generator. (Note it is generator)

Also, to get full comparison string at once, there is
```py
bigyo.Bigyo().comparison_string(a, b)
```
method for you to use.

## Bigyo rendering strategy

Default bigyo rendering strategy is `SimpleBigyoRenderer` with default params, which will look like this.
```
- Hello, World |+  Helo, Wold!
?    -     -   |?            +
```

However, you can change separator (defaults to `|`) if you wish, by making `BigyoRenderer` class with parameter,
```py
bigyo_rd = SimpleBigyoRenderer(sep="*")
```
...And give it as parameter of `Bigyo`.
```py
bigyo_cls = bigyo.Bigyo(bigyo_renderer = bigyo_rd)
```

In this case, result will look like this.
```
- Hello, World *+  Helo, Wold!
?    -     -   *?            +
```

Also there exists `OnelineBigyoRenderer` which will render difference like this.
```
He>l<lo, Wo>r<ld|Helo, Wold<!>
```

## History

All the commits can be found in [github page](https://github.com/dhnam/bigyo).

```
0.0.1 2022.12.15 Project init!
0.1.0 2022.12.17 Added comparison_string method, changed name from BigyoStrategy to BigyoRenderer, bugfix
0.1.1 2022.12.17 Separate bigyo_renderer, change directory structure
0.1.2 2022.12.21 Now with sphinx document!
```
