imagesite 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +74 -0
- data/LICENSE.txt +21 -0
- data/README.md +61 -0
- data/Rakefile +6 -0
- data/bin/imagesite +4 -0
- data/imagesite.gemspec +29 -0
- data/lib/image_site/image.rb +90 -0
- data/lib/image_site/image_site.rb +12 -0
- data/lib/image_site/index.rb +48 -0
- data/lib/image_site/model.rb +28 -0
- data/lib/image_site/options.rb +68 -0
- data/template/Page.html.erb +40 -0
- data/template/index.html.erb +68 -0
- metadata +186 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 661a146b20c466fab9d7465057a75ceccf256a05
|
4
|
+
data.tar.gz: fb6c1ec0e6cc189288a0ca9d6bbe920d12720e07
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f2a8865a3e34cf46384d88d56f83bca30310a6831ea497a949d2ab473c3efdc81a0c4e39b5d7d77e733e89f27f5d6a24621b43d395dda497d8be2ffffe990f16
|
7
|
+
data.tar.gz: 29e0ab6de03653d3fae7e0969c4e61402900ac929a5363e1beb175eeb8887a035f2dbed6e71831619e3738cd16fbfbcaeadb30e97a98e3872d82729ad776399e
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
imagesite (1.0.0.pre)
|
5
|
+
erubis (>= 2.7.0)
|
6
|
+
exifr (>= 1.2.4)
|
7
|
+
image_science (>= 1.3.0)
|
8
|
+
xmp (>= 0.2.0)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
RubyInline (3.12.4)
|
14
|
+
ZenTest (~> 4.3)
|
15
|
+
ZenTest (4.11.1)
|
16
|
+
addressable (2.4.0)
|
17
|
+
capybara (2.7.1)
|
18
|
+
addressable
|
19
|
+
mime-types (>= 1.16)
|
20
|
+
nokogiri (>= 1.3.3)
|
21
|
+
rack (>= 1.0.0)
|
22
|
+
rack-test (>= 0.5.4)
|
23
|
+
xpath (~> 2.0)
|
24
|
+
diff-lcs (1.2.5)
|
25
|
+
docile (1.1.5)
|
26
|
+
erubis (2.7.0)
|
27
|
+
exifr (1.2.4)
|
28
|
+
image_science (1.3.0)
|
29
|
+
RubyInline (~> 3.9)
|
30
|
+
json (1.8.3)
|
31
|
+
mime-types (3.1)
|
32
|
+
mime-types-data (~> 3.2015)
|
33
|
+
mime-types-data (3.2016.0521)
|
34
|
+
nokogiri (1.5.11)
|
35
|
+
rack (1.5.5)
|
36
|
+
rack-test (0.6.3)
|
37
|
+
rack (>= 1.0)
|
38
|
+
rake (0.9.6)
|
39
|
+
rspec (3.5.0)
|
40
|
+
rspec-core (~> 3.5.0)
|
41
|
+
rspec-expectations (~> 3.5.0)
|
42
|
+
rspec-mocks (~> 3.5.0)
|
43
|
+
rspec-core (3.5.2)
|
44
|
+
rspec-support (~> 3.5.0)
|
45
|
+
rspec-expectations (3.5.0)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.5.0)
|
48
|
+
rspec-mocks (3.5.0)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.5.0)
|
51
|
+
rspec-support (3.5.0)
|
52
|
+
simplecov (0.11.2)
|
53
|
+
docile (~> 1.1.0)
|
54
|
+
json (~> 1.8)
|
55
|
+
simplecov-html (~> 0.10.0)
|
56
|
+
simplecov-html (0.10.0)
|
57
|
+
xmp (0.2.0)
|
58
|
+
nokogiri (~> 1.5.0)
|
59
|
+
xpath (2.0.0)
|
60
|
+
nokogiri (~> 1.3)
|
61
|
+
|
62
|
+
PLATFORMS
|
63
|
+
ruby
|
64
|
+
|
65
|
+
DEPENDENCIES
|
66
|
+
bundler (>= 1.12.5)
|
67
|
+
capybara (>= 2.7.1)
|
68
|
+
imagesite!
|
69
|
+
rake (>= 0.9.6)
|
70
|
+
rspec (>= 3.5.0)
|
71
|
+
simplecov (>= 0.11.2)
|
72
|
+
|
73
|
+
BUNDLED WITH
|
74
|
+
1.12.5
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Dave Schweisguth
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# imagesite
|
2
|
+
|
3
|
+
OS X's iPhoto software had a feature that exported photos to a static web site.
|
4
|
+
iPhoto was discontinued in 2015. Its replacement, Photos, does not have that
|
5
|
+
feature. imagesite approximates that feature.
|
6
|
+
|
7
|
+
imagesite HTML is similar, but not identical, to iPhoto's.
|
8
|
+
imagesite's HTML is amateurishly styled, although somewhat less so than iPhoto's.
|
9
|
+
On the bright side, imagesite's output includes an image's tags as well as
|
10
|
+
its title and description.
|
11
|
+
|
12
|
+
## Requirements
|
13
|
+
|
14
|
+
imagesite works with Ruby 2.0.0p648, which comes with OS X 10.11 (El Capitan),
|
15
|
+
and with later versions of Ruby.
|
16
|
+
If your Mac has an older OS X, imagesite may or may not work with its built-in Ruby.
|
17
|
+
If not, you may be able to install a newer Ruby on your Mac to use with imagesite.
|
18
|
+
|
19
|
+
## Installation
|
20
|
+
|
21
|
+
If you're using the Ruby that comes with OS X,
|
22
|
+
|
23
|
+
$ sudo gem install imagesite
|
24
|
+
|
25
|
+
If you're using a Ruby that you installed yourself, `sudo` may or may not be appropriate.
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
- Edit and annotate your images in Photos as usual.
|
30
|
+
- Export your images from Photos (select them and choose
|
31
|
+
File ▶ Export ▶ Export Photos…, or type ⇧⌘E).
|
32
|
+
- Run imagesite in Terminal:
|
33
|
+
|
34
|
+
$ imagesite -t 'Images' -o ~/Desktop/images ~/Desktop/images-export/*
|
35
|
+
|
36
|
+
Replace `'Images'` with whatever you'd like the title of the image set to be,
|
37
|
+
`~/Desktop/images` with whatever you'd like the output directory to be, and
|
38
|
+
`~/Desktop/images-export` with the directory into which you exported your
|
39
|
+
images from Photos.
|
40
|
+
|
41
|
+
imagesite puts photos in its output in the order in which they're given to it
|
42
|
+
on the command line. Unix, unlike Finder, sorts files whose names begin with
|
43
|
+
numbers (such as those created by Photos' Sequential filename export option)
|
44
|
+
in a way that requires leading zeros. You may, therefore, need to add
|
45
|
+
leading zeros to your exported image filenames for `*` to list them in the order
|
46
|
+
you want.
|
47
|
+
|
48
|
+
### Customizing the output
|
49
|
+
|
50
|
+
Run `imagesite -h` to see more options.
|
51
|
+
|
52
|
+
imagesite's HTML is largely determined by two template files. To change them,
|
53
|
+
run the following command to see where they are
|
54
|
+
|
55
|
+
$ gem contents imagesite
|
56
|
+
|
57
|
+
and edit them to your liking.
|
58
|
+
|
59
|
+
## License
|
60
|
+
|
61
|
+
imagesite is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/imagesite
ADDED
data/imagesite.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'imagesite'
|
3
|
+
spec.version = '1.0.0.pre'
|
4
|
+
spec.author = 'Dave Schweisguth'
|
5
|
+
spec.email = 'dave@schweisguth.org'
|
6
|
+
|
7
|
+
spec.summary = %q{iPhoto-style web export for Photos}
|
8
|
+
spec.description = %q{OS X's iPhoto software had a feature that exported photos to a static web site. iPhoto was discontinued in 2015. Its replacement, Photos, does not have that feature. imagesite approximates that feature.}
|
9
|
+
spec.homepage = 'https://github.com/dschweisguth/imagesite'
|
10
|
+
spec.license = 'MIT'
|
11
|
+
|
12
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(.gitignore|.idea/|.rspec|spec/)}) }
|
13
|
+
spec.bindir = 'bin'
|
14
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
15
|
+
|
16
|
+
spec.required_ruby_version = '~> 2.0'
|
17
|
+
|
18
|
+
spec.add_runtime_dependency 'exifr', '>= 1.2.4'
|
19
|
+
spec.add_runtime_dependency 'xmp', '>= 0.2.0'
|
20
|
+
spec.add_runtime_dependency 'image_science', '>= 1.3.0'
|
21
|
+
spec.add_runtime_dependency 'erubis', '>= 2.7.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '>= 1.12.5'
|
24
|
+
spec.add_development_dependency 'rake', '>= 0.9.6'
|
25
|
+
spec.add_development_dependency 'rspec', '>= 3.5.0'
|
26
|
+
spec.add_development_dependency 'capybara', '>= 2.7.1'
|
27
|
+
spec.add_development_dependency 'simplecov', '>= 0.11.2'
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'image_science'
|
3
|
+
require 'xmp'
|
4
|
+
require 'exifr'
|
5
|
+
require_relative 'model'
|
6
|
+
|
7
|
+
module ImageSite
|
8
|
+
class Image < Model
|
9
|
+
def self.all(options)
|
10
|
+
images = options.files.map.with_index(1) do |file, i|
|
11
|
+
Image.new i, file, options
|
12
|
+
end
|
13
|
+
images.each.with_index do |image, i|
|
14
|
+
if i > 0
|
15
|
+
image.previous = images[i - 1]
|
16
|
+
end
|
17
|
+
if i < images.length - 1
|
18
|
+
image.next = images[i + 1]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.template_name
|
24
|
+
'Page.html.erb'
|
25
|
+
end
|
26
|
+
private_class_method :template_name
|
27
|
+
|
28
|
+
attr_accessor :next, :previous, :index
|
29
|
+
|
30
|
+
def initialize(number, file, options)
|
31
|
+
super number, options
|
32
|
+
@file = file
|
33
|
+
end
|
34
|
+
|
35
|
+
def write
|
36
|
+
write_scaled_image relative_image, 912
|
37
|
+
write_html image: self
|
38
|
+
end
|
39
|
+
|
40
|
+
def relative_image
|
41
|
+
"Images/#{@number}.jpeg"
|
42
|
+
end
|
43
|
+
|
44
|
+
def title
|
45
|
+
xmp && xmp.dc && xmp.dc.title && xmp.dc.title.first
|
46
|
+
end
|
47
|
+
|
48
|
+
NEWLINE = "\xE2\x80\xA8".force_encoding('ASCII-8BIT')
|
49
|
+
|
50
|
+
def description
|
51
|
+
exif && exif.image_description && exif.image_description.gsub(NEWLINE, "<br/>\n")
|
52
|
+
end
|
53
|
+
|
54
|
+
def tags
|
55
|
+
xmp && xmp.dc && xmp.dc.subject || []
|
56
|
+
end
|
57
|
+
|
58
|
+
def relative_html
|
59
|
+
"Pages/#{@number}.html"
|
60
|
+
end
|
61
|
+
|
62
|
+
def write_thumbnail
|
63
|
+
write_scaled_image relative_thumbnail, 240
|
64
|
+
end
|
65
|
+
|
66
|
+
def relative_thumbnail
|
67
|
+
"Thumbnails/#{@number}.jpeg"
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
def write_scaled_image(unqualified_name, size)
|
73
|
+
make_subdir File.dirname(unqualified_name)
|
74
|
+
ImageScience.with_image @file do |image|
|
75
|
+
image.thumbnail size do |thumbnail|
|
76
|
+
thumbnail.save "#{@options.output_dir}/#{unqualified_name}"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def xmp
|
82
|
+
@xmp ||= XMP.parse exif
|
83
|
+
end
|
84
|
+
|
85
|
+
def exif
|
86
|
+
@exif ||= EXIFR::JPEG.new @file
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative 'image'
|
2
|
+
|
3
|
+
module ImageSite
|
4
|
+
class Index < Model
|
5
|
+
def self.write_all(options)
|
6
|
+
images = Image.all options
|
7
|
+
indexes = all images, options
|
8
|
+
images.each(&:write)
|
9
|
+
indexes.each(&:write)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.all(images, options)
|
13
|
+
indexes =
|
14
|
+
images.
|
15
|
+
each_slice(options.columns * options.rows).
|
16
|
+
with_index(1).
|
17
|
+
map { |images_for_index, i| Index.new(i, images_for_index, options) }
|
18
|
+
indexes.each do |index|
|
19
|
+
index.indexes = indexes
|
20
|
+
index.images.each { |image| image.index = index }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
private_class_method :all
|
24
|
+
|
25
|
+
def self.template_name
|
26
|
+
'index.html.erb'
|
27
|
+
end
|
28
|
+
private_class_method :template_name
|
29
|
+
|
30
|
+
attr_reader :images
|
31
|
+
attr_accessor :indexes
|
32
|
+
|
33
|
+
def initialize(number, images, options)
|
34
|
+
super number, options
|
35
|
+
@images = images
|
36
|
+
end
|
37
|
+
|
38
|
+
def write
|
39
|
+
images.each(&:write_thumbnail)
|
40
|
+
write_html index: self
|
41
|
+
end
|
42
|
+
|
43
|
+
def relative_html
|
44
|
+
"index#{if @number > 1 then @number end}.html"
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'erubis'
|
2
|
+
|
3
|
+
module ImageSite
|
4
|
+
class Model
|
5
|
+
attr_reader :number
|
6
|
+
|
7
|
+
def self.template
|
8
|
+
@template ||= IO.read "template/#{template_name}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(number, options)
|
12
|
+
@number = number
|
13
|
+
@options = options
|
14
|
+
end
|
15
|
+
|
16
|
+
def make_subdir(subdir)
|
17
|
+
FileUtils.mkdir_p "#{@options.output_dir}/#{subdir}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def write_html(bindings)
|
21
|
+
make_subdir File.dirname(relative_html)
|
22
|
+
bindings = { options: @options }.merge bindings
|
23
|
+
page = Erubis::Eruby.new(self.class.template).result(bindings)
|
24
|
+
IO.write "#{@options.output_dir}/#{relative_html}", page
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
|
3
|
+
module ImageSite
|
4
|
+
class Options
|
5
|
+
DEFAULT_COLUMNS = 4
|
6
|
+
DEFAULT_ROWS = 10
|
7
|
+
|
8
|
+
attr_reader :title, :columns, :rows, :parent_link_text, :output_dir, :files
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@title = nil
|
12
|
+
@columns = DEFAULT_COLUMNS
|
13
|
+
@rows = DEFAULT_ROWS
|
14
|
+
@parent_link_text = nil
|
15
|
+
@output_dir = nil
|
16
|
+
end
|
17
|
+
|
18
|
+
def parse!
|
19
|
+
parser = OptionParser.new do |op|
|
20
|
+
op.banner = "Usage: #{$0} -t TITLE -o OUTPUT_DIR [other options] file [...]"
|
21
|
+
|
22
|
+
op.on('-t TITLE', "Title of the set of images") do |title|
|
23
|
+
@title = title
|
24
|
+
end
|
25
|
+
op.on('-c COLUMNS', "The number of columns of thumbnails on each index page (default #{DEFAULT_COLUMNS})") do |columns|
|
26
|
+
@columns = columns.to_i
|
27
|
+
end
|
28
|
+
op.on('-r ROWS', "The number of rows of photos on each index page (default #{DEFAULT_ROWS})") do |rows|
|
29
|
+
@rows = rows.to_i
|
30
|
+
end
|
31
|
+
op.on('-p PARENT_LINK_TEXT', "The text of the link to ../ on the last index page") do |parent_link_text|
|
32
|
+
@parent_link_text = parent_link_text
|
33
|
+
end
|
34
|
+
op.on('-o OUTPUT_DIR', "Output directory") do |output_dir|
|
35
|
+
@output_dir = output_dir
|
36
|
+
end
|
37
|
+
|
38
|
+
# -h and --help work by default, but implement them explicitly so they're
|
39
|
+
# documented
|
40
|
+
op.on("-h", "--help", "Prints this help") do
|
41
|
+
warn op.to_s
|
42
|
+
exit
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
begin
|
47
|
+
parser.parse!
|
48
|
+
rescue OptionParser::ParseError
|
49
|
+
abort parser.to_s
|
50
|
+
end
|
51
|
+
if !@title
|
52
|
+
abort_with_help parser, "Please specify a title with -t."
|
53
|
+
end
|
54
|
+
if !@output_dir
|
55
|
+
abort_with_help parser, "Please specify an output directory with -o."
|
56
|
+
end
|
57
|
+
if ARGV.empty?
|
58
|
+
abort_with_help parser, "Please specify one or more image files."
|
59
|
+
end
|
60
|
+
@files = ARGV
|
61
|
+
end
|
62
|
+
|
63
|
+
def abort_with_help(parser, message)
|
64
|
+
abort "#{message}\n#{parser}"
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title><%= image.title %></title>
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: white;
|
9
|
+
color: black;
|
10
|
+
}
|
11
|
+
</style>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<p>
|
15
|
+
<% if image.previous %>
|
16
|
+
<a href="<%= image.previous.number %>.html"><--Previous</a>
|
17
|
+
|
18
|
+
<% end %>
|
19
|
+
<a href="../<%= image.index.relative_html %>">Up</a>
|
20
|
+
<% if image.next %>
|
21
|
+
|
22
|
+
<a href="<%= image.next.number %>.html">Next--></a>
|
23
|
+
<% end %>
|
24
|
+
</p>
|
25
|
+
<p><img alt="<%= image.title %>" src="../<%= image.relative_image %>"/></p>
|
26
|
+
<% if image.title %>
|
27
|
+
<h1><%= image.title %></h1>
|
28
|
+
<% end %>
|
29
|
+
<% if image.description %>
|
30
|
+
<p><%= image.description %></p>
|
31
|
+
<% end %>
|
32
|
+
<% if image.tags.any? %>
|
33
|
+
<p>
|
34
|
+
<% image.tags.each do |tag| %>
|
35
|
+
<b><%= tag %></b>
|
36
|
+
<% end %>
|
37
|
+
</p>
|
38
|
+
<% end %>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title><%= options.title %></title>
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: white;
|
9
|
+
color: black;
|
10
|
+
}
|
11
|
+
|
12
|
+
h1 {
|
13
|
+
text-align: center;
|
14
|
+
}
|
15
|
+
|
16
|
+
table {
|
17
|
+
width: 100%;
|
18
|
+
border-spacing: 2px;
|
19
|
+
border-collapse: separate;
|
20
|
+
}
|
21
|
+
|
22
|
+
td {
|
23
|
+
text-align: center;
|
24
|
+
width: <%= 100 / options.columns %>%;
|
25
|
+
padding: 2px;
|
26
|
+
}
|
27
|
+
|
28
|
+
img {
|
29
|
+
border: 0;
|
30
|
+
vertical-align: text-top;
|
31
|
+
}
|
32
|
+
|
33
|
+
.parent-link {
|
34
|
+
text-align: center;
|
35
|
+
}
|
36
|
+
</style>
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
<h1><%= options.title %></h1>
|
40
|
+
<% if index.indexes.length > 1 %>
|
41
|
+
<p>
|
42
|
+
<% index.indexes.each do |other_index| %>
|
43
|
+
<% if other_index == index %>
|
44
|
+
Page <%= other_index.number %>
|
45
|
+
<% else %>
|
46
|
+
<a href="<%= other_index.relative_html %>">Page <%= other_index.number %></a>
|
47
|
+
<% end %>
|
48
|
+
<% if other_index != index.indexes.last %>|<% end %>
|
49
|
+
<% end %>
|
50
|
+
</p>
|
51
|
+
<% end %>
|
52
|
+
<table>
|
53
|
+
<% index.images.each_slice options.columns do |row| %>
|
54
|
+
<tr>
|
55
|
+
<% row.each do |image| %>
|
56
|
+
<td>
|
57
|
+
<a href="<%= image.relative_html %>"><img alt="<%= image.title %>" src="<%= image.relative_thumbnail %>"></a><br/>
|
58
|
+
<%= image.title %>
|
59
|
+
</td>
|
60
|
+
<% end %>
|
61
|
+
</tr>
|
62
|
+
<% end %>
|
63
|
+
</table>
|
64
|
+
<% if index == index.indexes.last && options.parent_link_text %>
|
65
|
+
<p class="parent-link"><a href="../"><%= options.parent_link_text %></a></p>
|
66
|
+
<% end %>
|
67
|
+
</body>
|
68
|
+
</html>
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: imagesite
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dave Schweisguth
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: exifr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.2.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: xmp
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: image_science
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: erubis
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.7.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.7.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.12.5
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.12.5
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.9.6
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.9.6
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.5.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: capybara
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.7.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.7.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.11.2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.11.2
|
139
|
+
description: OS X's iPhoto software had a feature that exported photos to a static
|
140
|
+
web site. iPhoto was discontinued in 2015. Its replacement, Photos, does not have
|
141
|
+
that feature. imagesite approximates that feature.
|
142
|
+
email: dave@schweisguth.org
|
143
|
+
executables:
|
144
|
+
- imagesite
|
145
|
+
extensions: []
|
146
|
+
extra_rdoc_files: []
|
147
|
+
files:
|
148
|
+
- Gemfile
|
149
|
+
- Gemfile.lock
|
150
|
+
- LICENSE.txt
|
151
|
+
- README.md
|
152
|
+
- Rakefile
|
153
|
+
- bin/imagesite
|
154
|
+
- imagesite.gemspec
|
155
|
+
- lib/image_site/image.rb
|
156
|
+
- lib/image_site/image_site.rb
|
157
|
+
- lib/image_site/index.rb
|
158
|
+
- lib/image_site/model.rb
|
159
|
+
- lib/image_site/options.rb
|
160
|
+
- template/Page.html.erb
|
161
|
+
- template/index.html.erb
|
162
|
+
homepage: https://github.com/dschweisguth/imagesite
|
163
|
+
licenses:
|
164
|
+
- MIT
|
165
|
+
metadata: {}
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ~>
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '2.0'
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - '>'
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 1.3.1
|
180
|
+
requirements: []
|
181
|
+
rubyforge_project:
|
182
|
+
rubygems_version: 2.0.14.1
|
183
|
+
signing_key:
|
184
|
+
specification_version: 4
|
185
|
+
summary: iPhoto-style web export for Photos
|
186
|
+
test_files: []
|