photish 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +52 -5
- data/TODO.md +12 -0
- data/lib/photish/assets/example/site/_plugins/tmpdir_deploy.rb +1 -1
- data/lib/photish/command/deploy.rb +2 -2
- data/lib/photish/config/app_settings.rb +4 -4
- data/lib/photish/log/formatter.rb +0 -2
- data/lib/photish/log/safe_block.rb +3 -4
- data/lib/photish/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8435b70f34daef14e185370d7c8ca195a75db071
|
4
|
+
data.tar.gz: cac3fce5cea64da66e1b301d62ce05b9d2bfd482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7143bed97bb665456b9a353bc9f71a063a63f34006e578221d363e36be99491d30a001428a37ea7894e76b47b0cc65c4bd8f1e1920657d6915713edf777e2cb9
|
7
|
+
data.tar.gz: 63f6237a0547672589eec634fd2fab52b343b9c8c6790a5547a57db14bc65b9e9e79de24c3b4454501f168b87af555ec1e8f78737c6e8be8ec57ea13c7cad4c6
|
data/README.md
CHANGED
@@ -28,6 +28,12 @@ has changed, it is not needlessly regenerated. This results in a responsive
|
|
28
28
|
and fast local development environment, making it easy to perfect the design
|
29
29
|
of your photo based website without having to wait for regeneration.
|
30
30
|
|
31
|
+
## Photish in the Wild
|
32
|
+
|
33
|
+
1. [Photish Montage](https://foinq.com/photish-montage/index.html) - A quick
|
34
|
+
mockup to show what can be done with Photish. [Source
|
35
|
+
here](https://github.com/henrylawson/photish-montage).
|
36
|
+
|
31
37
|
## Getting Started
|
32
38
|
|
33
39
|
It is strongly recommended to read through the [Installation](#installation)
|
@@ -337,11 +343,7 @@ the file extension will change. By default the template engine is
|
|
337
343
|
|
338
344
|
`site/_templates/layout.{type}`
|
339
345
|
|
340
|
-
|
341
|
-
`collection`, `album` and `photo` templates will be rendered inside this
|
342
|
-
layout. The layout template **must** include the `yield` statement to bind the
|
343
|
-
sub template inside it. Below is an example [Slim](http://slim-lang.com/)
|
344
|
-
template, the other templates will be bound where the `yield` statement is:
|
346
|
+
Example:
|
345
347
|
|
346
348
|
```slim
|
347
349
|
doctype html
|
@@ -352,10 +354,27 @@ html
|
|
352
354
|
== yield
|
353
355
|
```
|
354
356
|
|
357
|
+
The layout template is the base layout for all the other templates. The
|
358
|
+
`collection`, `album` and `photo` templates will be rendered inside this
|
359
|
+
layout. The layout template **must** include the `yield` statement to bind the
|
360
|
+
sub template inside it. Below is an example [Slim](http://slim-lang.com/)
|
361
|
+
template, the other templates will be bound where the `yield` statement is:
|
362
|
+
|
355
363
|
##### Collection Template
|
356
364
|
|
357
365
|
`site/_templates/collection.{type}`
|
358
366
|
|
367
|
+
Example:
|
368
|
+
|
369
|
+
```slim
|
370
|
+
h1 Photo Collection
|
371
|
+
- albums.each do |album|
|
372
|
+
div.album
|
373
|
+
div.album-title
|
374
|
+
a href=album.url
|
375
|
+
| #{album.name}
|
376
|
+
```
|
377
|
+
|
359
378
|
The collection template becomes the `index.html` for the root of the website.
|
360
379
|
|
361
380
|
This template is passed the
|
@@ -375,6 +394,20 @@ all_images | an array of all child [Images](https://github.com/henrylaw
|
|
375
394
|
|
376
395
|
`site/_templates/album.{type}`
|
377
396
|
|
397
|
+
Example:
|
398
|
+
|
399
|
+
```slim
|
400
|
+
h1 Album
|
401
|
+
h2
|
402
|
+
a href=url
|
403
|
+
| #{name}
|
404
|
+
div.album-photos
|
405
|
+
- photos.each do |photo|
|
406
|
+
div.album-photo
|
407
|
+
a href=photo.url title=photo.name
|
408
|
+
img src=photo.images.find{ |i|i.quality_name=='Low' }.url alt=photo.name
|
409
|
+
```
|
410
|
+
|
378
411
|
For each folder in the `photos` directory, a slugified album folder is created
|
379
412
|
with an `index.html` in it.
|
380
413
|
|
@@ -396,6 +429,20 @@ all_images | an array of all child [Images](https://github.com/henrylaw
|
|
396
429
|
|
397
430
|
`site/_templates/photo.{type}`
|
398
431
|
|
432
|
+
Example:
|
433
|
+
|
434
|
+
```slim
|
435
|
+
h1 Photo
|
436
|
+
h2
|
437
|
+
a href=url
|
438
|
+
| #{name}
|
439
|
+
div.album-photos
|
440
|
+
- images.each do |image|
|
441
|
+
div.album-photo
|
442
|
+
a href=image.url title=image.name
|
443
|
+
img src=image.url alt=image.quality_name
|
444
|
+
```
|
445
|
+
|
399
446
|
For each image in an Albums directory, a slugified photo folder is created
|
400
447
|
with an `index.html` in it.
|
401
448
|
|
data/TODO.md
CHANGED
@@ -2,8 +2,19 @@
|
|
2
2
|
|
3
3
|
## In Progress
|
4
4
|
|
5
|
+
1. Url and base are broken during template/image creation
|
6
|
+
1. Solve problem for explicit urls mentioned in templates (that need host/base)
|
7
|
+
1. Need to have parameters to change on deploy
|
8
|
+
1. During Host command nullify url options to work on host
|
9
|
+
1. Deploy README content
|
10
|
+
1. Extract the SSH deploy to gem
|
11
|
+
|
5
12
|
## Backlog
|
6
13
|
|
14
|
+
1. Empty folders exist in output dir after orig removed and regeneration has happened
|
15
|
+
1. Worker can die when large folders moved mid generation
|
16
|
+
1. Changing convert items does not trigger regeneration but changing name does
|
17
|
+
1. Templates with exif data, super slow
|
7
18
|
1. Plugin as a gem to deploy to github pages, netlify, amazon s3
|
8
19
|
1. Custom template rendering outside of `_templates` folder using `page.{type}`
|
9
20
|
1. Proper asset pipeline for CSS
|
@@ -14,3 +25,4 @@
|
|
14
25
|
1. Provide generic way to override config from arguments to allow for host name
|
15
26
|
override on deploy etc.
|
16
27
|
1. Video transcoding and template rendering
|
28
|
+
1. Demo sites with better design
|
@@ -5,10 +5,10 @@ module Photish
|
|
5
5
|
load_all_plugins
|
6
6
|
log.info "Requested engine: #{engine}"
|
7
7
|
|
8
|
-
return no_engine_found unless engine
|
8
|
+
return no_engine_found unless engine && engine_class
|
9
9
|
|
10
10
|
log.info "Deploying with engine #{engine_class}"
|
11
|
-
engine_class.new(config, log).
|
11
|
+
engine_class.new(config, log).deploy_site
|
12
12
|
end
|
13
13
|
|
14
14
|
private
|
@@ -18,10 +18,10 @@ module Photish
|
|
18
18
|
attr_reader :runtime_config
|
19
19
|
|
20
20
|
def prioritized_config
|
21
|
-
{}.
|
22
|
-
.
|
23
|
-
.
|
24
|
-
.
|
21
|
+
{}.deep_merge(default_config)
|
22
|
+
.deep_merge(file_config)
|
23
|
+
.deep_merge(runtime_config)
|
24
|
+
.deep_merge(derived_config)
|
25
25
|
end
|
26
26
|
|
27
27
|
def sensitive_config
|
@@ -4,11 +4,10 @@ module Photish
|
|
4
4
|
def handle_errors(name)
|
5
5
|
begin
|
6
6
|
yield
|
7
|
-
|
8
|
-
|
9
|
-
log.fatal "#{name} died due to exception"
|
7
|
+
rescue ScriptError, SignalException, StandardError, SystemExit => e
|
8
|
+
log.fatal "#{name} died due to #{e.class.name}"
|
10
9
|
log.fatal e unless e.kind_of?(SystemExit)
|
11
|
-
Thread.list.each(&:kill)
|
10
|
+
Thread.list.each(&:kill)
|
12
11
|
exit(1)
|
13
12
|
end
|
14
13
|
end
|
data/lib/photish/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: photish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Lawson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|