Skip to content

Commit db564a5

Browse files
committed
release: 1.3.1
2 parents 0a96639 + 6676fbf commit db564a5

File tree

8 files changed

+114
-126
lines changed

8 files changed

+114
-126
lines changed

CREDITS.md

Lines changed: 67 additions & 65 deletions
Large diffs are not rendered by default.

refract/Cargo.toml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "refract"
3-
version = "1.3.0"
3+
version = "1.3.1"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2024"
@@ -97,27 +97,21 @@ path = true
9797
label = "<PATH(s)…>"
9898
description = "Image and/or directory paths to re-encode. Directories will be crawled recursively."
9999

100-
[build-dependencies]
101-
argyle = "0.13.*"
102-
103100
[build-dependencies.refract_core]
104101
path = "../refract_core"
105102
default-features = false
106103
features = [ "png" ]
107104

108105
[dependencies]
106+
argyle = "0.14.*"
109107
dactyl = "0.13.*"
110-
dowser = "0.17.*"
108+
dowser = "0.18.*"
111109
fyi_ansi = "2.2.*"
112110
open = "=5.3.2"
113111
rfd = "=0.15.4"
114112
unicode-width = "0.2.*"
115113
write_atomic = "0.7.*"
116114

117-
[dependencies.argyle]
118-
version = "0.13.*"
119-
features = [ "try_paths" ]
120-
121115
[dependencies.iced]
122116
version = "=0.13.1"
123117
features = [ "image-without-codecs", "tokio" ]
@@ -127,10 +121,10 @@ path = "../refract_core"
127121
features = [ "images" ]
128122

129123
[dependencies.tokio]
130-
version = "=1.47.*"
124+
version = "=1.48.*"
131125
default-features = false
132126
features = [ "rt", "rt-multi-thread", "time" ]
133127

134128
[dependencies.utc2k]
135-
version = "0.17.*"
129+
version = "0.18.*"
136130
features = [ "local" ]

refract/build.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Refract - Build
33
*/
44

