From cd7862e6bd84a6f89283cc241edaab4ca4042710 Mon Sep 17 00:00:00 2001 From: Urs Metz Date: Thu, 18 Apr 2024 16:21:51 +0200 Subject: [PATCH] Add README.md --- Cargo.toml | 1 + README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 README.md diff --git a/Cargo.toml b/Cargo.toml index 4a25b9d..d334604 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "markdown-photo-minutes-generator" version = "0.1.0" edition = "2021" license = "MIT" +readme = "README.md" [dependencies] anyhow = "1" diff --git a/README.md b/README.md new file mode 100644 index 0000000..f1d2b4a --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Markdown photo minutes generator + +This program helps in creating markdown photo minutes (e.g. for open spaces). +It offers the following processing steps: + +1. Take a directory structure that contains images of sessions + of the following form (names of the directories and file don't matter) + ``` + - session 1 + - image_1.jpg + - image_2.jpg + - session 2 + - image_1.jpg + ``` +2. Convert images as follows: + * Create thumbnails for each image + * Create the enlarged image version +3. Save the converted images in the given output directory +4. Create the Markdown document that includes the created thumbnails + and links to the enlarged version of the images. + The Markdown document is printed to `stdout`. + +## How to run the program + +The program has three mandatory arguments: + +* the directory that contains the `INPUT` structure +* the directory where the `OUTPUT` should be written to +* the `BASE_ONLINE_PATH` where the created images will be hosted + +So an example invocation would be + +```shell +cargo run -- /path/to/input-files /path/to/output-files http://localhost/where-created-images-are-hosted +``` + +and would do the following: + +1. go through the directory structure in `/path/to/input-files` +2. created the images +3. save them in under `/path/to/output-files` +4. print the Markdown document with the links pointing at + `http://localhost/where-created-images-are-hosted/...` to `stdout` \ No newline at end of file