generateScreenshotHtml.sh 786 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. file=/tmp/screenshotOverview-$(date +%F-%H-%M-%S)
  3. echo "<html><table>" >> $file
  4. echo "<tr>
  5. <td>Test name</td>
  6. <td>Blue on light</td>
  7. <td>Blue on dark</td>
  8. <td>White on light</td>
  9. <td>White on dark</td>
  10. </tr>" >> $file
  11. for screenshot in $(find screenshots/gplay -type f | grep -v "_dark_" | grep -v "_light_" | sort); do
  12. echo "<tr>" >> $file
  13. #name
  14. echo "<td>$screenshot (base)</td>" >> $file
  15. #base
  16. echo "<td><img width='200px' src="$(pwd)/$screenshot"></td>" >> $file
  17. baseName=$(echo $screenshot | sed s'/\.png//')
  18. for type in dark_blue light_white dark_white; do
  19. echo "<td><img width='200px' src=\"$(pwd)/$baseName""_""$type.png\"></td>" >> $file
  20. done
  21. echo "</tr>" >> $file
  22. done
  23. echo "</table></html>" >> $file
  24. echo $file