polytexnic 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bin/polytexnic +16 -13
- data/lib/polytexnic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5019c283b39dc25f4f2ff80cda181c78c5d77e37b7245faf92c51cfee93bc35
|
4
|
+
data.tar.gz: 2c8d5e978e45e28ec12f0b0010ad6f701d5982e15469fedc3291861b09132d2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 127fb2ef04c1d0a1d6848f0c8ad540cccc23c7bb7c680b9ea2460e63b74e699af5cf30b10f594d039f3464b43da088b9aa098c9274ba6f5ac020e50e85779e19
|
7
|
+
data.tar.gz: 6ed16fb665fdba858cce00d8c420dffc3f02284384ddd5830c7e3caccdf0b189c569c40c949dca7f85a060f239c9f4642261166d65cbd5612416ccb1088fe21c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
polytexnic (1.6.
|
4
|
+
polytexnic (1.6.3)
|
5
5
|
json (~> 2.3.0)
|
6
6
|
kramdown (>= 1.17, < 3.0)
|
7
7
|
msgpack (~> 1.2.0)
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
debugger-linecache (~> 1.2.0)
|
26
26
|
diff-lcs (1.4.4)
|
27
27
|
docile (1.1.5)
|
28
|
-
ffi (1.
|
28
|
+
ffi (1.15.0)
|
29
29
|
formatador (0.2.5)
|
30
30
|
growl (1.0.3)
|
31
31
|
guard (2.16.2)
|
data/bin/polytexnic
CHANGED
@@ -40,23 +40,26 @@ end.parse!
|
|
40
40
|
# Returns the file format based on extension.
|
41
41
|
# Should be 'html' or 'tex'.
|
42
42
|
def format(filename)
|
43
|
-
puts '***********'
|
44
|
-
puts '***********'
|
45
|
-
puts '***********'
|
46
|
-
puts '***********'
|
47
|
-
puts '***********'
|
48
|
-
p filename.split('.')
|
49
43
|
filename.split('.').last
|
50
44
|
rescue
|
51
45
|
nil
|
52
46
|
end
|
53
47
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
48
|
+
# Defines a valid HTML template.
|
49
|
+
def html_template(title, body)
|
50
|
+
%(<!DOCTYPE html>
|
51
|
+
<html>
|
52
|
+
<head>
|
53
|
+
<title>#{title}</title>
|
54
|
+
<meta charset="utf-8">
|
55
|
+
</head>
|
56
|
+
<body>
|
57
|
+
#{body}
|
58
|
+
</body>
|
59
|
+
</html>
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
60
63
|
if (infile = options[:infile] || ARGV.shift)
|
61
64
|
puts infile
|
62
65
|
input = File.read(infile)
|
@@ -68,7 +71,7 @@ puts outfile
|
|
68
71
|
pipeline = Polytexnic::Pipeline.new(input, article: true)
|
69
72
|
format = options[:format] || format(outfile) || "html"
|
70
73
|
if format == "html"
|
71
|
-
output = pipeline.to_html
|
74
|
+
output = html_template("HTML output", pipeline.to_html)
|
72
75
|
elsif format == "tex"
|
73
76
|
output = pipeline.to_polytex
|
74
77
|
else
|
data/lib/polytexnic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polytexnic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-03-
|
12
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|