Use R for Creating PhotoSwipe Galleries in Hugo


What I get

References

Main function

  1. Generate different size of images so that for using photoswipe feature, including LARGE, SMALL, THUMB, and COVER IMAGE for each album
  2. Auto add original datetime tags for each image
  3. Auto fix the rotation problem
  4. Auto add copyright watermark for each image

It requires:

  1. imagemagick
  2. exiftools
  3. git
  4. R package exifr
  5. R package tidyverse

How to use

here is the folder structure I have

.                                (web <- "FOLDERNAME")
├── content
│   ├── gallery                   (mddir <- "content/gallery")
│   │   ├── Photo.md
├── src
│   └── gallery                   (fromdir <- "src/gallery")
│       ├── Photo__BRABRA
│       │   ├── DE4A8357.jpg
│       │   └── DE4A8467.jpg
├── static
│   ├── css
│   │   ├── custom.css
│   │   ├── photo_list.min.css
│   │   └── photoswipe.css
│   ├── js
│   │   ├── jquery-3.1.1.min.js
│   │   ├── load-photoswipe.js
│   │   ├── photoswipe-ui-default.js
│   │   ├── photoswipe-ui-default.min.js
│   │   ├── photoswipe.js
│   │   ├── photoswipe.min.js
│   │   ├── pswp_gallery.js
│   ├── pics                       (todir <- "static/pics")
│   │   ├── Photo
│   │   │   ├── coverimage-Photo-DE4A8357.jpg
│   │   │   ├── large
│   │   │   │   ├── DE4A8357-L.jpg
│   │   │   │   ├── DE4A8467-L.jpg
│   │   │   ├── small
│   │   │   │   ├── DE4A8357-S.jpg
│   │   │   │   ├── DE4A8467-S.jpg
│   │   │   └── thumb
│   │   │       ├── DE4A8357-T.jpg
│   │   │       ├── DE4A8467-T.jpg
│   ├── post
│   │   ├── ...

苏命
苏命
副研究员

我的研究方向:水源地水质安全保障,主要针对水源地由于藻类爆发引起的水体嗅味问题开展研究。

comments powered by Disqus

相关