This repository was archived by the owner on Nov 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
59 lines (40 loc) · 1.66 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# SPDX-FileCopyrightText: 2022-2023 Temple University <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
###: https://just.systems/man/en/
###: Workspace Tasks
!include .just/common.justfile
!include .just/reuse.justfile
###: DEVELOPMENT ===================================================================================
# [dev]: Install all workspace dependencies
install:
yarn install
monophon +ARGS:
for dir in `fd composer.json -X echo {//}`; do \
printf "\n=== %s ===\n\n" $dir; \
composer --working-dir=$dir {{ ARGS }}; \
done
composer-all-update: (monophon 'update')
# [dev]: Run command in app scope
focus app +ARGS:
cd {{ join( "apps", app ) }} && {{ ARGS }}
###: LINTING/FORMATTING ============================================================================
# [fmt]: Format files with treefmt
fmt *FILES=prj-root:
treefmt --no-cache {{FILES}}
###: MEDIA =========================================================================================
##: References:
# - <https://ffmpeg.org/ffmpeg-utils.html#Time-duration>
optim-jpeg +FILES:
jpegoptim --strip-all {{ FILES }}
optim-png +FILES:
oxipng --opt=3 --strip=safe {{ FILES }}
optim-svg +FILES:
svgo {{ FILES }}
# [media]: Capture a frame from a video file at the given `mm:ss` timestamp
vcap-thumb input time='00:00' ext='jpeg':
ffmpeg -ss '{{time}}' -i {{ absolute_path(input) }} -frames 1 -f image2 \
'{{ without_extension(input) }}-thumb.{{ext}}'
# [media]: Capture the last frame from a video file
vcap-thumb-last input ext='jpeg':
ffmpeg -sseof -1 -i {{ absolute_path(input) }} -update 1 -q:v 1 -f image2 \
'{{ without_extension(input) }}-last-thumb.{{ext}}'