Skip to content

Commit

Permalink
update version number to v0.4.0 + some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed Aug 16, 2024
1 parent 29ba5fb commit 3d49127
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

21 changes: 15 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "lolcrab"
version = "0.3.1"
authors = ["David Knaack <[email protected]>", "Nor Khasyatillah <[email protected]>"]
version = "0.4.0"
authors = [
"David Knaack <[email protected]>",
"Nor Khasyatillah <[email protected]>",
]
edition = "2018"
description = "Like lolcat but with noise and more colorful."
keywords = ["lolcat", "rainbow"]
Expand All @@ -11,9 +14,11 @@ repository = "https://github.com/mazznoer/lolcrab"
documentation = "https://docs.rs/lolcrab/"
license = "MIT OR Apache-2.0"
exclude = [
".github/*",
"docs/*",
"test_data/*",
".github/*",
"docs/*",
"scripts/*",
"test_data/*",
"Makefile",
]

[profile.release]
Expand All @@ -24,6 +29,11 @@ strip = true
default = ["cli"]
cli = ["clap", "clap_complete"]

[[bin]]
name = "lolcrab"
path = "src/main.rs"
required-features = ["cli"]

[dependencies]
bstr = "1.9.1"
clap = { version = "4.5.9", features = ["derive", "wrap_help"], optional = true }
Expand All @@ -37,4 +47,3 @@ unicode-width = "0.1.10"
[build-dependencies]
clap = { version = "4.5.9", features = ["derive", "wrap_help"], optional = true }
clap_complete = { version = "4.5.8", optional = true }
#colorgrad = { version = "0.7.0" }
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::process;
mod cli;

#[cfg(feature = "cli")]
pub use cli::*;
pub use cli::{Gradient, Opt};

pub struct Lolcrab {
pub gradient: Box<dyn colorgrad::Gradient>,
Expand Down
10 changes: 1 addition & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#![warn(clippy::pedantic, clippy::nursery)]

#[cfg(feature = "cli")]
use clap::{CommandFactory, Parser, ValueEnum};
#[cfg(feature = "cli")]
use lolcrab::{Gradient, Lolcrab, Opt};
#[cfg(feature = "cli")]
use std::{
fs::File,
io::{self, BufReader, Write},
path::PathBuf,
};

#[cfg(all(feature = "cli", feature = "mimalloc"))]
#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

#[cfg(feature = "cli")]
const SAMPLE_TEXT: &str = "\
oooo............oooo...github.com/mazznoer/lolcrab...o8.
`888............`888...............................'888.
Expand All @@ -26,7 +22,6 @@ oooo............oooo...github.com/mazznoer/lolcrab...o8.
o888o.`Y8bod8P'.o888o.`Y8bod8P'.d888b....`Y888''8o..`Y8bod8P.
";

#[cfg(feature = "cli")]
fn main() -> Result<(), io::Error> {
let opt = Opt::parse();
let stdout = io::stdout();
Expand Down Expand Up @@ -99,6 +94,3 @@ fn main() -> Result<(), io::Error> {

Ok(())
}

#[cfg(not(feature = "cli"))]
fn main() {}

0 comments on commit 3d49127

Please sign in to comment.