You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
1005 B

  1. #!/bin/sh
  2. rm -f index.html && echo > index.html
  3. echo '<html><body bgcolor="#aaddff"><h1>CAPTCHA samples</h1><ul>' >> index.html
  4. find -maxdepth 2 -name '*00*' | while read i; do
  5. echo "$i"
  6. DIRNAME="`echo $i | sed 's,/[^/]*$,,'`"
  7. EXTENSION="`echo $i | sed 's/.*00//'`"
  8. INDEX="$DIRNAME.html"
  9. rm -f "$INDEX" && echo > "$INDEX"
  10. echo '<html><body bgcolor="#aaddff"><table>' >> "$INDEX"
  11. N=1
  12. for x in `seq -w 0 99`; do
  13. echo '<tr>' >> "$INDEX"
  14. echo '<td><h1><tt>#'"$x"'</tt></h1></td>' >> "$INDEX"
  15. echo '<td><img src="'"$DIRNAME/$DIRNAME$x$EXTENSION"'" /></td>' >> "$INDEX"
  16. TEXT="[untranslated]"
  17. if [ -r "$DIRNAME/control.txt" ]; then
  18. TEXT="`sed -ne ${N}p "$DIRNAME/control.txt"`"
  19. N=$(($N + 1))
  20. fi
  21. echo '<td><h1><tt>'"$TEXT"'</tt></h1></td>' >> "$INDEX"
  22. echo '</tr>' >> "$INDEX"
  23. done
  24. echo '</table></body></html>' >> "$INDEX"
  25. echo '<li><a href="'"$INDEX"'">'"$DIRNAME"'</a></li>' >> index.html
  26. done
  27. echo '</ul></body></html>' >> index.html