MicrostockGroup Sponsors


Author Topic: 10 images a day  (Read 2560 times)

0 Members and 1 Guest are viewing this topic.

« on: June 03, 2009, 12:43 »
0
Finally I decide to streamline my upload workflow. I have been using sitecopy for months but I was always manually picking files for upload before running it. I decided that it takes too much time. Script modifications allow me to run in from task scheduler at 1AM.

1. Pick 10 random files from my ready images (no repetitions from series should happen)
2. Upload with sitecopy to all the sites in the list
3. Move uploaded images to backup location (I am thinking about putting backup on Amazon S3)

In the morning it does not take long to submit 10 images on every site.


« Reply #1 on: June 03, 2009, 13:33 »
0
How do you pick the 10 random files?

« Reply #2 on: June 03, 2009, 13:42 »
0
I will publish my bash script on my blog when I feel that it is working well. In words it takes count of files in directory and generates random number which is index of file in the list.

Code: [Select]
FILES=($(ls))
COUNT=${#FILES[@]}
for i in {1..10}
do
INDEX=`expr $RANDOM % $COUNT`
RANDOMFILE=${FILES[$INDEX]}
echo "$i $RANDOMFILE"
done

Old Hippy

    This user is banned.
« Reply #3 on: June 03, 2009, 16:50 »
0
you can also do it in PHP.

« Reply #4 on: June 03, 2009, 16:59 »
0
Most of programming languages got some sort of random number generation built in

Old Hippy

    This user is banned.
« Reply #5 on: June 03, 2009, 17:40 »
0
Most of programming languages got some sort of random number generation built in

no no i mean the whole script.

« Reply #6 on: June 03, 2009, 17:51 »
0
Why would I use web scripting language for uploading? Images are my my local hard drive and I want to pick some of them and upload to multiple ftp sites. All tools are available on desktop: scripting language, ftp clients. If I want to use cannon to kill a fly I would write a program :-) Some hard core programmers would even write ftp client :-)

Old Hippy

    This user is banned.
« Reply #7 on: June 03, 2009, 18:13 »
0
Why would I use web scripting language for uploading? Images are my my local hard drive and I want to pick some of them and upload to multiple ftp sites. All tools are available on desktop: scripting language, ftp clients. If I want to use cannon to kill a fly I would write a program :-) Some hard core programmers would even write ftp client :-)

believe me with PHP it's a matter of few lines of code
to manage ftp uploads, file renaming, deletion, etc

and you can compile the PHP into an .exe as well if you
really want it desktop-run.

« Reply #8 on: June 03, 2009, 18:25 »
0
I must admit I did not know that.  I guess I can just do /usr/bin/php script.php from command line ;-)

« Reply #9 on: June 10, 2009, 12:56 »
0
It has been working so far. I can finish submission on all sites during my morning coffee time :-) It's pretty random so I am always surprised when I see what photos were upload last night.


 

Related Topics

  Subject / Started by Replies Last post
19 Replies
7129 Views
Last post April 07, 2008, 15:53
by cfarmer
3d images

Started by CofkoCof « 1 2  All » Illustration - General

28 Replies
14091 Views
Last post August 25, 2008, 06:40
by araminta
2 Replies
2526 Views
Last post November 24, 2008, 06:30
by Sean Locke Photography
2 Replies
5254 Views
Last post November 28, 2008, 12:18
by Peter
5 Replies
8276 Views
Last post March 24, 2009, 14:24
by zymmetricaldotcom

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors