User:AllyUnion/Did you know pseudocode process


 * Note: '\n' indicates a "newline"

Template talk:Did you know to Recent additions

 * 1) Find the following text:
 * 2) Set a counter for the number of did you know lines to zero
 * 3) Set a counter for the number of did you know blocks to zero
 * 4) In loop (use while), repeat the following until the following text has been found:
 * 5) In an inner loop (use do-while), repeat until the following text has been found: '\n\n'
 * 6) Find "...that" and split until newline
 * 7) If a line has been found, increase counter for the number of did you know lines
 * 8) If '\n\n' has been found, increase counter for the number of did you know blocks
 * 9) If number of did you know lines exceeds 50, take the last did you know blocks and put it on Recent additions

Recent additions to archive page
\n\n" (\n is newline in programming terms) \n\n" has been found, increase the block count
 * 1) Scan for the first "  "
 * 2) While the next "  " has not been found then search for: (outer loop)
 * 3) * Find " \n\n" or " \n\n" or "
 * 1) Repeat the following steps: (inner loop)
 * 2) Look for: "...that" or " [[ Image:" (the latter is case insensitive)
 * 3) Find the next: "...that" or " [[ Image:" (the latter is case insensitive)
 * 4) Save this as a "Did you know" line
 * 5) Increase did you know line count
 * 6) If " \n\n" or " \n\n" or "