polytexnic 1.5.11 → 1.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/polytexnic +19 -0
- data/lib/polytexnic/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e6ec9fc92f6233685ff0d2cebe269fb593e7b771fc6e47eb941e11e31ed77f1
|
4
|
+
data.tar.gz: 56cc737c25b427592d20225da877e5c8cdb944e766a56a10c03304ab598ecfaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48f59f7ef253b1734fd0810d2d461715db32ea5e35e9aa48a07569684e9dd0dc01842517dac5a32052bd79f15847c28bfb16663aba183c33899d3c697f6357c7
|
7
|
+
data.tar.gz: 450de341388bd5028d2aebcf311eb03ca864e36f2e0cdb73b64da60c1b2e7f7dbf29253b0dea3a039815b57da399d8f227cd88b8544f5ecd4fe8b9c9a423e0a3
|
data/bin/polytexnic
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "polytexnic"
|
3
|
+
|
4
|
+
def latex_to_html(latex)
|
5
|
+
Polytexnic::Pipeline.new(latex, article: true).to_html
|
6
|
+
end
|
7
|
+
|
8
|
+
if ARGV.empty?
|
9
|
+
puts latex_to_html(STDIN.read)
|
10
|
+
else
|
11
|
+
filename = ARGV.shift
|
12
|
+
latex = File.read(filename)
|
13
|
+
html = latex_to_html(latex)
|
14
|
+
if (outfile = ARGV.shift)
|
15
|
+
File.write(outfile, html)
|
16
|
+
else
|
17
|
+
puts html.strip
|
18
|
+
end
|
19
|
+
end
|
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.5.
|
4
|
+
version: 1.5.12
|
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: 2019-08-
|
12
|
+
date: 2019-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -112,7 +112,8 @@ dependencies:
|
|
112
112
|
description: Core translation engine for the polytexnic gem
|
113
113
|
email:
|
114
114
|
- michael@softcover.io
|
115
|
-
executables:
|
115
|
+
executables:
|
116
|
+
- polytexnic
|
116
117
|
extensions: []
|
117
118
|
extra_rdoc_files: []
|
118
119
|
files:
|
@@ -212,6 +213,7 @@ files:
|
|
212
213
|
- LICENSE.md
|
213
214
|
- README.md
|
214
215
|
- Rakefile
|
216
|
+
- bin/polytexnic
|
215
217
|
- lib/polytexnic.rb
|
216
218
|
- lib/polytexnic/code_inclusion.rb
|
217
219
|
- lib/polytexnic/literal.rb
|