We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The limited number of exposures was not working, and I added the ability to create a date based folder in the chosen directory.
Below replaces lines 94 - 106
snapcounter = 1 i = 0 while True: rightNow = datetime.datetime.now() newpath = r'/mnt/usb/pictures/%04d%02d%02d' % (rightNow.year, rightNow.month, rightNow.day) if not os.path.exists(newpath): os.makedirs(newpath) fullfilename = "/%04d%02d%02d/%04d%02d%02d-%02d%02d%02d.jpg" % (rightNow.year, rightNow.month, rightNow.day, rightNow.year, rightNow.month, rightNow.day, rightNow.hour, rightNow.minute, rightNow.second) fullfilename = os.path.join(args.p, fullfilename) cam.capture(fullfilename) cam.stop_preview() if args.n == 0: logging.info("Taking snapshot ({} mode)".format(mode)) else: logging.info("Taking snapshot ({} of {}, {} mode)".format( i + 1, args.n, mode)) i = i + 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The limited number of exposures was not working, and I added the ability to create a date based folder in the chosen directory.
Below replaces lines 94 - 106
snapcounter = 1
i = 0
while True:
rightNow = datetime.datetime.now()
newpath = r'/mnt/usb/pictures/%04d%02d%02d' % (rightNow.year, rightNow.month, rightNow.day)
if not os.path.exists(newpath):
os.makedirs(newpath)
fullfilename = "/%04d%02d%02d/%04d%02d%02d-%02d%02d%02d.jpg" % (rightNow.year, rightNow.month, rightNow.day, rightNow.year, rightNow.month, rightNow.day, rightNow.hour, rightNow.minute, rightNow.second)
fullfilename = os.path.join(args.p, fullfilename)
cam.capture(fullfilename)
cam.stop_preview()
if args.n == 0:
logging.info("Taking snapshot ({} mode)".format(mode))
else:
logging.info("Taking snapshot ({} of {}, {} mode)".format(
i + 1, args.n, mode))
i = i + 1
The text was updated successfully, but these errors were encountered: