From 70eba8dd045d6f9408a46f8391dc6b07238798bb Mon Sep 17 00:00:00 2001 From: CharlesNepote Date: Sat, 11 Jun 2016 23:21:55 +0200 Subject: [PATCH 1/8] Small typos Small typos --- docs/configuration.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index f1fdc5e..b709dce 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -12,7 +12,7 @@ The files organisation is quite simple: Root settings.yaml ------------------ -The root settings.yaml should contains 2 keys : one for the title of your website and one for the subtitle. It should looks like that:: +The root settings.yaml should contains 2 keys: one for the title of your website and one for the subtitle. It should looks like that:: title: My exploration of the outside world sub_title: it's a scary place, don't go there @@ -40,11 +40,11 @@ For example, this could be the content of `settings.yaml` in `about` folder:: 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 -"public: false" if you don't want to list this page on the homepage. On you +"public: false" if you don't want to list this page on the homepage. On case you didn't specified "public: false" you'll **need** to specify a "cover:" entry like any other gallery. -**NOTE**: except the "static: " option to disepear quite soon for a more +**NOTE**: except the "static: " option to disappear quite soon for a more generic approach to "choose your page style". Global settings @@ -64,7 +64,7 @@ Currently a `gm` settings key allows to customize the default GraphicsMagick's b strip: True resize: 50% -The meaning of the currently supported GraphicsMagick's settings is as follows : +The meaning of the currently supported GraphicsMagick's settings is as follows: * `quality` allows to customize the compression level of thumbnails (between 0 and 100) * `auto-orient` change the orientation of pictures so they are upright (based on corresponding EXIF tags if present) @@ -192,7 +192,7 @@ _______ - type: bordered-picture image: another_picture.jpg -And here is an example or a **private** gallery (notice the ``public`` keyword):: +And here is an example of a **private** gallery (notice the ``public`` keyword):: title: Gallery title sub_title: Gallery sub-title From b25b3f7fd632f9de31764acee469e50ef14dcb5e Mon Sep 17 00:00:00 2001 From: Olivier Le Thanh Duong Date: Sat, 18 Jun 2016 23:33:08 +0200 Subject: [PATCH 2/8] fix typo in doc --- docs/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index b709dce..5ef73b6 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -44,7 +44,7 @@ homepage that is better suited for a static page. You'll need to specify case you didn't specified "public: false" you'll **need** to specify a "cover:" entry like any other gallery. -**NOTE**: except the "static: " option to disappear quite soon for a more +**NOTE**: expect the "static: " option to disappear quite soon for a more generic approach to "choose your page style". Global settings From 2d29a64325fded1b7f0b17d632f7f697994554a6 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 30 Jun 2016 05:52:48 +0200 Subject: [PATCH 3/8] [fix] take full size of the underlying picture for video --- prosopopee/themes/exposure/static/css/style-page.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prosopopee/themes/exposure/static/css/style-page.css b/prosopopee/themes/exposure/static/css/style-page.css index 0c2888a..1034612 100644 --- a/prosopopee/themes/exposure/static/css/style-page.css +++ b/prosopopee/themes/exposure/static/css/style-page.css @@ -350,7 +350,7 @@ a.google { left: 0; z-index: 0; width: 100%; - height: auto; + height: 100%; } .full-picture video { @@ -358,6 +358,7 @@ a.google { min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -100; background-size: cover; + object-fit: fill; } .bordered-picture video { From 198cb5337d22133ecf9f6edf6085d8528429d974 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 30 Jun 2016 06:00:07 +0200 Subject: [PATCH 4/8] [fix] ups, bad section --- prosopopee/themes/exposure/static/css/style-page.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/themes/exposure/static/css/style-page.css b/prosopopee/themes/exposure/static/css/style-page.css index 1034612..f8c07f7 100644 --- a/prosopopee/themes/exposure/static/css/style-page.css +++ b/prosopopee/themes/exposure/static/css/style-page.css @@ -358,13 +358,13 @@ a.google { min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -100; background-size: cover; - object-fit: fill; } .bordered-picture video { width: 77%; margin-left: 11.5%; margin-right: 11.5%; + object-fit: fill; } .bg-section { From a1741ba31aa227066b5144420fce45cadd090cb9 Mon Sep 17 00:00:00 2001 From: Antoine Lamielle Date: Sun, 21 Aug 2016 13:37:38 +0200 Subject: [PATCH 5/8] add a new gm setting to allow progressive JPEG --- prosopopee/prosopopee.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 08f3fdb..15aed08 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -22,7 +22,8 @@ SETTINGS = { "quality": 75, "auto-orient": True, "strip": True, - "resize": None + "resize": None, + "progressive": True }, "ffmpeg": { "binary": "ffmpeg", @@ -138,10 +139,11 @@ class Image(object): "auto-orient": "-auto-orient" if options["auto-orient"] else "", "strip": "-strip" if options["strip"] else "", "quality": "-quality %s" % options["quality"] if "quality" in options else "-define jpeg:preserve-settings", - "resize": "-resize %s" % options["resize"] if options.get("resize", None) is not None else "" + "resize": "-resize %s" % options["resize"] if options.get("resize", None) is not None else "", + "progressive": "-interlace Line" if options.get("progressive", None) is True else "" } - command = "gm convert {source} {auto-orient} {strip} {quality} {resize} {target}".format(**gm_switches) + command = "gm convert {source} {auto-orient} {strip} {progressive} {quality} {resize} {target}".format(**gm_switches) warning("Generation", source) print(command) From c2888244017087b6b98905a1eac662432e5070f0 Mon Sep 17 00:00:00 2001 From: Antoine Lamielle Date: Sun, 21 Aug 2016 13:53:10 +0200 Subject: [PATCH 6/8] [doc] update doc with the progressive gm setting --- docs/configuration.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index 5ef73b6..6fe6089 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -63,6 +63,7 @@ Currently a `gm` settings key allows to customize the default GraphicsMagick's b auto-orient: True strip: True resize: 50% + progressive: True The meaning of the currently supported GraphicsMagick's settings is as follows: @@ -70,6 +71,7 @@ The meaning of the currently supported GraphicsMagick's settings is as follows: * `auto-orient` change the orientation of pictures so they are upright (based on corresponding EXIF tags if present) * `strip` removes all profiles and text attributes from the image (good for privacy, slightly reduce file size) * `resize` can be used to resize the fullsize version of pictures. by default, input image size is preserved + * `progressive` converts classic baseline JPEG files to progressive JPEG, and interlace PNG/GIF files (improve the page loading impression, slightly reduce file size) Any GraphicsMagick setting can be customized on a per-image basis (either `cover` or `image`, see below). From e14aca70f0a8fa6e25bc58c0d3d4acfc7f7cd6e4 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 22 Aug 2016 04:11:58 +0200 Subject: [PATCH 7/8] [doc] update changelog --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 9c0f1ae..cdc95ac 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,7 @@ Changelog * code cleaning by Bram * make code a bit more robust by Bram * basic CI on travis by Bram + * progressive JPEG/GIF/PNG by default for a better loading experience by 0x010C following sebian's blogpost 0.3.1 (2016-04-13) From 12fdbc30d4580d257e0e204da14b7dd49625455e Mon Sep 17 00:00:00 2001 From: Antoine Lamielle Date: Thu, 8 Sep 2016 01:15:04 -0400 Subject: [PATCH 8/8] quoting the source and target path with gm to avoid errors occurring when there are spaces in the the path or in the filename --- prosopopee/prosopopee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 15aed08..c3310fa 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -143,7 +143,7 @@ class Image(object): "progressive": "-interlace Line" if options.get("progressive", None) is True else "" } - command = "gm convert {source} {auto-orient} {strip} {progressive} {quality} {resize} {target}".format(**gm_switches) + command = "gm convert '{source}' {auto-orient} {strip} {progressive} {quality} {resize} '{target}'".format(**gm_switches) warning("Generation", source) print(command)