Closed rachancheet closed 3 months ago
I believe this can be done with -f, --file
.
User will have to manually set a unique file name every time they want to save a screenshot in a particular directory . Folder flag makes it so user can just specify the folder location and file names are UNIX_TIMESTAMP-wayshot.EXTENSION
I think this is better solved by having file flag accept paths too. That way we can automatically have the same behavior. Introducing too many flags isn't great UX.
I have added the requested change. Please review.
CC: @zubairmh @Decodetalkers
Aside from some styling changes that can be made, commit is ok
Can you expand on this? Style looks fine to me.
Can you expand on this? Style looks fine to me.
@Shinyzenith This section could be rephrased
if pathbuf.is_dir() {
pathbuf.push(utils::get_default_file_name(requested_encoding));
Some(pathbuf)
} else {
Some(pathbuf)
}
to something like
if pathbuf.is_dir() {
pathbuf.push(utils::get_default_file_name(requested_encoding));
}
Some(pathbuf)
might just be feeling picky, either way works
cc @zubairmh Please review.
looks good. lgtm
Hi, CI is failing on this PR. Kindly format your patch.
cc @Shinyzenith fixed.
Hi, I'd like to merge this, can you resolve the conflicts?
Done. @Shinyzenith
Thanks! However, I redid the entire documentation block to be more concise and easy to read.
Currently Wayshot save screenshots in the current working directory. However this is not ideal as some users like to save screenshots in a particular directory(For example $HOME/Pictures/screenshots). This PR introduces a
--folder
flag which allows users to select save directory for their screenshots.