ydocx 1.2.4 → 1.2.5
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.
- data/History.txt +4 -0
- data/lib/ydocx.rb +1 -1
- data/lib/ydocx/document.rb +3 -3
- metadata +71 -51
- checksums.yaml +0 -15
data/History.txt
CHANGED
data/lib/ydocx.rb
CHANGED
data/lib/ydocx/document.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# encoding: utf-8
|
|
3
3
|
|
|
4
4
|
require 'pathname'
|
|
5
|
-
require 'zip
|
|
5
|
+
require 'zip'
|
|
6
6
|
begin
|
|
7
7
|
require 'RMagick'
|
|
8
8
|
rescue LoadError
|
|
@@ -83,7 +83,7 @@ module YDocx
|
|
|
83
83
|
def create_files
|
|
84
84
|
files_dir = output_directory
|
|
85
85
|
mkdir Pathname.new(files_dir) unless files_dir.exist?
|
|
86
|
-
@zip = Zip::
|
|
86
|
+
@zip = Zip::File.open(@path.realpath)
|
|
87
87
|
@images.each do |image|
|
|
88
88
|
origin_path = Pathname.new image[:origin] # media/filename.ext
|
|
89
89
|
source_path = Pathname.new image[:source] # images/filename.ext
|
|
@@ -118,7 +118,7 @@ module YDocx
|
|
|
118
118
|
end
|
|
119
119
|
def read(file)
|
|
120
120
|
@path = Pathname.new file
|
|
121
|
-
@zip = Zip::
|
|
121
|
+
@zip = Zip::File.open(@path.realpath)
|
|
122
122
|
doc = @zip.find_entry('word/document.xml').get_input_stream
|
|
123
123
|
rel = @zip.find_entry('word/_rels/document.xml.rels').get_input_stream
|
|
124
124
|
@parser = Parser.new(doc, rel) do |parser|
|
metadata
CHANGED
|
@@ -1,56 +1,65 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ydocx
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 21
|
|
5
|
+
prerelease:
|
|
6
|
+
segments:
|
|
7
|
+
- 1
|
|
8
|
+
- 2
|
|
9
|
+
- 5
|
|
10
|
+
version: 1.2.5
|
|
5
11
|
platform: ruby
|
|
6
|
-
authors:
|
|
12
|
+
authors:
|
|
7
13
|
- Yasuhiro Asaka, Zeno R.R. Davatz
|
|
8
14
|
autorequire:
|
|
9
15
|
bindir: bin
|
|
10
16
|
cert_chain: []
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
|
|
18
|
+
date: 2014-07-07 00:00:00 Z
|
|
19
|
+
dependencies:
|
|
20
|
+
- !ruby/object:Gem::Dependency
|
|
14
21
|
name: rdoc
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ~>
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '4.0'
|
|
20
|
-
type: :development
|
|
21
22
|
prerelease: false
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
24
|
+
none: false
|
|
25
|
+
requirements:
|
|
24
26
|
- - ~>
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- - ~>
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '3.6'
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
hash: 27
|
|
29
|
+
segments:
|
|
30
|
+
- 4
|
|
31
|
+
- 0
|
|
32
|
+
version: "4.0"
|
|
34
33
|
type: :development
|
|
34
|
+
version_requirements: *id001
|
|
35
|
+
- !ruby/object:Gem::Dependency
|
|
36
|
+
name: hoe
|
|
35
37
|
prerelease: false
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
39
|
+
none: false
|
|
40
|
+
requirements:
|
|
38
41
|
- - ~>
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
hash: 11
|
|
44
|
+
segments:
|
|
45
|
+
- 3
|
|
46
|
+
- 6
|
|
47
|
+
version: "3.6"
|
|
48
|
+
type: :development
|
|
49
|
+
version_requirements: *id002
|
|
50
|
+
description: ""
|
|
51
|
+
email:
|
|
43
52
|
- yasaka@ywesee.com, zdavatz@ywesee.com
|
|
44
|
-
executables:
|
|
53
|
+
executables:
|
|
45
54
|
- docx2html
|
|
46
55
|
- docx2xml
|
|
47
56
|
extensions: []
|
|
48
|
-
|
|
57
|
+
|
|
58
|
+
extra_rdoc_files:
|
|
49
59
|
- History.txt
|
|
50
60
|
- Manifest.txt
|
|
51
61
|
- README.txt
|
|
52
|
-
files:
|
|
53
|
-
- .gemtest
|
|
62
|
+
files:
|
|
54
63
|
- History.txt
|
|
55
64
|
- Manifest.txt
|
|
56
65
|
- README.txt
|
|
@@ -59,35 +68,46 @@ files:
|
|
|
59
68
|
- bin/docx2xml
|
|
60
69
|
- lib/ydocx.rb
|
|
61
70
|
- lib/ydocx/builder.rb
|
|
62
|
-
- lib/ydocx/command.rb
|
|
63
71
|
- lib/ydocx/document.rb
|
|
64
72
|
- lib/ydocx/markup_method.rb
|
|
65
73
|
- lib/ydocx/parser.rb
|
|
74
|
+
- lib/ydocx/command.rb
|
|
66
75
|
- lib/ydocx/templates/fachinfo.rb
|
|
67
76
|
- lib/ydocx/templates/patinfo.rb
|
|
77
|
+
- .gemtest
|
|
68
78
|
homepage: https://github.com/zdavatz/ydocx
|
|
69
79
|
licenses: []
|
|
70
|
-
|
|
80
|
+
|
|
71
81
|
post_install_message:
|
|
72
|
-
rdoc_options:
|
|
82
|
+
rdoc_options:
|
|
73
83
|
- --main
|
|
74
84
|
- README.txt
|
|
75
|
-
require_paths:
|
|
85
|
+
require_paths:
|
|
76
86
|
- lib
|
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
|
+
none: false
|
|
89
|
+
requirements:
|
|
90
|
+
- - ">="
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
hash: 3
|
|
93
|
+
segments:
|
|
94
|
+
- 0
|
|
95
|
+
version: "0"
|
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
|
+
none: false
|
|
98
|
+
requirements:
|
|
99
|
+
- - ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
hash: 3
|
|
102
|
+
segments:
|
|
103
|
+
- 0
|
|
104
|
+
version: "0"
|
|
87
105
|
requirements: []
|
|
106
|
+
|
|
88
107
|
rubyforge_project: ydocx
|
|
89
|
-
rubygems_version:
|
|
108
|
+
rubygems_version: 1.8.25
|
|
90
109
|
signing_key:
|
|
91
|
-
specification_version:
|
|
92
|
-
summary:
|
|
110
|
+
specification_version: 3
|
|
111
|
+
summary: ""
|
|
93
112
|
test_files: []
|
|
113
|
+
|
checksums.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
!binary "U0hBMQ==":
|
|
3
|
-
metadata.gz: !binary |-
|
|
4
|
-
ODg5ZmE1ODM1YTJlMjllZTJiMmMyYzAxNGM0MTQ0NGQ1YzA0NjRkNg==
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
MjZiOGM3NGVhMGMyNDQxODQyNjgwZTJjOWViOTZhNzE2OWMxODBlMg==
|
|
7
|
-
SHA512:
|
|
8
|
-
metadata.gz: !binary |-
|
|
9
|
-
OGI0ZDRlNDFlOGEwMWMxN2U5ZjA5NGZkMTJjMzZkMzA4ODdhZWIzMmVhNDA2
|
|
10
|
-
ZmM4NWRjZmNlMWMxYTIxOTRkNTcyYTc4NGQ2ZjNjOWIzNWI0YTZjNTE4ZWE5
|
|
11
|
-
NTI1MWQ2MmYzNjUwOWUxNGQ0NjhmNGEwNGE0ZWJmZjNlNjZiOTk=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
ZDRmNmY3NTk5NTllZGQzMzU4NDA1ODU1MTRlYTg2ZWU5ODgyMzNlMTBiNWMx
|
|
14
|
-
NzY1ZDAyNzgxZDY3ZTk4ZTIwYjVlZWYwYWY3MDQzMjg2OTg2M2VkMmRjMDVm
|
|
15
|
-
Njc4Yjc2NGU4NmMxNjdlMDgxOTQ4M2UyMmFhMzc2YzVkMDdhNWM=
|