generateScreenshotHtml.sh 1004 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors
  3. # SPDX-FileCopyrightText: 2020-2018-2024 Tobias Kaminsky <tobias@kaminsky.me>
  4. # SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
  5. file=/tmp/screenshotOverview-$(date +%F-%H-%M-%S)
  6. echo "<html><table>" >> $file
  7. echo "<tr>
  8. <td>Test name</td>
  9. <td>Blue on light</td>
  10. <td>Blue on dark</td>
  11. <td>White on light</td>
  12. <td>White on dark</td>
  13. </tr>" >> $file
  14. for screenshot in $(find screenshots/gplay -type f | grep -v "_dark_" | grep -v "_light_" | sort); do
  15. echo "<tr>" >> $file
  16. #name
  17. echo "<td>$screenshot (base)</td>" >> $file
  18. #base
  19. echo "<td><img width='200px' src="$(pwd)/$screenshot"></td>" >> $file
  20. baseName=$(echo $screenshot | sed s'/\.png//')
  21. for type in dark_blue light_white dark_white; do
  22. echo "<td><img width='200px' src=\"$(pwd)/$baseName""_""$type.png\"></td>" >> $file
  23. done
  24. echo "</tr>" >> $file
  25. done
  26. echo "</table></html>" >> $file
  27. echo $file