Feature: width argument to calculate scale from number of available columns #6

Merged
giulio-Joshi merged 3 commits from columns_arg into master 2022-10-26 19:36:21 +00:00
giulio-Joshi commented 2022-10-25 19:16:52 +00:00 (Migrated from github.com)

Hello, its me again 😃

I'm using your converter and found myself in this situation: I wanted to aartyze a bunch of pics from different size, all to an ascii file the same width.
This feature come out naturally and gave the occasion of testing a small part of the code.

Do you think this could help you?

Hello, its me again :smiley: I'm using your converter and found myself in this situation: I wanted to `aartyze` a bunch of pics from different size, all to an ascii file the same width. This feature come out naturally and gave the occasion of testing a small part of the code. Do you think this could help you?
anas-elgarhy commented 2022-10-26 15:58:28 +00:00 (Migrated from github.com)

Nice feature @giulio-Joshi, I Think it will be useful ❤️

Nice feature @giulio-Joshi, I Think it will be useful ❤️
anas-elgarhy commented 2022-10-26 16:01:35 +00:00 (Migrated from github.com)

I'm glad you liked the tool, And thanks to you for tests

I'm glad you liked the tool, And thanks to you for tests
anas-elgarhy (Migrated from github.com) requested changes 2022-10-26 16:26:16 +00:00
@ -105,6 +105,9 @@ Options:
[default: 4]
-w, --width <WIDTH>
anas-elgarhy (Migrated from github.com) commented 2022-10-26 16:25:48 +00:00

Please copy this from the aarty --help output to save the consistency

Please copy this from the `aarty --help` output to save the consistency
anas-elgarhy (Migrated from github.com) commented 2022-10-26 16:11:13 +00:00

Can you make this comment a document comment(///) instead of a normal comment, because the clap will be use it in the help message that appears when you run aarty --help

Can you make this comment a document comment(`///`) instead of a normal comment, because the `clap` will be use it in the help message that appears when you run `aarty --help`
@ -63,0 +89,4 @@
output_method: OutputMethod::Stdout,
image: "".into(),
characters: "".into(),
scale: 4,
anas-elgarhy (Migrated from github.com) commented 2022-10-26 16:20:34 +00:00

You can make this method as inline method using the #[inline] suggests, This will can provide small but easy speed win.
https://nnethercote.github.io/perf-book/inlining.html

You can make this method as inline method using the `#[inline]` suggests, This will can provide small but easy speed win. https://nnethercote.github.io/perf-book/inlining.html
anas-elgarhy (Migrated from github.com) requested changes 2022-10-26 16:29:42 +00:00
anas-elgarhy (Migrated from github.com) left a comment

Nice addition thanks, but there are some minor tweaks

Nice addition thanks, but there are some minor tweaks
giulio-Joshi (Migrated from github.com) reviewed 2022-10-26 17:55:27 +00:00
@ -63,0 +89,4 @@
output_method: OutputMethod::Stdout,
image: "".into(),
characters: "".into(),
scale: 4,
giulio-Joshi (Migrated from github.com) commented 2022-10-26 17:55:27 +00:00

No problem, even if actually is called just once per run.

Could gain more performance if we read the image from a file, or from stdin (for better bash integration).

No problem, even if actually is called just once per run. Could gain more performance if we read the image from a file, or from `stdin` (for better bash integration).
giulio-Joshi commented 2022-10-26 17:55:46 +00:00 (Migrated from github.com)

Yes of course, changes incoming.

Yes of course, changes incoming.
anas-elgarhy (Migrated from github.com) reviewed 2022-10-26 19:30:01 +00:00
@ -63,0 +89,4 @@
output_method: OutputMethod::Stdout,
image: "".into(),
characters: "".into(),
scale: 4,
anas-elgarhy (Migrated from github.com) commented 2022-10-26 19:30:01 +00:00

I understand reading the image from a file, but what you mean with reading it from stdin?

I understand reading the image from a file, but what you mean with reading it from stdin?
anas-elgarhy (Migrated from github.com) approved these changes 2022-10-26 19:30:34 +00:00
giulio-Joshi (Migrated from github.com) reviewed 2022-10-26 19:48:28 +00:00
@ -63,0 +89,4 @@
output_method: OutputMethod::Stdout,
image: "".into(),
characters: "".into(),
scale: 4,
giulio-Joshi (Migrated from github.com) commented 2022-10-26 19:48:27 +00:00

That would mean like how the -@ options works for zip program:

ls *.jpg | zip image_gallery.zip -@

All *.jpg files get streamed to zip and each one gets added to image_gallery.zip
But that would mean changing some of the program parameters.

That would mean like how the `-@` options works for `zip` program: ```bash ls *.jpg | zip image_gallery.zip -@ ``` All `*.jpg` files get streamed to `zip` and each one gets added to `image_gallery.zip` But that would mean changing some of the program parameters.
Sign in to join this conversation.
No description provided.