5-
use argyle::KeyWordsBuilder;
65
use std::{
76
fs::File,
87
io::Write,
@@ -20,29 +19,9 @@ fn main() {
2019
println!("cargo:rerun-if-changed=Cargo.toml");
2120
println!("cargo:rerun-if-changed=skel");
2221

23-
build_cli();
2422
build_imgs();
2523
}
2624

27-
/// # Build CLI Keys.
28-
fn build_cli() {
29-
let mut builder = KeyWordsBuilder::default();
30-
builder.push_keys([
31-
"-e", "--exit-auto",
32-
"-h", "--help",
33-
"--no-avif",
34-
"--no-jxl",
35-
"--no-webp",
36-
"--no-lossless",
37-
"--no-lossy",
38-
"--no-ycbcr",
39-
"-s", "--save-auto",
40-
"-V", "--version",
41-
]);
42-
builder.push_keys_with_values(["-l", "--list"]);
43-
builder.save(_out_path("argyle.rs").expect("Missing OUT_DIR."));
44-
}
45-
4625
/// # Build Images.
4726
///
4827
/// Pre-decode a couple images for embed to lessen the runtime costs of using

refract/src/app.rs

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Refract: App
33
*/
44

5-
use argyle::Argument;
65
use crate::{
76
Candidate,
87
Skin,
@@ -242,37 +241,51 @@ impl App {
242241
/// `--help` or `--version` were requested instead, in which case the
243242
/// corresponding "error" is returned.
244243
pub(super) fn new() -> Result<Self, RefractError> {
244+
argyle::argue! {
245+
ExitAuto "-e" "--exit-auto",
246+
Help "-h" "--help",
247+
NoAvif "--no-avif",
248+
NoJxl "--no-jxl",
249+
NoWebp "--no-webp",
250+
NoLossless "--no-lossless",
251+
NoLossy "--no-lossy",
252+
NoYcbcr "--no-ycbcr",
253+
SaveAuto "-s" "--save-auto",
254+
Version "-V" "--version",
255+
256+
@options
257+
List "-l" "--list",
258+
259+
@catchall-paths Path,
260+
}
261+
245262
let mut paths = Dowser::default();
246263
let mut flags = DEFAULT_FLAGS;
247264

248265
// Load CLI arguments, if any.
249-
let args = argyle::args()
250-
.with_keywords(include!(concat!(env!("OUT_DIR"), "/argyle.rs")));
251-
for arg in args {
266+
for arg in Argument::args_os() {
252267
match arg {
253-
Argument::Key("-e" | "--exit-auto") => { flags |= OTHER_EXIT_AUTO; },
254-
Argument::Key("-h" | "--help") => return Err(RefractError::PrintHelp),
255-
Argument::Key("--no-avif") => { flags &= ! FMT_AVIF; },
256-
Argument::Key("--no-jxl") => { flags &= ! FMT_JXL; },
257-
Argument::Key("--no-webp") => { flags &= ! FMT_WEBP; },
258-
Argument::Key("--no-lossless") => { flags &= ! MODE_LOSSLESS; },
259-
Argument::Key("--no-lossy") => { flags &= ! MODE_LOSSY; },
260-
Argument::Key("--no-ycbcr") => { flags &= ! MODE_LOSSY_YCBCR; },
261-
Argument::Key("-s" | "--save-auto") => { flags |= OTHER_SAVE_AUTO; },
262-
Argument::Key("-V" | "--version") => return Err(RefractError::PrintVersion),
263-
264-
Argument::KeyWithValue("-l" | "--list", s) => {
265-
let _res = paths.push_paths_from_file(s);
266-
},
267-
268+
Argument::ExitAuto => { flags |= OTHER_EXIT_AUTO; },
269+
Argument::Help => return Err(RefractError::PrintHelp),
270+
Argument::NoAvif => { flags &= ! FMT_AVIF; },
271+
Argument::NoJxl => { flags &= ! FMT_JXL; },
272+
Argument::NoWebp => { flags &= ! FMT_WEBP; },
273+
Argument::NoLossless => { flags &= ! MODE_LOSSLESS; },
274+
Argument::NoLossy => { flags &= ! MODE_LOSSY; },
275+
Argument::NoYcbcr => { flags &= ! MODE_LOSSY_YCBCR; },
276+
Argument::SaveAuto => { flags |= OTHER_SAVE_AUTO; },
277+
Argument::Version => return Err(RefractError::PrintVersion),
278+
279+
Argument::List(s) =>
280+
if s == "-" { paths.push_paths_from_stdin(); }
281+
else {
282+
let _res = paths.push_paths_from_file(s);
283+
},
268284
Argument::Path(s) => { paths = paths.with_path(s); },
269285

270286
// Mistake?
271-
Argument::Other(s) => { cli_log_arg(&s); },
272-
Argument::InvalidUtf8(s) => { cli_log_arg(&s.to_string_lossy()); },
273-
274-
// Nothing else is relevant.
275-
_ => {},
287+
Argument::Other(s) => { cli_log_arg(&s); },
288+
Argument::OtherOs(s) => { cli_log_arg(&s.to_string_lossy()); },
276289
}
277290
}
278291

refract/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
clippy::format_push_string,
2525
clippy::get_unwrap,
2626
clippy::impl_trait_in_params,
27+
clippy::implicit_clone,
2728
clippy::lossy_float_literal,
2829
clippy::missing_assert_message,
2930
clippy::missing_docs_in_private_items,
@@ -33,7 +34,6 @@
3334
clippy::rest_pat_in_fully_bound_structs,
3435
clippy::semicolon_inside_block,
3536
clippy::str_to_string,
36-
clippy::string_to_string,
3737
clippy::todo,
3838
clippy::undocumented_unsafe_blocks,
3939
clippy::unneeded_field_pattern,

refract_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "refract_core"
3-
version = "1.3.0"
3+
version = "1.3.1"
44
license = "WTFPL"
55
authors = ["Josh Stoik <[email protected]>"]
66
edition = "2024"

refract_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ This is the library powering [Refract](https://github.com/Blobfolio/refract), a
2525
clippy::format_push_string,
2626
clippy::get_unwrap,
2727
clippy::impl_trait_in_params,
28+
clippy::implicit_clone,
2829
clippy::lossy_float_literal,
2930
clippy::missing_assert_message,
3031
clippy::missing_docs_in_private_items,
@@ -34,7 +35,6 @@ This is the library powering [Refract](https://github.com/Blobfolio/refract), a
3435
clippy::rest_pat_in_fully_bound_structs,
3536
clippy::semicolon_inside_block,
3637
clippy::str_to_string,
37-
clippy::string_to_string,
3838
clippy::todo,
3939
clippy::undocumented_unsafe_blocks,
4040
clippy::unneeded_field_pattern,

release/man/refract.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "REFRACT" "1" "September 2025" "refract v1.3.0" "User Commands"
1+
.TH "REFRACT" "1" "October 2025" "refract v1.3.1" "User Commands"
22
.SH NAME
3-
REFRACT \- Manual page for refract v1.3.0.
3+
REFRACT \- Manual page for refract v1.3.1.
44
.SH DESCRIPTION
55
Guided AVIF/JPEG XL/WebP conversion for JPEG and PNG sources.
66
.SS USAGE:

0 commit comments

Comments
 (0)