Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace colored with owo-colors #620

Merged
merged 4 commits into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 20 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,31 @@ Adding support for a new Language consists in adding a new entry to the `define_

**Example**:

`{ CSharp, Programming, "csharp.ascii", define_colors!( [Color::Blue, Color::Magenta] ), "c#" },`
`{ TypeScript, Programming, "typescript.ascii", define_colors!([Cyan, White] : [Rgb(0, 122, 204), Rgb(255, 255, 255)]) }`

The first item `CSharp` corresponds to the name of the language as defined in [tokei](https://github.com/XAMPPRocky/tokei). The second item refers to the language type as specified by [linguist](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml), only four values are possible: Programming, Markup, Prose and Data. The third item `csharp.ascii` is the name of the file containing the ascii logo: this file has to be placed in the _./resources_ folder (more info below). Then we have the colors used to customize the look of the ascii logo when displayed to the screen. The last item `c#` is only required if the Enum name `CSharp` doesn't match the display name `C#` and is used as an input for `-a, --ascii-language <LANGUAGE>` - by default we take the Enum name in lowercase.
The first item `TypeScript` corresponds to the name of the language as defined in [tokei](https://github.com/XAMPPRocky/tokei). The second item refers to the language type as specified by [linguist](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml), only four values are possible: Programming, Markup, Prose and Data. The third item `typescript.ascii` is the name of the file containing the ascii logo: this file has to be placed in the _./resources_ folder (more info below). Then we have the colors used to customize the look of the ascii logo when displayed to the screen.

#### Ascii logo

```text
{0} ++++++
{0} ++++++++++++
{0} ++++++++++++++++++++
{0} ++++++++++++++++++++++++++
{0} ++++++++++++++++++++++++++++++++
{0} +++++++++++++{2}************{0}+++++++++++++
{0}+++++++++++{2}******************{0}++++++++{1}:::
{0}+++++++++{2}**********************{0}++{1}:::::::
{0}++++++++{2}*********{0}++++++{2}******{1}:::::::::::
{0}+++++++{2}********{0}++++++++++{2}**{1}:::{2}**{1}:::{2}**{1}:::
{0}+++++++{2}*******{0}+++++++++{1}::::::{2}*********{1}::
{0}+++++++{2}******{0}+++++++{1}::::::::::{2}**{1}:::{2}**{1}:::
{0}+++++++{2}*******{0}+++{1}::::::::::::{2}*********{1}::
{0}+++++++{2}********{1}::::::::::{2}**{1}:::{2}**{1}:::{2}**{1}:::
{0}++++++++{2}*********{1}::::::{2}******{1}:::::::::::
{0}++++++{1}:::{2}**********************{1}:::::::::
{0}+++{1}::::::::{2}******************{1}:::::::::::
{1} :::::::::::::{2}************{1}:::::::::::::
{1} ::::::::::::::::::::::::::::::::
{1} ::::::::::::::::::::::::::
{1} ::::::::::::::::::::
{1} ::::::::::::
{1} ::::::
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTS{1}TSTSTSTSTSTSTS{0}TSTS{1}TSTSTS{0}TSTSTS
{0}TSTSTSTS{1}TSTSTSTSTSTSTS{0}TS{1}TSTSTSTSTS{0}TSTS
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTST{1}TSTST{0}TSTSTSTST
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTS{1}TSTST{0}STSTSTST
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTSTS{1}TSTST{0}STSTST
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTSTSTS{1}TSTST{0}TSTS
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTSTSTST{1}TSTST{0}TST
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTS{1}TSTSTSTSTS{0}TST
{0}TSTSTSTSTSTST{1}TSTS{0}TSTSTSTSTS{1}TSTSTS{0}STSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
{0}TSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTSTS
```

Remarks:
Expand Down
19 changes: 7 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ byte-unit = "4.0.14"
bytecount = "0.6.2"
clap = {version = "3.1.6", features = ["cargo", "wrap_help"]}
color_quant = "1.1.0"
colored = "2.0.0"
git2 = {version = "0.14.1", default-features = false}
image = "0.24.1"
owo-colors = "3.2.0"
regex = "1.5.5"
serde = "1.0.136"
serde_json = "1.0.79"
Expand Down
Loading