diff --git a/docs/changelog.rst b/docs/changelog.rst index 3a8bcca..8e77633 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,10 @@ Changelog 0.4 (unreleased) * RSS https://prosopopee.readthedocs.org/en/latest/configuration.html#rss by beudbeud + * possibility to use video in section by beudbeud (and a bit of Bram) + * add lazyload for pics by behavior + * if a theme doesn't have a section, fallback on exposure theme which is considered the default one by titoko + * code cleaning by Bram 0.3.1 (2016-04-13) diff --git a/docs/configuration.rst b/docs/configuration.rst index b60bd9c..b9de130 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -24,19 +24,19 @@ ____ It is possible to add a menu to your homepage that links to static pages. To do so, add a `menu` key to your `settings.yaml`, for example:: - menu: - - about: "About" - - first_gallery: "My first gallery" - - http://twitter.com: "Twitter" + menu: + - about: "About" + - first_gallery: "My first gallery" + - http://twitter.com: "Twitter" For example, this could be the content of `settings.yaml` in `about` folder:: - title: "About" - static: true - public: false - sections: - - type: text - text: Some text, HTML is allowed. + title: "About" + static: true + public: false + sections: + - type: text + text: Some text, HTML is allowed. You can use the `static` option to get a template closer to the one of the homepage that is better suited for a static page. You'll need to specify @@ -57,12 +57,12 @@ GM Currently a `gm` settings key allows to customize the default GraphicsMagick's behavior. It looks like :: - settings: - gm: - quality: 75 - auto-orient: True - strip: True - resize: 50% + settings: + gm: + quality: 75 + auto-orient: True + strip: True + resize: 50% The meaning of the currently supported GraphicsMagick's settings is as follows : @@ -73,6 +73,20 @@ The meaning of the currently supported GraphicsMagick's settings is as follows : Any GraphicsMagick setting can be customized on a per-image basis (either `cover` or `image`, see below). +Video convertor +~~~~~~~~~~~~~~~ + +Prosopopée can use ffmpeg or libav and if you want you can customize the settings:: + + settings: + ffmpeg: + binary: "ffmpeg" + loglevel: "panic" + format: "webm" + resolution: "1280x720" + bitrate: "3900k" + preselect: "libvpx-720p" + Themes ~~~~~~ @@ -84,37 +98,37 @@ Prosopopée has a support for various themes. As for now, only 2 themes are avai To specify the theme, add the "theme" key in your "settings" key or your **root** settings.yaml. For example:: - title: My exploration of the outside world - sub_title: it's a scary place, don't go there - settings: - theme: material + title: My exploration of the outside world + sub_title: it's a scary place, don't go there + settings: + theme: material Licence ~~~~~~~ -By default Prosopopée use CC-BY-SA for all the content, if you want use a another licence +By default Prosopopée use CC-BY-SA for all the content, if you want use a another licence you need add key in **root** settings.yaml. For example:: - licence: - name: WTFPL - url: "http://www.wtfpl.net/txt/copying/" + licence: + name: WTFPL + url: "http://www.wtfpl.net/txt/copying/" Share ~~~~~ -If you want enable the share content on social network, add key in **root** settings.yaml. For example: +If you want enable the share content on social network, add key in **root** settings.yaml. For example: By defaut you can share on facebook, twitter, pinterest, google+:: - share: true - url: "http://prosopopee.com" + share: true + url: "http://prosopopee.com" RSS ~~~ For activate the RSS you need add this key in **root** settings.yaml:: - rss: true - url: "http://prosopopee.com" + rss: true + url: "http://prosopopee.com" Gallery settings.yaml @@ -133,43 +147,43 @@ _______ :: - title: Gallery title - sub_title: Gallery sub-title - date: 2016-01-15 - cover: my_cover_picture.jpg - tags: - - #yolo - - #travel - sections: - - type: full-picture - image: big_picture.jpg - text: - title: Big picture title - sub_title: Some text - date: 2016-01-15 - - type: pictures-group - images: - - - - image1.jpg - - image2.jpg - - image3.jpg - - - - image4.jpg - - image5.jpg - - type: text - text: Some text, HTML is allowed. - - type: bordered-picture - image: another_picture.jpg + title: Gallery title + sub_title: Gallery sub-title + date: 2016-01-15 + cover: my_cover_picture.jpg + tags: + - #yolo + - #travel + sections: + - type: full-picture + image: big_picture.jpg + text: + title: Big picture title + sub_title: Some text + date: 2016-01-15 + - type: pictures-group + images: + - + - image1.jpg + - image2.jpg + - image3.jpg + - + - image4.jpg + - image5.jpg + - type: text + text: Some text, HTML is allowed. + - type: bordered-picture + image: another_picture.jpg And here is an example or a **private** gallery (notice the ``public`` keyword):: - title: Gallery title - sub_title: Gallery sub-title - date: 2016-01-15 - cover: my_cover_picture.jpg - public: false - sections: - - ... + title: Gallery title + sub_title: Gallery sub-title + date: 2016-01-15 + cover: my_cover_picture.jpg + public: false + sections: + - ... Advanced settings ----------------- @@ -190,8 +204,8 @@ For example, you can replace:: by:: - image: - name: image1.jpg - quality: 90 - strip: False - auto-orient: False + image: + name: image1.jpg + quality: 90 + strip: False + auto-orient: False diff --git a/docs/install.rst b/docs/install.rst index 961fd63..ba9758b 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -12,14 +12,22 @@ Gallery building needs graphicsmagick library:: apt-get install graphicsmagick +An video convertor like ffmpeg:: + + apt-get install ffmpeg + +or:: + + apt-get install libav-tools + Installation in virtualenv -------------------------- 1. Create a virtualenv, and activate it:: - virtualenv ve - source ve/bin/activate + virtualenv ve + source ve/bin/activate 2. Download and install Prosopopee:: - pip install prosopopee + pip install prosopopee diff --git a/docs/sections.rst b/docs/sections.rst index afe43fb..a6fe15a 100644 --- a/docs/sections.rst +++ b/docs/sections.rst @@ -193,3 +193,46 @@ Exemple:: - type: bordered-picture color: "#333" +Video support +~~~~~~~~~~~~~ + +For bordered-picture, full-picture and pictures-group it's possible to use +video instead of pictures. You have to specify with the "type" key that it's a +video. + +The video will be converted using either ffmpeg or avconv (depending on the one +specified in the settings, ffmpeg being the default one). + +Exemple for pictures-group:: + + - type: pictures-group + images: + - + - name: VID_20160312_174602.mp4 + type: video + - snapseed-06-02.jpeg + - name: snapseed-04.jpeg + text: plop2 + - snapseed-05.jpeg + - snapseed-07.jpeg + - + - snapseed-01.jpeg + +Exemple for bordered-picture:: + + - type: bordered-picture + image: + name: VID_20160312_174602.mp4 + type: video + +And for full-picture:: + + - type: full-picture + image: + name: VID_20160312_174602.mp4 + type: video + text: + title: Title Text + sub_title: Sub title text + date: 2016-03-11 + date_end: 2016-03-25 diff --git a/example/build/about/index.html b/example/build/about/index.html new file mode 100644 index 0000000..439e968 --- /dev/null +++ b/example/build/about/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + Example gallery + + + + + + + + +
+

