So, it looks like I'll be joining the rPi Club! I'm purchasing my first computer without an SD card slot and, being an avid photographer, need an efficient way to upload photos to my storage. I could purchase a USB SD card reader but that requires my computer to be on for the entire process. Which, isn't the end of the world if it is on.

I did some searching and found this article that links to a script that copies an entire SD cards contents to an external hard drive, USB hard drive. Which, isn't entirely what I want.

So, I have some basic questions.

  • How hard would it be to modify the script to copy the files to a remote drive on my network?
  • How hard would it be to get the date photos were taken, and mount(?) a specified directory, create a new folder for the date(s) in-which to actually upload the photos to.
    • For example, I took photos on November 11th and 12th. The rPi would connect to directory "/Photos/2016/" and then create folder "2016-11-11" and "2016-11-12" and upload the appropriate photos to each.
    • Photos is root directory on my NAS; I'll need to include username and password credentials to successfully connect to the NAS.


Basically, all I want this to do is upload the photos to a location on my network. Then, all I need to do in my photo editor is re-scynronize the catalog to the directories and the newly imported photos will be there. I won't need to turn on/wake my computer, open Lightroom, ensure the memory card adapter is plugged in, wait for import to finish, etc. This way, I can quickly import photos to the NAS while I put away photo gear and anything else, such as prep a meal, which I do before I access my computer.

That script above won't work because it (1) requires a USB drive to be connected as the destination and (2) copies the SD card as is. I want it (1) to be a networked location so I'll need the WiFi adapter and (2) I want the photos to be copied to directories associated with the date they were taken.

Additionally, I'm totally down to learn how to program all of this rather than modify a program; I can't even figure out if it's open source but I assume it is since the source files are easily presented? But, I'll likely need tons of handholding either way Sad
Alex wrote:
How hard would it be to modify the script to copy the files to a remote drive on my network?
Should be trivial, assuming your NAS supports ssh or rsync. That script already uses rsync so you would only need to give it a remote path.

Quote:
I took photos on November 11th and 12th. The rPi would connect to directory "/Photos/2016/" and then create folder "2016-11-11" and "2016-11-12" and upload the appropriate photos to each.
Easier to shuffle files around locally and just rsync a whole directory tree over. Shouldn't be too hard with a little scripting and exiftool (apparently exiftool can rename things itself too? Huh).

Quote:
I did some searching and found this article that links to a script that copies an entire SD cards contents to an external hard drive, USB hard drive. Which, isn't entirely what I want.
I'm a little bit appalled by how that looks for a device by grepping a listing of /dev. If I were going to do it "right", it would probably be a udisks listener.



I do something not entirely unlike this whole setup with my phone pushing to a directory on my NAS, but I periodically import the contents of that directory into lightroom (which handles all the renaming) and delete its contents after importing. It's a little bit more hands-on than what you outlined, but automates the fiddly bits (connecting device, copying files) without trying to deal with too much (so there's little room for error in the automation and there's nothing crazy to debug when it does go wrong).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement