Skip to content

Commit

Permalink
release: 0.9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Jun 18, 2022
2 parents de10a67 + e2a4893 commit 1bb28d0
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 38 deletions.
8 changes: 4 additions & 4 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Project Dependencies
Package: fyi
Version: 0.9.11
Generated: 2022-05-31 02:07:07 UTC
Version: 0.9.12
Generated: 2022-06-18 21:47:40 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [argyle](https://github.com/Blobfolio/argyle) | 0.6.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [const_fn](https://github.com/taiki-e/const_fn) | 0.4.9 | | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.3.4 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.9.11 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.4.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.9.12 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [num-traits](https://github.com/rust-num/num-traits) | 0.2.15 | The Rust Project Developers | Apache-2.0 or MIT |
| [once_cell](https://github.com/matklad/once_cell) | 1.12.0 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | Apache-2.0 or MIT |
| [tz-rs](https://github.com/x-hgg-x/tz-rs) | 0.6.9 | x-hgg-x | Apache-2.0 or MIT |
Expand Down
6 changes: 3 additions & 3 deletions fyi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "fyi"
version = "0.9.11"
version = "0.9.12"
license = "WTFPL"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
edition = "2021"
rust-version = "1.59"
rust-version = "1.61"
description = "A dead-simple CLI status message printer for use in BASH scripts, etc."
repository = "https://github.com/Blobfolio/fyi"
publish = false
Expand Down Expand Up @@ -158,7 +158,7 @@ subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info"
path = "../fyi_msg"

[dependencies]
dactyl = "0.3.*, >=0.3.3"
dactyl = "0.4.*"

[dependencies.argyle]
version = "0.6.*"
Expand Down
8 changes: 4 additions & 4 deletions fyi_msg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "fyi_msg"
version = "0.9.11"
version = "0.9.12"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
edition = "2021"
rust-version = "1.59"
rust-version = "1.61"
description = "Simple ANSI-formatted, prefixed messages for console printing."
license = "WTFPL"
repository = "https://github.com/Blobfolio/fyi"
Expand All @@ -16,14 +16,14 @@ default-target = "x86_64-unknown-linux-gnu"
targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin" ]

[dependencies]
dactyl = "0.3.*"
dactyl = "0.4.*"

[dependencies.ahash]
version = "=0.7.6"
optional = true

[dependencies.bytecount]
version = "=0.6.2"
version = "=0.6.3"
optional = true

[dependencies.term_size]
Expand Down
35 changes: 34 additions & 1 deletion fyi_msg/src/progress/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use dactyl::{
NicePercent,
NiceU32,
traits::SaturatingFrom,
write_time,
};
use std::{
cmp::Ordering,
Expand All @@ -46,6 +45,15 @@ use task::ProglessTask;



/// # Double-Digit Times.
///
/// This holds pre-asciified double-digit numbers up to sixty for use by the
/// `write_time` method. It doesn't need to hold anything larger than that.
static DD: [u8; 120] = *b"\
000102030405060708091011121314151617181920212223242526272829\
303132333435363738394041424344454647484950515253545556575859\
";

/// # Helper: Mutex Unlock.
///
/// This just moves tedious code out of the way.
Expand Down Expand Up @@ -1190,3 +1198,28 @@ fn term_width() -> u8 {
|(w, _)| u8::saturating_from(w.saturating_sub(1))
)
}

#[allow(unsafe_code)]
/// # Write Time.
///
/// This writes HH:MM:SS to the provided pointer.
///
/// ## Panics
///
/// This method is only intended to cover values that fit in a day and will
/// panic if `h`, `m`, or `s` is outside the range of `0..60`.
///
/// ## Safety
///
/// The pointer must have 8 bytes free or undefined things will happen.
unsafe fn write_time(buf: *mut u8, h: u8, m: u8, s: u8) {
debug_assert!(h < 60 && m < 60 && s < 60, "BUG: Invalid progress time pieces.");

let src = DD.as_ptr();

std::ptr::copy_nonoverlapping(src.add((h << 1) as usize), buf, 2);
std::ptr::write(buf.add(2), b':');
std::ptr::copy_nonoverlapping(src.add((m << 1) as usize), buf.add(3), 2);
std::ptr::write(buf.add(5), b':');
std::ptr::copy_nonoverlapping(src.add((s << 1) as usize), buf.add(6), 2);
}
4 changes: 2 additions & 2 deletions release/man/fyi-blank.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI BLANK" "1" "May 2022" "blank v0.9.11" "User Commands"
.TH "FYI BLANK" "1" "June 2022" "blank v0.9.12" "User Commands"
.SH NAME
blank \- Manual page for blank v0.9.11.
blank \- Manual page for blank v0.9.12.
.SH DESCRIPTION
Print blank line(s).
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-confirm.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI CONFIRM" "1" "May 2022" "confirm v0.9.11" "User Commands"
.TH "FYI CONFIRM" "1" "June 2022" "confirm v0.9.12" "User Commands"
.SH NAME
confirm \- Manual page for confirm v0.9.11.
confirm \- Manual page for confirm v0.9.12.
.SH DESCRIPTION
Ask a Yes/No question using the built\-in prefix "confirm".
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-crunched.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI CRUNCHED" "1" "May 2022" "crunched v0.9.11" "User Commands"
.TH "FYI CRUNCHED" "1" "June 2022" "crunched v0.9.12" "User Commands"
.SH NAME
crunched \- Manual page for crunched v0.9.11.
crunched \- Manual page for crunched v0.9.12.
.SH DESCRIPTION
Crunched: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-debug.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI DEBUG" "1" "May 2022" "debug v0.9.11" "User Commands"
.TH "FYI DEBUG" "1" "June 2022" "debug v0.9.12" "User Commands"
.SH NAME
debug \- Manual page for debug v0.9.11.
debug \- Manual page for debug v0.9.12.
.SH DESCRIPTION
Debug: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-done.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI DONE" "1" "May 2022" "done v0.9.11" "User Commands"
.TH "FYI DONE" "1" "June 2022" "done v0.9.12" "User Commands"
.SH NAME
done \- Manual page for done v0.9.11.
done \- Manual page for done v0.9.12.
.SH DESCRIPTION
Done: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-error.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI ERROR" "1" "May 2022" "error v0.9.11" "User Commands"
.TH "FYI ERROR" "1" "June 2022" "error v0.9.12" "User Commands"
.SH NAME
error \- Manual page for error v0.9.11.
error \- Manual page for error v0.9.12.
.SH DESCRIPTION
Error: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-info.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI INFO" "1" "May 2022" "info v0.9.11" "User Commands"
.TH "FYI INFO" "1" "June 2022" "info v0.9.12" "User Commands"
.SH NAME
info \- Manual page for info v0.9.11.
info \- Manual page for info v0.9.12.
.SH DESCRIPTION
Info: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-notice.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI NOTICE" "1" "May 2022" "notice v0.9.11" "User Commands"
.TH "FYI NOTICE" "1" "June 2022" "notice v0.9.12" "User Commands"
.SH NAME
notice \- Manual page for notice v0.9.11.
notice \- Manual page for notice v0.9.12.
.SH DESCRIPTION
Notice: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-print.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI PRINT" "1" "May 2022" "print v0.9.11" "User Commands"
.TH "FYI PRINT" "1" "June 2022" "print v0.9.12" "User Commands"
.SH NAME
print \- Manual page for print v0.9.11.
print \- Manual page for print v0.9.12.
.SH DESCRIPTION
Print a message without a prefix (or with a custom one).
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-success.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI SUCCESS" "1" "May 2022" "success v0.9.11" "User Commands"
.TH "FYI SUCCESS" "1" "June 2022" "success v0.9.12" "User Commands"
.SH NAME
success \- Manual page for success v0.9.11.
success \- Manual page for success v0.9.12.
.SH DESCRIPTION
Success: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-task.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI TASK" "1" "May 2022" "task v0.9.11" "User Commands"
.TH "FYI TASK" "1" "June 2022" "task v0.9.12" "User Commands"
.SH NAME
task \- Manual page for task v0.9.11.
task \- Manual page for task v0.9.12.
.SH DESCRIPTION
Task: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi-warning.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI WARNING" "1" "May 2022" "warning v0.9.11" "User Commands"
.TH "FYI WARNING" "1" "June 2022" "warning v0.9.12" "User Commands"
.SH NAME
warning \- Manual page for warning v0.9.11.
warning \- Manual page for warning v0.9.12.
.SH DESCRIPTION
Warning: Hello World
.SS USAGE:
Expand Down
4 changes: 2 additions & 2 deletions release/man/fyi.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "FYI" "1" "May 2022" "FYI v0.9.11" "User Commands"
.TH "FYI" "1" "June 2022" "FYI v0.9.12" "User Commands"
.SH NAME
FYI \- Manual page for fyi v0.9.11.
FYI \- Manual page for fyi v0.9.12.
.SH DESCRIPTION
A dead\-simple CLI status message printer for use in BASH scripts, etc.
.SS USAGE:
Expand Down

0 comments on commit 1bb28d0

Please sign in to comment.