From 987eb81cb5d98262299c7917d752c54907cbbc33 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 23 Jan 2020 22:36:21 +0100 Subject: compiler: add directory incl and excl glob settings GitHub: closes #41 --- ldgallery.1.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 981dda7..febe2e2 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -93,10 +93,16 @@ The gallery settings reside in a file named "gallery.yaml" located at the root o compiler.galleryName : Name of the gallery. Defaults to "Gallery". -compiler.includeFiles[] +compiler.includedDirectories[] +: Glob patterns of directory names to include in the gallery. Defaults to ["*"] (matches all directory names). + +compiler.excludedDirectories[] +: Glob patterns of directory names to exclude from the gallery. Defaults to [] (none). + +compiler.includedFiles[] : Glob patterns of file names to include in the gallery. Defaults to ["*"] (matches all file names). -compiler.excludeFiles[] +compiler.excludedFiles[] : Glob patterns of file names to exclude from the gallery. Defaults to [] (none). compiler.tagsFromDirectories -- cgit v1.2.3 From cf91102432b1196b8f3c1fa388b3963948ad49a6 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 23 Jan 2020 23:16:07 +0100 Subject: compiler: add jpeg export quality setting GitHub: closes #2 --- ldgallery.1.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index febe2e2..ba8d4f9 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -120,6 +120,9 @@ compiler.pictureMaxResolution.width compiler.pictureMaxResolution.height : Maximum height in pixels of the picture items, unlimited by default. +compiler.jpegExportQuality +: JPEG export quality percentage as an integer, 80 by default. + viewer.defaultSearchMode [TODO] : Default search view mode ("highlight" or "filter"). Defaults to "filter". -- cgit v1.2.3 From c05cbe525ad44273cc1b9b58549af757f549dcb7 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 27 Jan 2020 14:29:47 +0100 Subject: compiler: switch to imagemagick Use ImageMagick to resize images instead of JuicyPixels, using the superior Lanczos resampling and cutting memory usage. This requires ImageMagick to be installed on the host system and the `magick` executable to be present in the PATH. GitHub: closes #49 --- ldgallery.1.md | 3 --- 1 file changed, 3 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index ba8d4f9..febe2e2 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -120,9 +120,6 @@ compiler.pictureMaxResolution.width compiler.pictureMaxResolution.height : Maximum height in pixels of the picture items, unlimited by default. -compiler.jpegExportQuality -: JPEG export quality percentage as an integer, 80 by default. - viewer.defaultSearchMode [TODO] : Default search view mode ("highlight" or "filter"). Defaults to "filter". -- cgit v1.2.3 From 15c806adec22239096a910b92b49fcfb964815bd Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 30 Jan 2020 17:01:15 +0100 Subject: compiler: add flag for output dir cleanup Making it explicit. GitHub: closes #62 --- ldgallery.1.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index febe2e2..c40a4ce 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -33,6 +33,9 @@ Available options are: -r, \--rebuild-all : Invalidate cache and recompile everything. +-c, \--clean-output +: Remove unnecessary files from the output directory. + -w, \--with-viewer : Include the static web viewer in the output. -- cgit v1.2.3 From d1109852caba5942b037ea6ef998c67bef1d2920 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 31 Jan 2020 18:01:20 +0100 Subject: doc: clarify argument syntax Avoiding silly shell expansion issues for path arguments --- ldgallery.1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index c40a4ce..8784fb2 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -20,14 +20,14 @@ The ldgallery compiler program processes pictures and aggregates metadata from p # COMMAND -ldgallery [\--input-dir=_./_] [\--output-dir=_./out_] [\--with-viewer] +ldgallery [\--input-dir _./_] [\--output-dir _./out_] [\--with-viewer] Available options are: --i, \--input-dir=_DIR_ +-i, \--input-dir _DIR_ : Gallery source directory. Defaults to the current directory. --o, \--output-dir=_DIR_ +-o, \--output-dir _DIR_ : Generated gallery output path. Defaults to ./out. -r, \--rebuild-all -- cgit v1.2.3 From a524bc557ee154d5880153d9b8da680e0b5f3e85 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 2 Feb 2020 20:58:10 +0100 Subject: compiler: tweak default thumbnail size For better packing. --- ldgallery.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 8784fb2..5612cbf 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -115,7 +115,7 @@ compiler.thumbnailMaxResolution.width : Maximum width in pixels of the item thumbnails, 400 by default. compiler.thumbnailMaxResolution.height -: Maximum height in pixels of the item thumbnails, 400 by default. +: Maximum height in pixels of the item thumbnails, 300 by default. compiler.pictureMaxResolution.width : Maximum width in pixels of the picture items, unlimited by default. -- cgit v1.2.3 From c22ea3de0fc5a42449b4bae80afa1a94c7afa41e Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 3 Feb 2020 15:10:58 +0100 Subject: compiler: reject input and output directories that coincide GitHub: closes #80 --- ldgallery.1.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 5612cbf..8928693 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -25,10 +25,13 @@ ldgallery [\--input-dir _./_] [\--output-dir _./out_] [\--with-viewer] Available options are: -i, \--input-dir _DIR_ -: Gallery source directory. Defaults to the current directory. +: Gallery source directory. + Defaults to the current directory. -o, \--output-dir _DIR_ -: Generated gallery output path. Defaults to ./out. +: Generated gallery output path. + Must be distinct from the source directory. + Defaults to ./out. -r, \--rebuild-all : Invalidate cache and recompile everything. -- cgit v1.2.3 From ef1778e051e007f08f9188a479d04fdf95a57d21 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 13 Feb 2020 18:13:55 +0100 Subject: documentation --- ldgallery.1.md | 6 ------ 1 file changed, 6 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 8928693..f071344 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -126,9 +126,6 @@ compiler.pictureMaxResolution.width compiler.pictureMaxResolution.height : Maximum height in pixels of the picture items, unlimited by default. -viewer.defaultSearchMode [TODO] -: Default search view mode ("highlight" or "filter"). Defaults to "filter". - viewer.defaultSearchQuery [TODO] : Default search query string. @@ -138,9 +135,6 @@ viewer.defaultSortOrder [TODO] viewer.tagGroups[].tag [TODO] : Tag prefix defining the tag group. -viewer.tagGroups[].order [TODO] -: Order in which to display tag groups. - viewer.tagGroups[].colour [TODO] : Colour associated to the tag group. -- cgit v1.2.3 From 395a76bc4193c0c7182f87778458a68d0079e836 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 14 Feb 2020 15:39:56 +0100 Subject: compiler: metadata sidecar for whole directories GitHub: closes #3 --- ldgallery.1.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index f071344..17056ce 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -2,7 +2,7 @@ pagetitle: User manual - ldgallery title: LDGALLERY(1) ldgallery user manual author: Pacien TRAN-GIRARD, Guillaume FOUET -date: 2020-01-05 (v0.1.0.0-SNAPSHOT) +date: 2020-02-15 (v0.1.0.0-SNAPSHOT) --- @@ -55,7 +55,8 @@ Available options are: # INPUT GALLERY STRUCTURE A gallery source directory contains the gallery items and their sidecar metadata files, optionally grouped inside sub-directories. -Directory thumbnails can be set by placing a picture file named "thumbnail", with any image file extension, inside of it. + +Directory thumbnails can be set by placing a picture file named "thumbnail", with any image file extension, inside of directories. An example input gallery directory structure could be as follows: @@ -65,6 +66,7 @@ An example input gallery directory structure could be as follows: ├── DSC0001.jpg.yaml ---- its associated sidecar metadata file ├── Some directory ------ a directory grouping gallery items │ ├── thumbnail.jpg --- a thumbnail for its parent directory +│ ├── directory.yaml -- directory sidecar metadata file │ ├── DSC0002.jpg │ ├── DSC0002.jpg.yaml │ ├── DSC0003.jpg @@ -73,32 +75,37 @@ An example input gallery directory structure could be as follows: ``` -# ITEM METADATA SIDECAR +# METADATA SIDECAR -Item metadata are read from sidecar files of the same name, with the ".yaml" extension appended. -When a sidecar file is absent or a particular key omitted, values are set as empty or to their fallback value specified below. +File metadata are read from sidecar files of the same name, with the ".yaml" extension appended. Metadata contained within item files themselves (e.g. Exif fields for pictures) are ignored. +Directory metadata are read from sidecar files named "directory.yaml" located within the directory. + +When a sidecar file is absent or a particular key omitted, values are set as empty or to their fallback value specified below. + title -: Title of the item. Defaults to the name of the file. +: Title of the item. + Defaults to the name of the file or directory. datetime -: ISO 8601 zoned date and time. Defaults to the last modification time of the file. +: ISO 8601 zoned date and time. + Defaults to the last modification time of the file itself, + or the most recent modification date of a directory's items. description : Description for the item. tags -: List of tags for the item. Tag groups can be defined using prefixes separated by "." (dot). +: List of tags for the item. + Tag groups can be defined using prefixes separated by "." (dot). + Tags specified in a directory metadata sidecar are applied to all items within that directory. # GALLERY CONFIGURATION The gallery settings reside in a file named "gallery.yaml" located at the root of the gallery's source directory. -compiler.galleryName -: Name of the gallery. Defaults to "Gallery". - compiler.includedDirectories[] : Glob patterns of directory names to include in the gallery. Defaults to ["*"] (matches all directory names). -- cgit v1.2.3 From 26a85722e74eae23a22350064eed204480bbd032 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 16 Feb 2020 12:15:08 +0100 Subject: compiler: unify directory special files --- ldgallery.1.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 17056ce..91724a6 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -56,7 +56,7 @@ Available options are: A gallery source directory contains the gallery items and their sidecar metadata files, optionally grouped inside sub-directories. -Directory thumbnails can be set by placing a picture file named "thumbnail", with any image file extension, inside of directories. +Directory thumbnails can be set by placing a picture file named "_directory", with any image file extension, inside of directories. An example input gallery directory structure could be as follows: @@ -65,8 +65,8 @@ An example input gallery directory structure could be as follows: ├── DSC0001.jpg --------- a picture ├── DSC0001.jpg.yaml ---- its associated sidecar metadata file ├── Some directory ------ a directory grouping gallery items -│ ├── thumbnail.jpg --- a thumbnail for its parent directory -│ ├── directory.yaml -- directory sidecar metadata file +│ ├── _directory.jpg -- a thumbnail for its parent directory +│ ├── _directory.yaml - directory sidecar metadata file │ ├── DSC0002.jpg │ ├── DSC0002.jpg.yaml │ ├── DSC0003.jpg @@ -80,7 +80,7 @@ An example input gallery directory structure could be as follows: File metadata are read from sidecar files of the same name, with the ".yaml" extension appended. Metadata contained within item files themselves (e.g. Exif fields for pictures) are ignored. -Directory metadata are read from sidecar files named "directory.yaml" located within the directory. +Directory metadata are read from sidecar files named "_directory.yaml" located within the directory. When a sidecar file is absent or a particular key omitted, values are set as empty or to their fallback value specified below. -- cgit v1.2.3 From 68899f0c1ba4f641c376fda1e51d9694b02b9c5d Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 17 Feb 2020 18:09:20 +0100 Subject: compiler: add a prefix setting for tags generated from parent dirs GitHub: closes #59 --- ldgallery.1.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index 91724a6..a5d0e4c 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -107,19 +107,28 @@ tags The gallery settings reside in a file named "gallery.yaml" located at the root of the gallery's source directory. compiler.includedDirectories[] -: Glob patterns of directory names to include in the gallery. Defaults to ["*"] (matches all directory names). +: Glob patterns of directory names to include in the gallery. + Defaults to ["*"] (matches all directory names). compiler.excludedDirectories[] -: Glob patterns of directory names to exclude from the gallery. Defaults to [] (none). +: Glob patterns of directory names to exclude from the gallery. + Defaults to [] (none). compiler.includedFiles[] -: Glob patterns of file names to include in the gallery. Defaults to ["*"] (matches all file names). +: Glob patterns of file names to include in the gallery. + Defaults to ["*"] (matches all file names). compiler.excludedFiles[] -: Glob patterns of file names to exclude from the gallery. Defaults to [] (none). +: Glob patterns of file names to exclude from the gallery. + Defaults to [] (none). -compiler.tagsFromDirectories -: How far to look at parent directories to add implicit tags. Defaults to 0. +compiler.tagsFromDirectories.fromParents +: Automatically generate tags from the name of parent directories, + looking up in the hierarchy as far as indicated by this parameter. + Defaults to 0 (do not generate tags from parent directories). + +compiler.tagsFromDirectories.prefix +: Prefix to use for tags automatically generated from the parent directories' names. compiler.thumbnailMaxResolution.width : Maximum width in pixels of the item thumbnails, 400 by default. @@ -137,7 +146,8 @@ viewer.defaultSearchQuery [TODO] : Default search query string. viewer.defaultSortOrder [TODO] -: Default sort order ("alphanumeric", "reverse-alphanumeric", "date", "reverse-date"). Defaults to "date". +: Default sort order ("alphanumeric", "reverse-alphanumeric", "date", "reverse-date"). + Defaults to "date". viewer.tagGroups[].tag [TODO] : Tag prefix defining the tag group. @@ -146,7 +156,8 @@ viewer.tagGroups[].colour [TODO] : Colour associated to the tag group. viewer.hiddenTags [TODO] -: List of tags to hide by default. Items bearing one of those tags will not be displayed until they are being explicitly searched for. +: List of tags to hide by default. + Items bearing one of those tags will not be displayed until they are being explicitly searched for. # SEE ALSO -- cgit v1.2.3 From ce0b7ec230703d239b3d77e09352c0b1d515d8f5 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 21 Feb 2020 15:39:01 +0100 Subject: compiler: add gallery config file CLI argument GitHub: closes #136 --- ldgallery.1.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md index a5d0e4c..e891345 100644 --- a/ldgallery.1.md +++ b/ldgallery.1.md @@ -33,6 +33,10 @@ Available options are: Must be distinct from the source directory. Defaults to ./out. +-g, \--gallery-config _FILE_ +: Gallery configuration file. + Defaults to $input-dir/gallery.yaml. + -r, \--rebuild-all : Invalidate cache and recompile everything. -- cgit v1.2.3 From e42f4e864bac21ed3b19d1869df2cdd4f8c3433c Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 22 Feb 2020 14:53:03 +0100 Subject: compiler: flatten gallery config GitHub: closes #129 --- ldgallery.1.md | 175 --------------------------------------------------------- 1 file changed, 175 deletions(-) delete mode 100644 ldgallery.1.md (limited to 'ldgallery.1.md') diff --git a/ldgallery.1.md b/ldgallery.1.md deleted file mode 100644 index e891345..0000000 --- a/ldgallery.1.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -pagetitle: User manual - ldgallery -title: LDGALLERY(1) ldgallery user manual -author: Pacien TRAN-GIRARD, Guillaume FOUET -date: 2020-02-15 (v0.1.0.0-SNAPSHOT) ---- - - -# NAME - -ldgallery - a static web gallery generator with tags - - -# DESCRIPTION - -ldgallery is a static gallery generator which turns a collection of tagged pictures into a searchable web gallery. - -The ldgallery compiler program processes pictures and aggregates metadata from plain text sidecar files to generate an indexed version of the gallery. It can optionally output a static web viewer along, which allows the content to be presented and searched through from a JavaScript-enabled web browser. This client-side web application does not require any special software on the server's side. - - -# COMMAND - -ldgallery [\--input-dir _./_] [\--output-dir _./out_] [\--with-viewer] - -Available options are: - --i, \--input-dir _DIR_ -: Gallery source directory. - Defaults to the current directory. - --o, \--output-dir _DIR_ -: Generated gallery output path. - Must be distinct from the source directory. - Defaults to ./out. - --g, \--gallery-config _FILE_ -: Gallery configuration file. - Defaults to $input-dir/gallery.yaml. - --r, \--rebuild-all -: Invalidate cache and recompile everything. - --c, \--clean-output -: Remove unnecessary files from the output directory. - --w, \--with-viewer -: Include the static web viewer in the output. - --h, \--help -: Display help message. - -\--version -: Print version information. - -\--numeric-version -: Print just the version number. - - -# INPUT GALLERY STRUCTURE - -A gallery source directory contains the gallery items and their sidecar metadata files, optionally grouped inside sub-directories. - -Directory thumbnails can be set by placing a picture file named "_directory", with any image file extension, inside of directories. - -An example input gallery directory structure could be as follows: - -``` -./example-gallery -├── DSC0001.jpg --------- a picture -├── DSC0001.jpg.yaml ---- its associated sidecar metadata file -├── Some directory ------ a directory grouping gallery items -│ ├── _directory.jpg -- a thumbnail for its parent directory -│ ├── _directory.yaml - directory sidecar metadata file -│ ├── DSC0002.jpg -│ ├── DSC0002.jpg.yaml -│ ├── DSC0003.jpg -│ └── DSC0003.jpg.yaml -└── gallery.yaml -------- gallery settings file -``` - - -# METADATA SIDECAR - -File metadata are read from sidecar files of the same name, with the ".yaml" extension appended. -Metadata contained within item files themselves (e.g. Exif fields for pictures) are ignored. - -Directory metadata are read from sidecar files named "_directory.yaml" located within the directory. - -When a sidecar file is absent or a particular key omitted, values are set as empty or to their fallback value specified below. - -title -: Title of the item. - Defaults to the name of the file or directory. - -datetime -: ISO 8601 zoned date and time. - Defaults to the last modification time of the file itself, - or the most recent modification date of a directory's items. - -description -: Description for the item. - -tags -: List of tags for the item. - Tag groups can be defined using prefixes separated by "." (dot). - Tags specified in a directory metadata sidecar are applied to all items within that directory. - - -# GALLERY CONFIGURATION - -The gallery settings reside in a file named "gallery.yaml" located at the root of the gallery's source directory. - -compiler.includedDirectories[] -: Glob patterns of directory names to include in the gallery. - Defaults to ["*"] (matches all directory names). - -compiler.excludedDirectories[] -: Glob patterns of directory names to exclude from the gallery. - Defaults to [] (none). - -compiler.includedFiles[] -: Glob patterns of file names to include in the gallery. - Defaults to ["*"] (matches all file names). - -compiler.excludedFiles[] -: Glob patterns of file names to exclude from the gallery. - Defaults to [] (none). - -compiler.tagsFromDirectories.fromParents -: Automatically generate tags from the name of parent directories, - looking up in the hierarchy as far as indicated by this parameter. - Defaults to 0 (do not generate tags from parent directories). - -compiler.tagsFromDirectories.prefix -: Prefix to use for tags automatically generated from the parent directories' names. - -compiler.thumbnailMaxResolution.width -: Maximum width in pixels of the item thumbnails, 400 by default. - -compiler.thumbnailMaxResolution.height -: Maximum height in pixels of the item thumbnails, 300 by default. - -compiler.pictureMaxResolution.width -: Maximum width in pixels of the picture items, unlimited by default. - -compiler.pictureMaxResolution.height -: Maximum height in pixels of the picture items, unlimited by default. - -viewer.defaultSearchQuery [TODO] -: Default search query string. - -viewer.defaultSortOrder [TODO] -: Default sort order ("alphanumeric", "reverse-alphanumeric", "date", "reverse-date"). - Defaults to "date". - -viewer.tagGroups[].tag [TODO] -: Tag prefix defining the tag group. - -viewer.tagGroups[].colour [TODO] -: Colour associated to the tag group. - -viewer.hiddenTags [TODO] -: List of tags to hide by default. - Items bearing one of those tags will not be displayed until they are being explicitly searched for. - - -# SEE ALSO - -The ldgallery source code is available on . - -Copyright (C) 2019-2020 Pacien TRAN-GIRARD and Guillaume FOUET. - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details . -- cgit v1.2.3