About

+
+ + + +
+ Some text, HTML is allowed. +
+ + + +
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/example/build/first_gallery/index.html b/example/build/first_gallery/index.html index 151eb18..dfd84d8 100644 --- a/example/build/first_gallery/index.html +++ b/example/build/first_gallery/index.html @@ -17,6 +17,9 @@ + + +
@@ -31,39 +34,107 @@
- - - - - -
-
- - - -
- -
- -
-
- - - -
-
plop
+ +
+
+ +
+
+

Beautiful Title

+

pouet pouet

+ + +
08 December 2015
+
- +
+ + +
-
+ + + + + + + +
+ + + +
+ + + + + + + + + + +
+ + + +
+ + + + + + + + + +
+ + + +
+ + + + + + + + + + +
+ + + +
+ @@ -73,22 +144,129 @@ -
+
+ +
+ + + + + + + + +
+ + + + + + +
+ + + + + +
+ +
+ + + + + + + + + + +
+ +
+ + + + + + +
+ + + + + + +
+ +
+ + + + + + +
+ + + + + +
+ + +
+ +
+ + +
+
+ +
@@ -97,15 +275,19 @@ + +
@@ -114,15 +296,19 @@ + + @@ -133,11 +319,15 @@ + +
+ - + +
@@ -146,24 +336,48 @@ + +
+ - + +
-
+
+ + + + + - -
+ + + + + + + +
+
+ + + +
+
+ @@ -171,7 +385,7 @@

-