rharder / imagesnap

Capture Images from the Command Line
https://github.com/rharder/imagesnap
458 stars 50 forks source link

feat: accepts path for timelapse mode #37

Closed zpg6 closed 1 year ago

zpg6 commented 2 years ago

Before

If you are using a combination of the single-photo and timelapse options, you may be looking to put the photos in folders.

You can already do this in single-photo mode (when you don't supply -t x.xx) by supplying path and filename:

imagesnap "photos/snapshot.jpg"

After

This allows you to supply the path in timelapse mode as well (when you do supply -t x.xx).

(Assuming dir "photos" already exists):

imagesnap -t 2.5 "photos/"

Which outputs:

Capturing image from device "FaceTime HD Camera (Built-in)"...
photos/snapshot-00000.jpg
photos/snapshot-00001.jpg
photos/snapshot-00002.jpg
photos/snapshot-00003.jpg
photos/snapshot-00004.jpg

Running again without deleting those photos continues the count as expected:

Capturing image from device "FaceTime HD Camera (Built-in)"...
photos/snapshot-00005.jpg
photos/snapshot-00006.jpg
photos/snapshot-00007.jpg
rharder commented 1 year ago

This is a great idea! Another pull request has made this pull request not be "automatic," but let me see about adding the intent to the new version. Great idea. Thanks.

rharder commented 1 year ago

Added this feature! It's in v0.2.16.