Hi!
For a personal project, I have undertaken the idea of learning how to produce a program that grabs a set number of random images from specified servers (and from random directories that may not be locked out for the public.) After it does that, I want it to output the
<img> tags of each picture it found, on a plain white HTML page, as the final output.
It seems simple enough, but I would like feedback on my programming flow chart, since that way I would be able to work on the actual code part later without having to redo it over and over. (Getting it correct in less retries.)
Here is the flow chart I currently have:
- Initialize variables
- start a loop using the number of servers you chose to perform this operation on as the max number of times to execute loop.
- Open connection with remote server.
- Find a random available directory.
- Search for any .gifs, .jpgs, or .pngs to possibly grab.
- Randomly choose one, save that link to somewhere for use at the end of the script.
- Close connection with current remote server.
- Go back to #2 if there are more specified times to do this, else, keep going.
- Exit program safely.
- Output a plain .html file showing the results of what you had it find.
One of the reasons this project became something that is interesting to me is: at a MacHack conference one year, I heard about this program that did essentially the same thing as what I want to do, however it grabbed random images off of an airport network. Anyways, I wanted to be able to write something similar in Perl.
If there is something I am totally missing in that flow chart for what I need this simple program to do, please let me know about it. It's just the flow chart I have come up with, and hasn't been refined/added to yet by anyone other than me. I would appreciate a different perspective on it.
Thanks!
Andy Summers