pdftohtml 0.2.3 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23cab5f7ee4c5176f96b20b8206bf878c9c257b9
4
- data.tar.gz: fc1ab3d7136b7a36b52b8c155379ca0606e60147
3
+ metadata.gz: 453ad8317072fa31527a050f6d361bdd29f8ec57
4
+ data.tar.gz: 1ad71159091f1cc2e88b47222e36f89274c34e2b
5
5
  SHA512:
6
- metadata.gz: 95767068ba4051b0225a9b4b6d2f08d127749601f4978bace5e12c5b85b61fd2bf88201f0d18a9c6fe87e1cf27a396284362c4c97c24814f4c998198c039de25
7
- data.tar.gz: 7ee3951db59384a52d7363e50b6056cc7a44116461bfd9f5f138090f6e1e28e9202d17bc0aa6d5568a93764a6d86445759311774cf35f803b5b56187ebfa6c19
6
+ metadata.gz: d0ce4b8708f0aa3c960f016c10e73e4e34e456ade6938b1215a5e0ab12815da50efa8cb80ed9ed0ead57822e360a52027abf4e59c546a370034b18f282c406f6
7
+ data.tar.gz: 9f9bf15a1b28bc563b863a1cd939e0864751bcf6a01612ee414e2abc64f7419b75eb4d2dba5df783e5b18849661cf0c9da247a302ad54a3266695a92b0aa8304
data/README.md CHANGED
@@ -1,8 +1,36 @@
1
1
  # PDF To HTML
2
2
 
3
- Simplistic wrapper around poppler's <i>pdftohtml</i> utility.
3
+ Simplistic wrapper around poppler's *pdftohtml* utility.
4
4
  Allows conversion of PDF files into HTML documents.
5
5
 
6
+ ## Presentation
7
+
8
+ This library provides an easy-to-use interface to the *pdftohtml* utility provided by the [Poppler](https://poppler.freedesktop.org/) package.
9
+
10
+ ## Installation
11
+
12
+ ### Gemfile
13
+ ```ruby
14
+ gem 'pdftohtml'
15
+ ```
16
+
17
+ ### Terminal
18
+ ```bash
19
+ gem install -V pdftohtml
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ Converting a PDF document is as simple as:
25
+
26
+ ```ruby
27
+ Pdftohtml.convert 'example.pdf'
28
+ # => { 1 => ["<!DOCTYPE html>", "<html>", ...] }
29
+ ```
30
+
31
+ The output of the *convert* method is a hash of pages from the PDF file: { 1 => [...], 2 => [...] }
32
+ Each page is an array of lines.
33
+
6
34
  ## License
7
35
 
8
36
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -4,10 +4,14 @@
4
4
  # External Includes
5
5
  require 'fileutils'
6
6
 
7
- # PDF To HTML Module
7
+ # PDF To HTML Module:
8
+ # Root Module for Pdftohtml.
8
9
  module Pdftohtml
9
10
 
10
- # Convert PDF to HTML
11
+ # Convert PDF to HTML:
12
+ # Converts the file pointed to by pdf_file into a hash of HTML pages.
13
+ # @param [String] pdf_file Path to a PDF file
14
+ # @return [Hash] A hash of HTML Pages { 0 => ['Line0', 'Line1', ...], 1 => ['Line0', 'Line1', ...], ... }
11
15
  def self.convert pdf_file
12
16
 
13
17
  # Generate Output Directory
@@ -5,5 +5,5 @@
5
5
  module Pdftohtml
6
6
 
7
7
  # Version
8
- VERSION = '0.2.3'
8
+ VERSION = '1.0.0'
9
9
  end
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.12"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_runtime_dependency 'minitest'
24
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdftohtml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-09 00:00:00.000000000 Z
11
+ date: 2017-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Simplistic wrapper around poppler's pdftohtml utility
42
56
  email:
43
57
  - eresse@eresse.net