polytexnic 1.5.11 → 1.5.12

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: 20597ab7bf85452c306f4b946358493223bdf74cbd490956edb2f0492469a0ad
4
- data.tar.gz: 52e6bee61c9a7274c9c5fe245508da30bff1920a65087f145c08a0105b6235d1
3
+ metadata.gz: 0e6ec9fc92f6233685ff0d2cebe269fb593e7b771fc6e47eb941e11e31ed77f1
4
+ data.tar.gz: 56cc737c25b427592d20225da877e5c8cdb944e766a56a10c03304ab598ecfaa
5
5
  SHA512:
6
- metadata.gz: 4262caa4420893022e3e12316b5881c0db41921c1a68fe7585d91a6660ac000ddf357fabaa8893936142c5b9400859793d757bc8f7bcc1d61b9b407569b6dcea
7
- data.tar.gz: b2b7435dfa5196b9b70dacbf4255d1998886b85ba32e57e5eb853860cb179161c0bae5c0dcdf828892362ee0aa31d1cdb7e7920f54b5ade5f51297f10d2bd73e
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
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.5.11"
2
+ VERSION = "1.5.12"
3
3
  end
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.11
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-05 00:00:00.000000000 Z
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