Skip to content

Commit

Permalink
ADD: WATERMARK.md name.png openwith.png openwith2.png script_output.p…
Browse files Browse the repository at this point in the history
…ng terminal.png texteditor.png, MOD: watermark.sh
  • Loading branch information
pforret committed Apr 14, 2023
1 parent 8f21618 commit c0b07bb
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 1 deletion.
66 changes: 66 additions & 0 deletions WATERMARK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Watermarking photos

You probably got sent here because you tried to execute "`watermark.sh`" on your PC (MacBook) and you still need to install some programs before that can work.

Here's what you need to do:

## install basher & splashmark
Open a terminal window (Apple-Space and type 'terminal')

![](assets/terminal.png)

Now you need to type the following lines (only the ones that don't start with #)

```bash
# first we will install BASHER - package manager for bash scripts
# procedure explained on https://www.basher.it/ or https://github.com/basherpm/basher/blob/master/README.md
curl -s https://raw.githubusercontent.com/basherpm/basher/master/install.sh | bash

# now open a new bash session, where the basher scripts cabn be easily found
bash

# let's test if basher was properly installed
basher
# expected output:
# Usage: basher <command> [<args>]
#
# Some useful basher commands are:
# help Display help for a command
# commands List all available basher commands
# init Configure the shell environment for basher

# let's install splashmark, which is need for the watermark.sh script
basher install pforret/splashmark

# to test if the installation worked, just type splashmark, it will give some usage info
splashmark
# expected output:
# Program : splashmark by [email protected]
# Version : v3.5.0 (Apr 14 21:33:20 2023)
# Purpose : Mark up images (unspash/pixabay/URL) with titles, effects and resize
# (...)
```
Put the `watermark.sh` script in the folder of your exported, but not yet watermarked photos.
Make sure that when you doubleclick the .sh script, it will open with the `terminal` program

![](assets/openwith.png)

If you computer opens .sh files with a text editor (as is the default), then choose `Terminal` via the 'Other...' popup. `Terminal` is located in the 'Utilities' subfolder of Applications.

![](assets/openwith2.png)

## Configure your watermark
Open watermark.sh with a text editor.

![](assets/texteditor.png)

Change the photographer name to what you want.

![](assets/name.png)

## Watermark your photos

Put the `watermark.sh` script in the folder of your exported, but not yet watermarked photos.
Double-click the `watermark.sh` icon. A Terminal window will pop up and start executing the script.

![](assets/script_output.png)
Binary file added assets/name.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 added assets/openwith.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 added assets/openwith2.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 added assets/script_output.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 added assets/terminal.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 added assets/texteditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion watermark.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#!/usr/bin/env bash

folder=$(dirname "$0")
cd "$folder" || exit
[[ ! $(command -v splashmark) ]] && echo "Requires pforret/splashmark" && exit 1
year=$(date +%Y)
name="Peter Forret"
splashmark -3 "$year $name" folder "$PWD"

watermark="$year $name"
echo "--------- START WATERMARK"
echo "Watermark: '$watermark'"
printf "["
splashmark.sh -w 1000 -3 "$watermark" folder "$PWD" \
| while read -r exported ; do
printf '.'
done
echo "]"
echo "--------- FINISH WATERMARK ($SECONDS secs)"

0 comments on commit c0b07bb

Please sign in to comment.