hound icon indicating copy to clipboard operation
hound copied to clipboard

Override default directory for (or pass dir to) take_screenshot/1

Open marcdel opened this issue 6 years ago • 3 comments

It would be nice to have a little more control over where screenshots get written. There are two options I'd like to have (either or both would be great):

  1. Set a default directory location in the config
  2. Pass a directory to take_screenshot/1

Both of these would ideally retain the existing name generation feature screenshot-#{year}-#{month}-#{day}-#{hour}-#{minutes}-#{seconds}.png.

I'm happy to submit a PR if this is something you're interested in. Option 2 I could do fairly easily, option 1 I'd need to poke around the code base a bit more first. Thanks!

marcdel avatar Dec 22 '17 14:12 marcdel

Hi, Someone started to work on this functionality but we were missing tests and the PR is still pending: https://github.com/HashNuke/hound/pull/163 If you would like to give it a try, I would be glad to merge it. Thank you very much.

danhper avatar Dec 27 '17 12:12 danhper

Sure, happy to pick up where they left off. Is it easiest if I just submit it as a new PR (I don't know if there's another option tbh)?

marcdel avatar Dec 28 '17 00:12 marcdel

@tuvistavie are there other methods that could make use of :temp_dir? If not, it might be clearer to use :screenshot_dir or something to make it more explicit that this value will change where screenshots are stored. Thanks!

marcdel avatar Dec 28 '17 00:12 marcdel