htmltoooxml 0.4.0 → 0.4.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d12ae5bf06909c848928c71822e240d56058de0dba36703665087102218f4d6
|
4
|
+
data.tar.gz: 78477ed4db7f153f7be6b6ca39870b41ba0b1c507a5c1d974da64f8471cb02af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 480484bdfc7fb53a444527c6f0f7cfc6854d6fe081bdd0031656a5b65728120071b0f7702d4e89717662870332b0895b7e2cb07b435ccc68f7e78ebaec72a66d
|
7
|
+
data.tar.gz: 5382528f32867ecf04da597d8dcb43d2611a67464a7395ee3b1cce4c68df57a6e3e583dd9f41d21b4400a10f609cc2e9d66e10d97717089a650f564537f4ccfd
|
data/lib/htmltoooxml/version.rb
CHANGED
@@ -51,25 +51,19 @@
|
|
51
51
|
</a:p>
|
52
52
|
</xsl:template>
|
53
53
|
|
54
|
-
|
55
54
|
<xsl:template match="br[not(ancestor::p) and not(ancestor::div) and not(ancestor::td|ancestor::li) or
|
56
55
|
(preceding-sibling::div or following-sibling::div or preceding-sibling::p or following-sibling::p)]">
|
57
|
-
<a:p>
|
58
|
-
<a:r></a:r>
|
59
|
-
</a:p>
|
56
|
+
<a:p><a:endParaRPr/></a:p>
|
60
57
|
</xsl:template>
|
61
58
|
|
62
59
|
<xsl:template match="br[(ancestor::li or ancestor::td) and
|
63
60
|
(preceding-sibling::div or following-sibling::div or preceding-sibling::p or following-sibling::p)]">
|
64
|
-
<
|
65
|
-
|
66
|
-
</a:r>
|
61
|
+
<xsl:apply-templates />
|
62
|
+
<a:p><a:endParaRPr/></a:p>
|
67
63
|
</xsl:template>
|
68
64
|
|
69
65
|
<xsl:template match="br">
|
70
|
-
<a:
|
71
|
-
<a:br />
|
72
|
-
</a:r>
|
66
|
+
<a:p><a:endParaRPr/></a:p>
|
73
67
|
</xsl:template>
|
74
68
|
|
75
69
|
<xsl:template match="pre">
|
@@ -81,6 +75,14 @@
|
|
81
75
|
<xsl:template match="div[not(ancestor::li) and not(ancestor::td) and not(ancestor::th) and not(ancestor::p) and not(descendant::div) and not(descendant::p) and not(descendant::h1) and not(descendant::h2) and not(descendant::h3) and not(descendant::h4) and not(descendant::h5) and not(descendant::h6) and not(descendant::table) and not(descendant::li) and not (descendant::pre)]">
|
82
76
|
<xsl:comment>Divs should create a p if nothing above them has and nothing below them will</xsl:comment>
|
83
77
|
<a:p>
|
78
|
+
<a:pPr>
|
79
|
+
<a:spcBef>
|
80
|
+
<a:spcPts val="200"/>
|
81
|
+
</a:spcBef>
|
82
|
+
<a:spcAft>
|
83
|
+
<a:spcPts val="600"/>
|
84
|
+
</a:spcAft>
|
85
|
+
</a:pPr>
|
84
86
|
<xsl:call-template name="text-alignment" />
|
85
87
|
<xsl:apply-templates />
|
86
88
|
</a:p>
|
@@ -94,6 +96,14 @@
|
|
94
96
|
<xsl:template match="body/h1|body/h2|body/h3|body/h4|body/h5|body/h6|h1|h2|h3|h4|h5|h6">
|
95
97
|
<xsl:variable name="length" select="string-length(name(.))"/>
|
96
98
|
<a:p>
|
99
|
+
<a:pPr>
|
100
|
+
<a:spcBef>
|
101
|
+
<a:spcPts val="200"/>
|
102
|
+
</a:spcBef>
|
103
|
+
<a:spcAft>
|
104
|
+
<a:spcPts val="600"/>
|
105
|
+
</a:spcAft>
|
106
|
+
</a:pPr>
|
97
107
|
<a:r>
|
98
108
|
<a:rPr b="1" dirty="0"/>
|
99
109
|
<a:t><xsl:value-of select="."/></a:t>
|
@@ -103,6 +113,14 @@
|
|
103
113
|
|
104
114
|
<xsl:template match="p[not(ancestor::li)]">
|
105
115
|
<a:p>
|
116
|
+
<a:pPr>
|
117
|
+
<a:spcBef>
|
118
|
+
<a:spcPts val="200"/>
|
119
|
+
</a:spcBef>
|
120
|
+
<a:spcAft>
|
121
|
+
<a:spcPts val="600"/>
|
122
|
+
</a:spcAft>
|
123
|
+
</a:pPr>
|
106
124
|
<xsl:call-template name="text-alignment" />
|
107
125
|
<xsl:apply-templates />
|
108
126
|
</a:p>
|
@@ -259,9 +277,7 @@
|
|
259
277
|
|
260
278
|
<xsl:template match="div[contains(concat(' ', @class, ' '), ' -page-break ')]">
|
261
279
|
<a:p>
|
262
|
-
<a:
|
263
|
-
<a:br a:type="page" />
|
264
|
-
</a:r>
|
280
|
+
<a:endParaRPr/>
|
265
281
|
</a:p>
|
266
282
|
<xsl:apply-templates />
|
267
283
|
</xsl:template>
|
@@ -271,23 +287,19 @@
|
|
271
287
|
<xsl:template match="text()">
|
272
288
|
<xsl:if test="string-length(.) > 0">
|
273
289
|
<a:r>
|
274
|
-
<xsl:if test="ancestor::i">
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
<a:rPr dirty="0"/>
|
288
|
-
</xsl:if>
|
289
|
-
<xsl:if test="ancestor::sup">
|
290
|
-
<a:rPr dirty="0"/>
|
290
|
+
<xsl:if test="ancestor::i | ancestor::b | ancestor::u | ancestor::s | ancestor::sub | ancestor::sup">
|
291
|
+
<xsl:element name="a:rPr">
|
292
|
+
<xsl:attribute name="dirty">0</xsl:attribute>
|
293
|
+
<xsl:if test="ancestor::i">
|
294
|
+
<xsl:attribute name="i">1</xsl:attribute>
|
295
|
+
</xsl:if>
|
296
|
+
<xsl:if test="ancestor::b">
|
297
|
+
<xsl:attribute name="b">1</xsl:attribute>
|
298
|
+
</xsl:if>
|
299
|
+
<xsl:if test="ancestor::u">
|
300
|
+
<xsl:attribute name="u">sng</xsl:attribute>
|
301
|
+
</xsl:if>
|
302
|
+
</xsl:element>
|
291
303
|
</xsl:if>
|
292
304
|
<a:t><xsl:value-of select="."/></a:t>
|
293
305
|
</a:r>
|
@@ -30,6 +30,9 @@
|
|
30
30
|
<xsl:template match="p">
|
31
31
|
<a:p>
|
32
32
|
<a:pPr marL="0" indent="0">
|
33
|
+
<a:spcBef>
|
34
|
+
<a:spcPts val="200"/>
|
35
|
+
</a:spcBef>
|
33
36
|
<a:spcAft>
|
34
37
|
<a:spcPts val="600"/>
|
35
38
|
</a:spcAft>
|
@@ -304,4 +307,4 @@
|
|
304
307
|
</a:pPr>
|
305
308
|
</xsl:if>
|
306
309
|
</xsl:template>
|
307
|
-
</xsl:stylesheet>
|
310
|
+
</xsl:stylesheet>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
2
2
|
<xsl:output encoding="utf-8" omit-xml-declaration="yes" indent="yes" />
|
3
3
|
|
4
|
-
<xsl:
|
4
|
+
<xsl:preserve-space elements="p div span b i u s sub sup a"/>
|
5
5
|
|
6
6
|
<xsl:template match="node()|@*">
|
7
7
|
<xsl:copy>
|
@@ -37,4 +37,4 @@
|
|
37
37
|
</xsl:copy>
|
38
38
|
<xsl:apply-templates select="following-sibling::node()[1][self::a|self::b|self::i|self::s|self::span|self::sub|self::sup|self::u|self::text()]"/>
|
39
39
|
</xsl:template>
|
40
|
-
</xsl:stylesheet>
|
40
|
+
</xsl:stylesheet>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmltoooxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Boynton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,7 +115,7 @@ homepage: https://github.com/stylefoundry
|
|
115
115
|
licenses:
|
116
116
|
- MIT
|
117
117
|
metadata: {}
|
118
|
-
post_install_message:
|
118
|
+
post_install_message:
|
119
119
|
rdoc_options: []
|
120
120
|
require_paths:
|
121
121
|
- lib
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubygems_version: 3.0.3
|
134
|
-
signing_key:
|
134
|
+
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Parse HTML and convert to open office xml for powerpoint
|
137
137
|
test_files: []
|