From c7b65da9bb5695cbb6054bd7cba86b47fcf704ef Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Wed, 26 Jun 2019 14:24:02 +0200 Subject: [PATCH] readme + makefile --- .gitignore | 1 + Makefile | 30 ++++++++++++++++ README.html | 82 ++++++++++++++++++++++++++++++++++++++++++ README.md | 50 +++++++++++++++++++++++++- layout_with_montage.sh | 13 +++++++ styles.css | 0 6 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.html create mode 100644 layout_with_montage.sh create mode 100644 styles.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47241b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +images/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e42a673 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +# find all .md files in the directory +# mdsrc=$(shell ls *.md) +mdsrc=$(shell find . -iname "*.md") +# mdsrc=$(wildcard *.md */*.md **/*.md ) +# map *.mp => *.html for mdsrc +html_from_md=$(mdsrc:%.md=%.html) + +all: $(html_from_md) + +fixnames: + rename "s/ /_/g" * + +today: + touch `date +"%Y-%m-%d.md"` + +now_folder: + mkdir `date +"%Y-%m-%d-%H%M%S"` + +# Implicit rule to know how to make .html from .md +%.html: %.md + pandoc --from markdown \ + --to html \ + --standalone \ + --smart \ + --section-divs \ + --css styles.css \ + $< -o $@ +# special rule for debugging variables +print-%: + @echo '$*=$($*)' diff --git a/README.html b/README.html new file mode 100644 index 0000000..4d4a3bb --- /dev/null +++ b/README.html @@ -0,0 +1,82 @@ + + + + + + + + + + + + +
+

95 layouts

+

Because there’s always more than one way to do it.

+ +
+

Sizing down a bunch of images

+

Warning: MOGRIFY MODIES THE IMAGES – ERASING THE ORIGINAL – make a copy of the images before you do this!!!

+
mogrify -resize 1024x *.JPG 
+
+
+

Fixing the orientation of images

+
mogrify -auto-orient *.JPG
+
+
+

Using Montage

+
montage -label "%f" *.JPG \
+    -shadow \
+    -geometry 1000x1000+100+100 \
+    montage.caption.jpg
+
+
+

Using pdftk to put things together

+
+
+ + diff --git a/README.md b/README.md index ea258b1..bf26234 100644 --- a/README.md +++ b/README.md @@ -1 +1,49 @@ -Exploring different ways to do page layout +95 layouts +================ + +Because there's always more than one way to do it. + + + + + + +Publishing an "image gallery" +------------------------------------ + +Imagemagick's suite of tools includes *montage* which is quite flexible and useful for making a quick overview page of image. + +* mogrify +* identify +* convert + + +Sizing down a bunch of images +-------------------------------- + +Warning: MOGRIFY MODIES THE IMAGES -- ERASING THE ORIGINAL -- make a copy of the images before you do this!!! + +```bash +mogrify -resize 1024x *.JPG +``` + +Fixing the orientation of images +------------------------------------ +```bash +mogrify -auto-orient *.JPG +``` + +Using Montage +--------------------- + +```bash +montage -label "%f" *.JPG \ + -shadow \ + -geometry 1000x1000+100+100 \ + montage.caption.jpg +``` + + +Using pdftk to put things together +-------------------------------------- + diff --git a/layout_with_montage.sh b/layout_with_montage.sh new file mode 100644 index 0000000..f815732 --- /dev/null +++ b/layout_with_montage.sh @@ -0,0 +1,13 @@ +# "Fix" the images rotation +# mogrify -auto-orient *.JPG + + +# montage *.JPG -geometry 1000x1000 montage.1000x1000.jpg + +montage -label "%f" *.JPG \ + -shadow \ + -geometry 1000x1000+100+100 \ + montage.caption.jpg + +# montage -label '%f' *.JPG \ +# -tile x1 -shadow -geometry '60x60+2+2>' label_shadow.jpg diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..e69de29