From 9038131900c9ca4239a5a31e17d3fe6116c33416 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Sun, 25 Aug 2019 17:50:41 +0800 Subject: [PATCH] Update folder structure, build scripts --- .gitignore | 4 ++ README.md | 4 +- clean | 4 ++ crop | 37 ++++++++++++++++++ {dark-matched-chrome => dark-chrome}/icon.png | Bin .../manifest.json | 0 .../icon.png | Bin .../manifest.json | 0 .../icon.png | Bin .../manifest.json | 0 .../icon.png | Bin .../manifest.json | 0 zip | 8 +--- 13 files changed, 49 insertions(+), 8 deletions(-) create mode 100755 clean create mode 100755 crop rename {dark-matched-chrome => dark-chrome}/icon.png (100%) rename {dark-matched-chrome => dark-chrome}/manifest.json (100%) rename {dark-matched-firefox => dark-firefox}/icon.png (100%) rename {dark-matched-firefox => dark-firefox}/manifest.json (100%) rename {light-matched-chrome => light-chrome}/icon.png (100%) rename {light-matched-chrome => light-chrome}/manifest.json (100%) rename {light-matched-firefox => light-firefox}/icon.png (100%) rename {light-matched-firefox => light-firefox}/manifest.json (100%) diff --git a/.gitignore b/.gitignore index 8e25568..d737941 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +.DS_Store + *.zip *.pak + +out/ diff --git a/README.md b/README.md index d04f48d..17e57cb 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ Follow system colorscheme. # Dark -Dark Screenshot +Dark Screenshot [Firefox](https://addons.mozilla.org/en-US/firefox/addon/dark-matched/) [Chrome](https://chrome.google.com/webstore/detail/dark-matched/aapflpcfdelmkobdakjnieeaoiofcodk) # Light -Light Screenshot +Light Screenshot [Firefox](https://addons.mozilla.org/en-US/firefox/addon/dark-matched/) [Chrome](https://chrome.google.com/webstore/detail/light-matched/bilibfhhkphlgndmckcabgpbanadpnbj) diff --git a/clean b/clean new file mode 100755 index 0000000..8ffa57a --- /dev/null +++ b/clean @@ -0,0 +1,4 @@ +#!/bin/bash + +rm -r out +mkdir out diff --git a/crop b/crop new file mode 100755 index 0000000..b6b09fb --- /dev/null +++ b/crop @@ -0,0 +1,37 @@ +#!/bin/bash + +for f in screenshots/*-*-1.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-1.png/-screenshot-1.png}" + gm convert $f -crop 1280x800+0+0 $outf +done + +for f in screenshots/*-*-2.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-2.png/-screenshot-2.png}" + gm convert $f -crop 1280x800+1280+0 $outf +done + +for f in screenshots/*-*-3.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-3.png/-screenshot-3.png}" + gm convert $f -resize 1280x800 $outf +done + +for f in screenshots/*-*-3.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-3.png/-tile-small.png}" + gm convert $f -crop 440x280+0+0 $outf +done + +for f in screenshots/*-*-3.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-3.png/-tile-large.png}" + gm convert $f -crop 920x680+0+0 $outf +done + +for f in screenshots/*-*-3.png; do + outf="${f//screenshots\//out/}" + outf="${outf//-3.png/-marquee.png}" + gm convert $f -crop 1400x560+0+0 $outf +done diff --git a/dark-matched-chrome/icon.png b/dark-chrome/icon.png similarity index 100% rename from dark-matched-chrome/icon.png rename to dark-chrome/icon.png diff --git a/dark-matched-chrome/manifest.json b/dark-chrome/manifest.json similarity index 100% rename from dark-matched-chrome/manifest.json rename to dark-chrome/manifest.json diff --git a/dark-matched-firefox/icon.png b/dark-firefox/icon.png similarity index 100% rename from dark-matched-firefox/icon.png rename to dark-firefox/icon.png diff --git a/dark-matched-firefox/manifest.json b/dark-firefox/manifest.json similarity index 100% rename from dark-matched-firefox/manifest.json rename to dark-firefox/manifest.json diff --git a/light-matched-chrome/icon.png b/light-chrome/icon.png similarity index 100% rename from light-matched-chrome/icon.png rename to light-chrome/icon.png diff --git a/light-matched-chrome/manifest.json b/light-chrome/manifest.json similarity index 100% rename from light-matched-chrome/manifest.json rename to light-chrome/manifest.json diff --git a/light-matched-firefox/icon.png b/light-firefox/icon.png similarity index 100% rename from light-matched-firefox/icon.png rename to light-firefox/icon.png diff --git a/light-matched-firefox/manifest.json b/light-firefox/manifest.json similarity index 100% rename from light-matched-firefox/manifest.json rename to light-firefox/manifest.json diff --git a/zip b/zip index 669400a..c09031c 100755 --- a/zip +++ b/zip @@ -1,15 +1,11 @@ #!/bin/bash -echo "Cleaning up..." -echo rm *.zip -rm *.zip - -for f in *; do +for f in *-*; do if ! [ -d "$f" ]; then continue fi cd "$f" echo "Zipping $f..." - zip -r "../$f.zip" manifest.json icon.png + zip -r "../out/$f.zip" manifest.json icon.png cd .. done