Skip to content

Commit

Permalink
update documentation, update ConsoleUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyomKingmang committed Jul 20, 2024
1 parent 3e0173f commit bb1f526
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
31 changes: 24 additions & 7 deletions docs/Libraries_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,36 @@ print(out_array)
# artify
Библиотека для преобразования текста в ASCII арт.

`artify.build(text = "")` - преобразует текст с арт
`artify.build(text = "", style = "")` - преобразует текст в арт

Пример:
````java
using "lzr.utils.artify"

print(artify.build("Hello World!"))
println(artify.build("Hello", "doom"))
````
Вывод:
````
_ _ ___ _ _ ___ __ __ ___ ___ _ ___ _
| || | | __| | | | | / _ \ \ \ / / / _ \ | _ \ | | | \ | |
| __ | | _| | |__ | |__ | (_) | \ \/\/ / | (_) | | / | |__ | |) | |_|
|_||_| |___| |____| |____| \___/ \_/\_/ \___/ |_|_\ |____| |___/ (_)
_ _ _ _
| | | | | || |
| |_| | ___ | || | ___
| _ | / _ \| || | / _ \
| | | || __/| || || (_) |
\_| |_/ \___||_||_| \___/
````

Все стили:

````
banner,
doh,
doom,
georgia,
gothic,
small,
smkeyboard,
speed,
starwars,
swampland
````

# base64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ object ConsoleUI {
val maxLength = maxOf(version.length, title.length)
val divider = "-".repeat(maxLength)
"\n\t$version\n\t$title\n\t$divider"

}

private val HELP by lazy {
Expand Down Expand Up @@ -49,8 +50,8 @@ object ConsoleUI {
fun printFirstHelp() {
AnsiConsole.systemInstall()
println(Ansi.ansi().fg(Ansi.Color.RED).a(HEADER).reset())
AnsiConsole.out().println(DIVIDER)
AnsiConsole.out().println(HELP)
println(Ansi.ansi().fg(Ansi.Color.GREEN).a(DIVIDER).reset())
println(Ansi.ansi().fg(Ansi.Color.GREEN).a(HELP).reset())
}

fun printHelp() {
Expand Down
3 changes: 0 additions & 3 deletions test/test.lzr
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
for(i = 0, i < 10, i++){
println(i)
}

0 comments on commit bb1f526

Please sign in to comment.