From 0c355f42dbe71d755fb898b146bac41dd5bdefd8 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 1 May 2020 23:00:45 +0200 Subject: doc: add quickstart guide GitHub: closes #206 --- .travis.yml | 2 + compiler/ldgallery.1.md | 5 ++ ldgallery-quickstart.7.md | 108 +++++++++++++++++++++++++++++++++++++++++++ readme.md | 1 + viewer/ldgallery-viewer.7.md | 5 ++ 5 files changed, 121 insertions(+) create mode 100644 ldgallery-quickstart.7.md diff --git a/.travis.yml b/.travis.yml index 6bf6f29..40798fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,7 @@ jobs: - stack build --no-terminal - stack install --local-bin-path ../dist/ - cd .. + - pandoc --standalone --to man ldgallery-quickstart.7.md --output dist/ldgallery-quickstart.7 - pandoc --standalone --to man compiler/ldgallery.1.md --output dist/ldgallery.1 - pandoc --standalone --to man viewer/ldgallery-viewer.7.md --output dist/ldgallery-viewer.7 - cp changelog.md license.md dist/ @@ -117,6 +118,7 @@ jobs: - stack build --no-terminal - stack install --local-bin-path ../dist/ - cd .. + - cp ldgallery-quickstart.7.md dist/ldgallery-quickstart.7.md - cp viewer/ldgallery-viewer.7.md dist/ldgallery-viewer.7.md - cp compiler/ldgallery.1.md dist/ldgallery.1.md - cp changelog.md license.md dist/ diff --git a/compiler/ldgallery.1.md b/compiler/ldgallery.1.md index 5a07b7f..a60a3b1 100644 --- a/compiler/ldgallery.1.md +++ b/compiler/ldgallery.1.md @@ -176,8 +176,13 @@ pictureMaxResolution.height # SEE ALSO +Related manual pages: __ldgallery-quickstart__(7), __ldgallery-viewer__(7) + The ldgallery source code is available on . + +# LICENSE + 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. diff --git a/ldgallery-quickstart.7.md b/ldgallery-quickstart.7.md new file mode 100644 index 0000000..2154d20 --- /dev/null +++ b/ldgallery-quickstart.7.md @@ -0,0 +1,108 @@ +--- +pagetitle: Quickstart guide - ldgallery +title: LDGALLERY-QUICKSTART(7) ldgallery +author: Pacien TRAN-GIRARD, Guillaume FOUET +date: 2020-05-01 (v1.0) +--- + +# ABOUT + +This document is a step-by-step guide showing how to create, compile and deploy a new gallery with _ldgallery_. + + +# QUICKSTART GUIDE + +## Step 1: setting up the compiler + +The _ldgallery_ compiler's job is to transform a directory containing pictures and other types of items, alongside additional metadata to associate to those, into a gallery that can be viewed in a web browser. + +This compiler program is typically installed and runs on the computer of the gallery's owner. + +It can be installed through a package manager (package name "ldgallery") or manually by extracting a prebuilt archive available on the project's website . + +## Step 2: initialising the gallery + +A minimal gallery can be initialised by creating a directory containing a gallery configuration file named "gallery.yaml" with the following content: + +```yaml +# gallery.yaml: ldgallery example gallery configuration file. +# See ldgallery(1) for a list of available configuration keys. + +galleryTile: Monuments of the World + +tagCategories: + - city +``` + +## Step 3: adding items + +A new item, say a picture file named "DSC0001.jpg", can now be added to the directory created at the previous step. + +Optionally, some metadata such as a title and some tags can be associated by creating a file named "DSC0001.jpg.yaml" at the same location, with the following content: + +```yaml +# DSC0001.jpg.yaml: ldgallery metadata sidecar file for DSC0001.jpg. +# See ldgallery(1) for a list of available keys. + +title: The Eiffel Tower + +tags: + - city:Paris + - tower +``` + +## Step 4: compiling the gallery + +The gallery can now be compiled by running the following command in a terminal with the right path to the gallery directory created during the previous steps: + +```sh +ldgallery --with-viewer --input-dir +``` + +If the compiler was installed manually through the extraction of a pre-built archive, it might be necessary to specify the full path of the installation: + +```sh +/ldgallery --with-viewer=/viewer --input-dir +``` + +Running the command above produces a directory named "out" within the input gallery directory, which contains the compiled gallery and a web viewer, ready to be deployed on some web server. + +## Step 5: deploying the gallery + +The content of the "out" directory generated at the previous step can now simply be uploaded to some web host, for example with an FTP client like FileZilla or through rsync/SSH with the following command: + +```sh +rsync -Prz /out/* user@webhost:publication_path/ +``` + +The target web host doesn't need to run any additional software besides a web server correctly configured to serve flat static files. + + +# TIPS + +## Version control + +Some standard version-control software such as Git or Mercurial can easily be used to keep track of the evolutions of the gallery directory, thanks to the text-based format used for the sidecar metadata files. + +## Automated compilation and deployment + +The compilation and upload commands can be combined in a Makefile or made part of a script for faster and more convenient deployments. + +Such scripted procedure can then further be automated through Continuous Integration hooks. + + +# SEE ALSO + +Related manual pages: __ldgallery__(1), __ldgallery-viewer__(7) + +The ldgallery source code is available on . + + +# LICENSE + +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 . diff --git a/readme.md b/readme.md index dc370a2..2b648ae 100644 --- a/readme.md +++ b/readme.md @@ -17,6 +17,7 @@ Build The man pages can be generated using [Pandoc]: ``` +pandoc --standalone --to man ldgallery-quickstart.7.md --output ldgallery-quickstart.7 pandoc --standalone --to man compiler/ldgallery.1.md --output ldgallery.1 pandoc --standalone --to man viewer/ldgallery-viewer.7.md --output ldgallery-viewer.7 ``` diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md index 6f572fe..41f5003 100644 --- a/viewer/ldgallery-viewer.7.md +++ b/viewer/ldgallery-viewer.7.md @@ -68,8 +68,13 @@ An example of such manifest and an associated icon are available in the example # SEE ALSO +Related manual pages: __ldgallery__(1), __ldgallery-quickstart__(7) + The ldgallery source code is available on . + +# LICENSE + 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. -- cgit v1.2.3