Skip to content

Commit

Permalink
Compress screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
fuksman committed Dec 19, 2023
1 parent 46a7e56 commit 5713569
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/parse-new-experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ jobs:
template-path: .github/ISSUE_TEMPLATE/new_experience.yml
- run: echo '${{ steps.issue-parser.outputs.jsonString }}' > issue.json
- run: |
echo "experience_name=$(echo ${{ steps.issue-parser.outputs.issueparser_title }} | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "experience_name=$(echo '${{ steps.issue-parser.outputs.issueparser_title }}' | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "id=$(uuidgen)" >> "$GITHUB_ENV"
- run: |
jq '. + {"author": "${{ github.event.issue.user.login }}", "name": "${{ env.experience_name }}", "id": "${{ env.id }}"}' issue.json > tmp && mv tmp issue.json
- id: manifest-builder
run: |
node tools/prepare-experience.js
rm issue.json
apt update
apt install -y pngquant
for file in "experiences/${{ env.experience_name }}/screenshots/*.png"; do
pngquant --f "$file" -o "$file"
done
file_size=$(stat -c %s "experiences/${{ env.experience_name }}/${{ env.experience_name }}.zip")
jq --arg file_size $file_size '.fileSize = ($file_size|tonumber)' "experiences/${{ env.experience_name }}/manifest.json" > temp.json && mv temp.json "experiences/${{ env.experience_name }}/manifest.json"
rm -f temp.json
Expand Down
Binary file modified experiences/daily_journal/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/daily_journal/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/data_vault/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/data_vault/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/habit_tracker/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/screenshots/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/movie_database/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/movie_database/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/study_hub/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/study_hub/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/trip_planner/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/trip_planner/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5713569

Please sign in to comment.