Skip to content

Commit 5ec57da

Browse files
committed
release: v3.0
- redesigned workflow with JXA - new navigation - new icons - output actions - notification module
1 parent d7f637c commit 5ec57da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1284
-2397
lines changed

β€Ž.gitignoreβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2-
**/.DS_Store
2+
**/.DS_Store
3+
src/prefs.plist

β€ŽREADME.mdβ€Ž

Lines changed: 36 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,84 @@
1-
<img src="public/icon_dark_mode.png#gh-dark-mode-only" alt="logo-dark" height="55"/>
2-
<img src="public/icon_light_mode.png#gh-light-mode-only" alt="logo-light" height="55"/>
1+
<img src="public/icon_dark_mode.webp#gh-dark-mode-only" alt="logo-dark" height="55"/>
2+
<img src="public/icon_light_mode.webp#gh-light-mode-only" alt="logo-light" height="55"/>
33

4-
[![made with hearth by Benjamin Oddou](https://img.shields.io/badge/made%20with%20%E2%99%A5%20by-benjamin%20oddou-62D895.svg?style=flat)](https://github.com/BenjaminOddou)
4+
[![made with heart by Benjamin Oddou](https://img.shields.io/badge/made%20with%20%E2%99%A5%20by-benjamin%20oddou-62D895.svg?style=flat)](https://github.com/BenjaminOddou)
55
[![saythanks](https://img.shields.io/badge/say-thanks-469C2C.svg?style=flat)](https://saythanks.io/to/BenjaminOddou)
66

7-
Welcome to the Alfred Smart WebP repository: **An Alfred Workflowk** ✨
7+
Welcome to the Alfred Smart WebP repository: **An Alfred Workflow** ✨
88

9-
## βœ… Prerequisite
9+
## βœ… Prerequisites
1010

11-
* 🍎 MacOS
12-
* 🎩 Alfred 5. Note that the [Alfred Powerpack](https://www.alfredapp.com/powerpack/) is required to use workflows.
11+
* MacOS
12+
* Alfred 5. Note that the [Alfred Powerpack](https://www.alfredapp.com/powerpack/) is required to use workflows.
1313

14-
## ℹ️ information
14+
## 🏎️ cwebp
1515

16-
* 🏎️ Under the hood, the compression is made with [cwebp](https://developers.google.com/speed/webp/docs/cwebp) (made by Google), a tool that allows to compress images into the WebP format, which is generally lighter πŸͺΆ, and broadly used to share images on the web.
16+
Under the hood, the compression is made with [cwebp](https://developers.google.com/speed/webp/docs/cwebp) (made by Google), a tool that allows to compress images into the WebP format, which is generally lighter, and broadly used to share images on the web.
1717

1818
## ⬇️ Installation
1919

2020
1. [Download the workflow](https://github.com/BenjaminOddou/alfred-smart-webp-compression/releases/latest)
2121
2. Double click the `.alfredworkflow` file to install
2222

23-
![workflow](src/images/workflow.webp)
24-
25-
## πŸ§™β€β™‚οΈ Invoke the Workflow
26-
27-
You can invoke the workflow by writing `webp` onto the Alfred search box. You can change this value by changing the `πŸ•ΉοΈ Trigger` variable in workflow configuration panel [optionnal].
28-
2923
## 🧰 Setup the workflow
3024

31-
### πŸ‘¨β€πŸ’» Install dependencies
32-
33-
#### Open the Terminal of you Mac and run the following commands
34-
35-
1. β˜‘οΈ Install Homebrew.
25+
#### Open the Terminal of you Mac and run the following command:
3626

37-
```shell
38-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
39-
```
40-
41-
2. β˜‘οΈ Install cwebp and jq.
27+
Install cwebp (using [Homebrew](https://brew.sh)):
4228

4329
```shell
44-
brew install webp | brew install jq
30+
brew install webp
4531
```
46-
47-
#### Check your installation under the Setup toolbox of the workflow
48-
49-
![toolbox](src/images/toolbox_dark_mode.webp)
50-
51-
If something is not installed you'll have the following message :
5232

53-
![jq_not_installed](src/images/jq_not_installed.webp)
33+
## πŸ§™β€β™‚οΈ Invoke the workflow
5434

55-
#### CWebP version can be seen in the home menu
56-
57-
![cwebp_home_dark_mode](src/images/cwebp_home_dark_mode.webp)
58-
59-
✨ The workflow is also checking the cwebp version each time you run it.
60-
61-
![cwebp_update](src/images/cwebp_update.webp)
62-
63-
### πŸ“‚ Data (Presets and Logs) folder
64-
65-
❗ This variable cannot be empty. You can change it at your convenience in the workflow configuration panel.
66-
67-
It contains the presets created within the workflow + output logs of the cwebp compression.
68-
69-
> πŸ’‘ Note that if you change the `Data folder` location after creating presets and logs, you should probably move the files created along in the new folder.
35+
You can invoke the workflow by writing `webp` into the Alfred search box. You can change this value by changing the `πŸ•ΉοΈ Trigger` variable in workflow configuration panel.
7036

7137
## πŸ€– Usage of the workflow
7238

73-
### βš’οΈ Handling presets
74-
75-
Go under the home menu and open the `presets section`.
76-
77-
![presets_home_dark_mode](src/images/presets_home_dark_mode.webp)
39+
### Handling presets
7840

7941
#### Create a preset
8042

81-
Go under the `presets section` and click on "Add a preset".
43+
Go under the `presets section` and click on `Add a new preset`.
8244

83-
![add_preset_1](src/images/add_preset_1.webp)
84-
85-
Add your preset by putting `preset_name,preset_detail`. Note that the comma (`,`) is separating the name of the preset from its content. The content correspond to the cwebp [options] which can be found under the documentation section.
86-
87-
![add_preset_2](src/images/add_preset_2.webp)
88-
89-
The created preset can be seen under the preset section. New presets are put on top of older ones.
90-
91-
![add_preset_3](src/images/add_preset_3.webp)
45+
Add your preset by putting a `value`, press ⏎ and input a `title` and a `subtitle` separated by a `/`.
9246

9347
#### Modify a preset
9448

95-
Under the `presets section`, click on "Modify a preset".
96-
97-
![modify_preset_1](src/images/modify_preset_1.webp)
49+
Go under the `presets section` and click on the preset you want to modify.
9850

99-
Select the preset you want to modify.
100-
101-
![modify_preset_2](src/images/modify_preset_2.webp)
102-
103-
Change its name/value and press enter ⏎. Don't remove the separator (`,`).
104-
105-
![modify_preset_3](src/images/modify_preset_3.webp)
51+
Select wether you want to modify the `title/subtitle` or the `value` and press ⏎. Input the new title/subtitle or value and press ⏎.
10652

10753
#### Remove a preset
10854

109-
Under the `presets section`, click on "Remove a preset".
110-
111-
![remove_preset_1](src/images/remove_preset_1.webp)
112-
113-
Select the preset you want to remove.
55+
Under the `presets section`, click on `Remove a preset`.
11456

115-
![remove_preset_2](src/images/remove_preset_2.webp)
57+
Select the preset you want to remove and press ⏎.
11658

117-
### πŸ“– Check the documentation
118-
119-
Go under the `documentation section` from the home menu :
120-
121-
![docs_home_dark_mode](src/images/docs_home_dark_mode.webp)
122-
123-
Go to the online documentation or click on one of the options to copy it !
124-
125-
![docs_detail](src/images/docs_detail.webp)
126-
127-
### πŸš€ Start the compression
59+
### Start the compression
12860

12961
#### Using Workflow File Filter
13062

131-
Under the home menu, click on "Start the compression".
132-
133-
![start_compress](src/images/start_compress.webp)
63+
Under the home menu, click on `Start the compression`.
13464

13565
Select the folder with images or directly the image you want to compress and press enter ⏎.
13666

137-
> πŸ’‘ Note that when selecting a folder, images within subdirectories aren't selected if `πŸ” Depth of the search` is `Level 0️⃣`. If you want images in subdirectories, increase this value. Only images with `png|jpg|jpeg|tif|tiff|webp` file extensions are selected. In addition, they aren't case sensitive, meaning that the image extension can be `PNG|JpG|tifF...`
67+
> Note that when selecting a folder, images within subdirectories aren't selected if `πŸ” Depth of the search` is 1. If you want images in subdirectories, increase this value. Only images with `png|jpg|jpeg|tif|tiff|webp` file extensions are selected. In addition, they aren't case sensitive, meaning that the image extension can be `PNG|JpG|tifF...`
13868
139-
Here is an example where the user selected a folder and put `Level 1️⃣` in `πŸ” Depth of the search` :
69+
Here is an example where the user selected a folder and put `Level 2` in `πŸ” Depth of the search` :
14070
```shell
14171
.
142-
β”œβ”€β”€ selected folder # Level 0️⃣
143-
β”‚ β”œβ”€β”€ subdirectory # Level 1️⃣
72+
β”œβ”€β”€ selected folder # Level 1
73+
β”‚ β”œβ”€β”€ subdirectory # Level 2
14474
β”‚ β”‚ β”œβ”€β”€ image.PnG # selected βœ…
145-
β”‚ β”‚ β”œβ”€β”€ a nested folder # Level 2️⃣
75+
β”‚ β”‚ β”œβ”€β”€ a nested folder # Level 3
14676
β”‚ β”‚ β”‚ β”œβ”€β”€ one image.webp # not selected ❌
14777
β”‚ β”‚ β”‚ └── a second image.tiff # not selected ❌
14878
β”‚ β”‚ └── file.doc # not selected ❌
14979
β”‚ └── first-image.jpeg # selected βœ…
15080
```
15181

152-
![direct_compress](src/images/direct_compress.webp)
153-
15482
Alternatively, use the `Alfred Buffer` to select folder(s) and image(s) at the same time !! Basic commands are :
15583

15684
* βŒ₯↑ to add a file to the buffer from Alfred's results.
@@ -161,25 +89,21 @@ Alternatively, use the `Alfred Buffer` to select folder(s) and image(s) at the s
16189

16290
To know more on how to use `Alfred Buffer`, follow this [link](https://www.alfredapp.com/help/features/file-search/#file-buffer).
16391

164-
> πŸ’‘ Note that `Alfred Buffer` is preferred compare to the `{query}`, meaning that if you select a folder/image (by clicking on it or by pressing enter ⏎) that is not included in the buffer, **it will not be compressed**.
165-
166-
![alfred_buffer](src/images/alfred_buffer.webp)
167-
168-
Choose the cwebp options by selecting a preset or input it manually by pressing "Manual options".
92+
> Note that `Alfred Buffer` is preferred compare to the `{query}`, meaning that if you select a folder/image (by clicking on it or by pressing enter ⏎) that is not included in the buffer, **it will not be compressed**.
16993
170-
![choice_options](src/images/choice_options.webp)
94+
![alfred_buffer](public/alfred_buffer.webp)
17195

172-
Check the logs of the compression. To know more on how to read logs, see the `Logs output` section below.
96+
Choose the cwebp options by selecting a preset or input it manually by pressing `Manual options`.
17397

17498
#### Using Alfred Universal Actions
17599

176100
Select the folder(s) / image(s) you want to compress within alfred using `Quick Search` and run `Universal Actions` with β†’ or βŒ₯β†’ if you used the `Alfred buffer`. Select "Compress images to WebP".
177101

178-
![universal_action](src/images/universal_action.webp)
102+
![universal_action](public/universal_action.webp)
179103

180-
> πŸ’‘ Note that the workflow is type sensitive, meaning that if you select a file that is not part of the following types, the action "Compress images to WebP" will not be available
104+
> Note that the workflow is type sensitive, meaning that if you select a file that is not part of the following types, the action "Compress images to WebP" will not be available
181105
182-
![types](src/images/types.webp)
106+
![types](public/types.webp)
183107

184108
If you want to know more on how to use Alfred Universal Actions, follow this [link](https://www.alfredapp.com/help/features/universal-actions/).
185109

@@ -195,9 +119,9 @@ Check the logs of your compression under the `Data folder`. The log file contain
195119
* The selected level of variable `πŸ” Depth of the search`
196120
2. In the green box there is the cwebp output.
197121

198-
> πŸ’‘ Note that each compression is separated by a line.
122+
> Note that each compression is separated by a line.
199123
200-
![log_detail](src/images/log_detail.webp)
124+
![log_detail](public/log_detail.webp)
201125

202126
## βš–οΈ License
203127

-935 KB
Binary file not shown.
-8.88 KB
Binary file not shown.
File renamed without changes.

β€Žpublic/icon_dark_mode.pngβ€Ž

-28.8 KB
Binary file not shown.

β€Žpublic/icon_dark_mode.webpβ€Ž

8.83 KB
Loading

β€Žpublic/icon_light_mode.pngβ€Ž

-29.5 KB
Binary file not shown.

β€Žpublic/icon_light_mode.webpβ€Ž

9.19 KB
Loading

β€Žpublic/log_detail.webpβ€Ž

74 KB
Loading

0 commit comments

Comments
Β (0)