TimJuni / raspistillWeb

Little python web interface for raspistill to take photos with the RaspberryPi
GNU General Public License v3.0
20 stars 11 forks source link

Ability to Save Pictures to Mounted USB #13

Closed therealcode closed 7 years ago

therealcode commented 7 years ago

Hi Time,

I love what you've put together and was curious to contributing a new feature (or if it doesn't work as I planned) we can consider this a feature request ;).

Is there a way to have all the pictures saved to a USB drive? The purpose is to leverage your code to take a picture every minute over 24 hours and save to USB.

There's two ways I image this can be done: 1. sudo mount /dev/sda1 ~/Development/env/raspistillWeb/raspistillweb/pictures/ a. Currently testing but I assume I will still have to manually write a script to delete the local files from the SD card... 2. Create a script to automatically archive /raspistillweb/pictures/ by Date/Time and have them moved to USB.

Not sure what the best approach is. Or if you know of a better one I would appreciate it. If you can point me in the right direction (newish to GitHub and Pi) I'd be more than happy to write it out and push to your Git.

Let me know please :+1:

Thanks,

TheRealCode

TimJuni commented 7 years ago

Hey,

i think the easiest way is to change the path where the data is stored in the raspistillweb/views.py file. You can just change the path of the constants RASPISTILL_DIRECTORY, THUMBNAIL_DIRECTORY, and TIMELAPSE_DIRECTORY in line 43-45 to whatever path you like. :)

With python, no recompilation is necessary. Just change the path, restart your application and see if it works :)

The user that runs raspistillweb must be able to read+write to the new path.

Cheers, Tim

therealcode commented 7 years ago

Thanks for the prompt response Tim! Works great!

TimJuni commented 7 years ago

no problemo :)

have fun!