thecodrr / crayon Goto Github PK
View Code? Open in Web Editor NEW๐๏ธ Paint your terminal output like Picasso ๐จ
License: MIT License
๐๏ธ Paint your terminal output like Picasso ๐จ
License: MIT License
/home/xander/.vmodules/thecodrr/crayon/crayon.v:118:48: cannot use type `?int` as type `int` in second argument to `index_after()`
116| pub fn strip_text(text string) string{
117| start_index := text.index("\e[")
118| end_index := text.index_after("m", start_index) + 1
^
119|
120| if start_index >= 0 && end_index >= 0 {
Can't use this module cause of this
/home/teris/.vmodules/thecodrr/crayon/colors.v:67:28: warning: `fn f(x, y Type)` syntax has been deprecated and will soon be removed. Use `fn f(x Type, y Type)` instead. You can run `v fmt -w "/home/teris/.vmodules/thecodrr/crayon/colors.v"` to automatically fix your code.
65 | }
66 |
67 | pub fn (c &Crayon) bg_rgb(r, g, b int) &Crayon {
| ^
68 | rgb := r.str() + ";" + g.str() + ";" + b.str()
69 | mut crayon := c
/home/teris/.vmodules/thecodrr/crayon/colors.v:67:31: warning: `fn f(x, y Type)` syntax has been deprecated and will soon be removed. Use `fn f(x Type, y Type)` instead. You can run `v fmt -w "/home/teris/.vmodules/thecodrr/crayon/colors.v"` to automatically fix your code.
65 | }
66 |
67 | pub fn (c &Crayon) bg_rgb(r, g, b int) &Crayon {
| ^
68 | rgb := r.str() + ";" + g.str() + ";" + b.str()
69 | mut crayon := c
/home/teris/.vmodules/thecodrr/crayon/colors.v:139:25: warning: `fn f(x, y Type)` syntax has been deprecated and will soon be removed. Use `fn f(x Type, y Type)` instead. You can run `v fmt -w "/home/teris/.vmodules/thecodrr/crayon/colors.v"` to automatically fix your code.
137 | }
138 |
139 | pub fn (c &Crayon) rgb(r, g, b int) &Crayon {
| ^
140 | rgb := r.str() + ";" + g.str() + ";" + b.str()
141 | mut crayon := c
/home/teris/.vmodules/thecodrr/crayon/colors.v:139:28: warning: `fn f(x, y Type)` syntax has been deprecated and will soon be removed. Use `fn f(x Type, y Type)` instead. You can run `v fmt -w "/home/teris/.vmodules/thecodrr/crayon/colors.v"` to automatically fix your code.
137 | }
138 |
139 | pub fn (c &Crayon) rgb(r, g, b int) &Crayon {
| ^
140 | rgb := r.str() + ";" + g.str() + ";" + b.str()
141 | mut crayon := c
/home/teris/.vmodules/thecodrr/crayon/crayon.v:23:27: error: cannot use `[]string` as `string` in argument 1 to `arr`
21 | println("Your terminal does not support colors. Please use a terminal that supports escape sequences for the best experience.")
22 | }
23 | return &Crayon{text: arr(texts)}
| ~~~~~
24 | }
25 |
/home/teris/.vmodules/thecodrr/crayon/crayon.v:91:22: error: cannot use `[]string` as `string` in argument 1 to `arr`
89 | pub fn (c &Crayon) print_with(texts ...string) {
90 | if texts.len > 0 {
91 | text_joined := arr(texts).join(" ")
| ~~~~~
92 | println(c.str() + " " + text_joined)
93 | } else {
/home/teris/.vmodules/thecodrr/crayon/parser.v:68:15: error: strconv.atoi() returns an option but is missing an `or {}` block
66 | return -1,-1,-1
67 | }
68 | r := strconv.atoi(clrs[0])
| ~~~~~~~~~~~~~
69 | g := strconv.atoi(clrs[1])
70 | b := strconv.atoi(clrs[2])
/home/teris/.vmodules/thecodrr/crayon/parser.v:69:15: error: strconv.atoi() returns an option but is missing an `or {}` block
67 | }
68 | r := strconv.atoi(clrs[0])
69 | g := strconv.atoi(clrs[1])
| ~~~~~~~~~~~~~
70 | b := strconv.atoi(clrs[2])
71 | return r,g,b
/home/teris/.vmodules/thecodrr/crayon/parser.v:70:15: error: strconv.atoi() returns an option but is missing an `or {}` block
68 | r := strconv.atoi(clrs[0])
69 | g := strconv.atoi(clrs[1])
70 | b := strconv.atoi(clrs[2])
| ~~~~~~~~~~~~~
71 | return r,g,b
72 | }
when i import the module it print this.
notice: use `mut array2 := array1.clone()` instead of `mut array2 := array1` (or use `unsafe`)
16 |
17 | fn (c Crayon) stylize(s string) Crayon {
18 | mut stl := c.style
| ~~
19 | stl << style[s].str()
20 | return Crayon{
win 11
vscode
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.