LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2008, 04:02 PM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
Picture Saving Software


I'm looking for software that automatically downloads pictures from a server and saves them to a folder.

I have literally thousands of pictures that I need to download, and I'm not about to do it manually.

The URL names go like this:
http://www.site.com/directory/blah[DATE]-[#].png

I need software that checks a date that's given, and downloads all the pictures for that date, saving it in a directory with the date as the name. The number of pictures for each date vary, so it would have to stop by itself when there aren't any more pictures.

Then I need it to go to the next possible date, if that date exists and if not, skip to the next one, et cetera.

Do you guys know any software that does this?

Thanks.
 
Old 10-17-2008, 05:08 PM   #2
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
you could probably just write a shell script for that. im not very experienced in this area, but I know you can do something like this:

Code:
for ((  i = 0 ;  i <= 5;  i++  )); do wget `date`-$i; done
you will have to tell date what date format the files are named.
like if your files are blah101508-10.png, you will have to use
date +%m%d%y

this particular loop will go 5 times, just set it to a higher number

run date --help to see a list of what it can output.
you do need the (+) at the beginning though.
other characters are put into the date.

since date +%m%d%y gives you 101708, date +%m/%d/%y will give you 10/17/08



good luck,
rabbit2345
 
Old 10-17-2008, 08:00 PM   #3
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for that. I'm really bad with shell scripting.

However... I need to be able to download every image for a certain date, before moving onto the next date... :S

And how would I actually put the URL around the date in that code? I'm not familiar with the syntaxing for shell scripting.

Last edited by atheist; 10-17-2008 at 08:02 PM.
 
Old 02-16-2009, 04:01 PM   #4
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
Well, since this:
Code:
for ((  i = 0 ;  i <= 5;  i++  )); do wget `date`-$i; done
Only downloads for today's pictures, you will need to probably manually enter dates, unless the dates are consecutive, like 10-17-08 then 10-18-08. I'm not very experienced either. The URL would go around like:

Code:
for ((  i = 0 ;  i <= 5;  i++  )); do wget (url)`date`-$i; done
so in the end, it will look like this:
Code:
for ((  i = 0 ;  i <= 5;  i++  )); do wget http://picturesite.com/mypage/pics/`date`-$i.png; done
Don't forget to add extensions, such as .png or .jpg as in the 3rd example.

Sorry for the extremely long delay, my e-mail's been really weird.
 
Old 02-17-2009, 03:49 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Can you please specify the date format exactly as it would appear in your case ? It would help a lot.

Also, I don't think the date program is needed here, even tho it could be used.
 
Old 02-17-2009, 05:22 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Try curl
 
Old 02-19-2009, 02:33 PM   #7
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for the input guys. Curl works perfectly. Exactly what I was looking for. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Software for Webcam Video/Picture Recording?? tubatodd Ubuntu 1 12-03-2006 11:16 AM
Picture managing Software cuschu Linux - Software 4 06-10-2006 08:58 AM
Picture software exvor Linux - Software 2 11-19-2005 09:35 PM
f-spot picture software joshcav Linux - Software 1 06-08-2005 06:07 AM
power saving software for notebooks kurrupt Linux - Laptop and Netbook 4 01-17-2005 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration