Metadata-Version: 2.1
Name: yaex
Version: 1.0.0
Summary: This is a library based on the ex command.
Home-page: https://github.com/emersonmx/yaex
License: MIT
Author: Emerson Max de Medeiros Silva
Author-email: emersonmx@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Project-URL: Repository, https://github.com/emersonmx/yaex
Description-Content-Type: text/markdown

# Yet Another EX command library

This is a library based on the ex command. So, it works the same way :)

## Usage

```python
from yaex import *

result = yaex(
    append("Hello"),
    append("World"),
)
print(result)
# >Hello
# >World
# >

result = yaex(
    append("first line"),
    append("second line"),
    append("third line"),
    go_to(2),
    delete(),
)
print(result)
# >first line
# >third line
# >

result = yaex(
    append("first line"),
    append("second line"),
    append("third line"),
    move(-1),
    delete(),
)
print(result)
# >first line
# >third line
# >

result = yaex(
    append("first line"),
    append("second line"),
    append("third line"),
    search("second"),
    delete(),
)
print(result)
# >first line
# >third line
# >

result = yaex(
    append("# yaex\n\nThis is a library based on the ex command.\n"),
    go_to_first_line(),
    delete(),
    insert("# Yet Another EX command library"),
)
print(result)
# ># Yet Another EX command library
# >
# >This is a library based on the ex command.
# >

result = yaex(
    append("first line\nsecond line\nthird line\nfourth line\nfifth line\nsixth line\n"),
    delete().from_range(search("second"), search("fifth")),
)
print(result)
# >first line
# >sixth line
# >

result = yaex(
    append("first line\nsecond line\nthird line\nfourth line\nfifth line\nsixth line\n"),
    substitute("line", "LINE").from_range(go_to_first_line(), go_to_last_line()),
)
print(result)
# >first LINE
# >second LINE
# >third LINE
# >fourth LINE
# >fifth LINE
# >sixth LINE
# >
```

