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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.