1
0
mirror of https://github.com/o2sh/onefetch synced 2024-06-30 22:54:20 +00:00

Turn AsciiArt.rs into its own crate (#934)

* make ascii art into its own crate

* add symbolic link for licence.md

* cargo sort

* add readme
This commit is contained in:
Ossama Hjaji 2023-01-18 21:45:10 +01:00 committed by GitHub
parent c6c60543c1
commit 17165192bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 283 additions and 255 deletions

8
Cargo.lock generated
View File

@ -2135,6 +2135,7 @@ dependencies = [
"insta",
"lazy_static",
"num-format",
"onefetch-ascii",
"onefetch-image",
"onefetch-manifest",
"owo-colors",
@ -2154,6 +2155,13 @@ dependencies = [
"yaml-rust",
]
[[package]]
name = "onefetch-ascii"
version = "2.14.2"
dependencies = [
"owo-colors",
]
[[package]]
name = "onefetch-image"
version = "2.14.2"

View File

@ -14,7 +14,7 @@ rust-version = "1.62.1"
version = "2.14.2"
[workspace]
members = ["image", "manifest"]
members = ["ascii", "image", "manifest"]
[dependencies]
anyhow = "1.0.66"
@ -33,8 +33,9 @@ git2 = { version = "0.15.0", default-features = false }
human-panic = "1.0.3"
image = "0.24.4"
num-format = "0.4.4"
onefetch-image = { path = "image", version = "2.13.2" }
onefetch-manifest = { path = "manifest", version = "2.13.2" }
onefetch-ascii = { path = "ascii", version = "2.14.2" }
onefetch-image = { path = "image", version = "2.14.2" }
onefetch-manifest = { path = "manifest", version = "2.14.2" }
owo-colors = "3.5.0"
regex = "1.6.0"
serde = "1.0.147"
@ -51,10 +52,10 @@ typetag = "0.2"
yaml-rust = "0.4.5"
[dev-dependencies]
criterion = "0.4.0"
git-testtools = "0.10.0"
insta = { version = "1.23.0", features = ["json", "redactions"] }
pretty_assertions = "1.3.0"
criterion = "0.4.0"
[[bench]]
name = "repo"

12
ascii/Cargo.toml Normal file
View File

@ -0,0 +1,12 @@
[package]
authors = ["o2sh <ossama-hjaji@live.fr>"]
name = "onefetch-ascii"
description = "Display colorized ascii art to the terminal"
version = "2.14.2"
edition = "2021"
license = "MIT"
readme = "README.md"
repository = "https://github.com/o2sh/onefetch"
[dependencies]
owo-colors = "3.5.0"

1
ascii/LICENSE.md Symbolic link
View File

@ -0,0 +1 @@
../LICENSE.md

7
ascii/README.md Normal file
View File

@ -0,0 +1,7 @@
# ascii
Provides the primary interface to display ascii art to the terminal.
More info [here](https://github.com/o2sh/onefetch/wiki/ascii-art).
_This crate is designed as part of the [onefetch](https://github.com/o2sh/onefetch) project._

View File

@ -1,6 +1,6 @@
# image
Provides the primary interface to diplay images in the terminal.
Provides the primary interface to diplay images to the terminal.
Protocols supported:

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
use crate::info::langs::language::Language;
use owo_colors::{AnsiColors, DynColors};
pub mod ascii_art;
pub mod printer;
pub mod text_colors;

View File

@ -1,9 +1,9 @@
use crate::cli::{Config, When};
use crate::info::Info;
use crate::ui::ascii_art::AsciiArt;
use crate::ui::Language;
use anyhow::{Context, Result};
use image::DynamicImage;
use onefetch_ascii::AsciiArt;
use onefetch_image::ImageBackend;
use std::fmt::Write as _;
use std::io::Write;