jekyll-pdf-thumbnail 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/jekyll-pdf-thumbnail.rb +3 -4
- metadata +2 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aa634af38ffa22e2b31b0710d02544aeb1448ba322861049f3df1a1caf71999
|
4
|
+
data.tar.gz: a29926988e56c70194d8f3822ff282c02444665dff20123aab60cec16f2b9295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a0be4b925cf86697ba75aad72c448ad35bd20c28c861e3154e34f0deb0382e20a3d9f81c315160205e1f2f8acf6c679426c7e9889d6eabfea9fbb380a0ee94d
|
7
|
+
data.tar.gz: c63da7b588b7279ce58ad7c486d2a565d38cb03e4b479618acb9612f4c05a44da36df524b8434004900080ee43eb30c09620ce25cda4ed6c4f53357295efd54b
|
data/README.md
CHANGED
@@ -42,3 +42,17 @@ A Jekyll plugin to generate thumbnails for your PDF files
|
|
42
42
|
- The format of the `resize` parameter is the **image geometry** as defined in the [ImageMagick manual](https://imagemagick.org/script/command-line-processing.php#geometry).
|
43
43
|
- The format of the `quality` parameter is a number between 1 and 100 as defined in the [Image Magick manual](https://imagemagick.org/script/command-line-options.php#quality). Currently, only png thumbnails are supported. According to the manual:
|
44
44
|
> ... the quality value sets the zlib compression level (quality / 10) and filter-type (quality % 10). The default PNG "quality" is 75, which means compression level 7 with adaptive PNG filtering, unless the image has a color map, in which case it means compression level 7 with no PNG filtering.
|
45
|
+
|
46
|
+
## Developing this extension
|
47
|
+
|
48
|
+
- **Setup**: Clone the extension and execute `bundle install` to install the dependencies
|
49
|
+
- **Run tests**: ``bundle exec rspec``
|
50
|
+
- **Releasing a new version**
|
51
|
+
- Update [jekyll-pdf-thumbnail.gemspec](jekyll-pdf-thumbnail.gemspec) with new version and metadata.
|
52
|
+
- Commit your changes.
|
53
|
+
- Create a new git tag: `git tag -a vx.y.z -m "Version x.y.z"`
|
54
|
+
- Push all the changes to github: `git push origin && git push origin --tags`
|
55
|
+
- Build the Gem: ``gem build``
|
56
|
+
- Upload the new gem: ``gem push jekyll-pdf-thumbnail-x.y.z.gem``
|
57
|
+
|
58
|
+
|
data/lib/jekyll-pdf-thumbnail.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'pdftoimage'
|
2
2
|
require 'jekyll'
|
3
3
|
require "digest"
|
4
|
-
require 'debug'
|
5
4
|
|
6
5
|
|
7
6
|
module PDFThumbnail
|
@@ -86,9 +85,9 @@ module PDFThumbnail
|
|
86
85
|
if _must_create?(full_pdf_path, full_thumb_path)
|
87
86
|
puts "Creating thumbnail of' #{pdf}' to '#{rel_thumb_path}'"
|
88
87
|
generate_thumbnail(full_pdf_path, full_thumb_path, resize, quality)
|
89
|
-
# site - The Site.
|
90
|
-
# base - The String path to the <source>.
|
91
|
-
# dir - The String path between <source> and the file.
|
88
|
+
# site - The Site.
|
89
|
+
# base - The String path to the <source>.
|
90
|
+
# dir - The String path between <source> and the file.
|
92
91
|
# name - The String filename of the file.
|
93
92
|
site.static_files << Jekyll::StaticFile.new(site, site.source, CACHE_DIR, thumbnail)
|
94
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-pdf-thumbnail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noe Nieto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pdftoimage
|
@@ -72,26 +72,6 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '3.8'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: debug
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.0'
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 1.0.0
|
85
|
-
type: :development
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '1.0'
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 1.0.0
|
95
75
|
description: This plugin generates thumbnails for each PDF in your site using the
|
96
76
|
pdftoimage gem
|
97
77
|
email: nnieto@noenieto.com
|