pageauc / pi-timolo

Raspberry PI-TIMOLO ( PI-TImelapse, MOtion, LOwLight ) uses RPI picamera and OpenCV for Remote Headless Security Monitoring using Motion Tracking, Rclone Auto Sync files with remote storage services. Auto Twilight Transitions and Low Light Camera Settings. Panoramic images using PanTiltHat and More. This project is featured on GitHub Awesome software.
MIT License
549 stars 101 forks source link

Added create date stampled sub folders #31

Closed MartinStolle closed 7 years ago

MartinStolle commented 7 years ago

See #30

pageauc commented 7 years ago

I have looked at the code. This branch currently has conflicts due to previous releases. I have decide to implement sub-folders and will use some of your code but with a different implementation. I am thinking of using four variables that control creation of prefix-YYYY-MM-DD-HH sub-folders. Eg MO-2017-04-18-20

motionSubDirHrsMax = 24 # 0=off or specify Max Hrs to create new sub-folder if HrsMax exceeded
motionSubDirFilesMax = 1000 # 0=off or specify Max Files to create new sub-folder if FilesMax exceeded

timelapseSubDirHrsMax = 0 timelapseSubDirFilesMax = 10000

You can specify one or both eg if I want a sub-folder created every 7 days or if max number of files exceeds 10000

motionSubDirHrsMax = 168 # create new sub-folder if last folder past 7 days old motionSubDirFilesMax = 3000 # Limit total files in a sub-folder

Not sure if these settings are best set as AND, OR I am leaning to OR but this could create empty or few files in a sub-folder AND would force both conditions to be true.
You would still be able to specify only one of the variables by setting the other one = 0 so that it is ignored I would like the ability of restricting the chance of creating sub-folders with no or few files

Your feedback would be greatly appreciated I have not started these changes yet but hope to shortly Let me know your thoughts Claude ....

pageauc commented 7 years ago

Also forgot to mention that I was thinking of ability to set a current folder to hold a specified number of most recent files. motionRecent = 10 # 0=off Saves specified most recent files in a sub-folder called recent or current (could be var)

This would make it easier for those that want to upload/view only the most recent files for a webcam project or google drive Etc.

Also would appreciate feedback on this idea as well. Thanks Claude ....

pageauc commented 7 years ago

version 6.0 release includes sub folder option. Thanks for your code example. The new release also includes recent files option and disk space management option