File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 3
3
* [ Fork this repository] ( https://help.github.com/articles/fork-a-repo/ )
4
4
* [ Deploy the site locally] ( #deployment-of-the-site-locally )
5
5
* Add your changes
6
+ * [ Generate image preview] ( #image-preview-generator )
6
7
* [ Create Pull Request] ( https://help.github.com/articles/creating-a-pull-request/ )
7
8
8
9
## Deployment of the site locally
@@ -44,3 +45,22 @@ or execute the below script from the project root directory:
44
45
45
46
Your copy of the site will then be viewable at: [ http://localhost:4000 ] ( http://localhost:4000 )
46
47
(or wherever Jekyll tells you).
48
+
49
+ ## Image preview generator
50
+
51
+ For new * .png images preview is required along with original images.
52
+
53
+ To create a previews use the script
54
+ ```` bash
55
+ # run once
56
+ # install mogrify utility to perform resize
57
+ sudo apt install graphicsmagick-imagemagick-compat
58
+ ````
59
+ Usage:
60
+ ``` bash
61
+ ./generate-previews.sh path file_mask* .png
62
+ ```
63
+ Example:
64
+ ``` bash
65
+ ./generate-previews.sh images/solution-templates * .png
66
+ ```
Original file line number Diff line number Diff line change @@ -7,7 +7,17 @@ YELLOW='\033[1;33m'
7
7
BROWN=' \033[0;33m'
8
8
NC=' \033[0m'
9
9
[ $# -eq 0 ] && { echo " Usage: $0 path_to_folder filter" ; exit 1; }
10
-
10
+ [ -z " $2 " ] && { echo " Filter not provided and was set to default *.png" ; filter=" *.png" ; }
11
+
12
+ # Check if mogrify installed
13
+ if ! command -v mogrify & > /dev/null
14
+ then
15
+ echo " 'mogrify' not found"
16
+ echo " To install it use the command:"
17
+ echo " sudo apt install graphicsmagick-imagemagick-compat"
18
+ exit 1
19
+ fi
20
+
11
21
if [ -d " $dir " -a ! -h " $dir " ]
12
22
then
13
23
echo -e " ${YELLOW} $dir ${GREEN} found. Processing...${NC} "
You can’t perform that action at this time.
0 commit comments