hierogloss 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.travis.yml +3 -0
- data/GARDINER-LICENSE.txt +6 -0
- data/Gemfile +4 -0
- data/KRAMDOWN-LICENSE.txt +29 -0
- data/LICENSE.txt +15 -0
- data/README.md +72 -0
- data/Rakefile +8 -0
- data/UNICODE-DATA-LICENSE.txt +15 -0
- data/UNLICENSE.txt +30 -0
- data/assets/fonts/Gardiner.eot +0 -0
- data/assets/fonts/Gardiner.otf +0 -0
- data/assets/fonts/Gardiner.svg +13593 -0
- data/assets/fonts/Gardiner.ttf +0 -0
- data/assets/fonts/Gardiner.woff +0 -0
- data/bin/hierogloss +25 -0
- data/data/Unicode-MdC-Mapping-v1.utf8 +1001 -0
- data/data/hierogloss.html.erb +55 -0
- data/examples/disjunction.md +13 -0
- data/examples/disjunction.png +0 -0
- data/examples/liverpool.md +11 -0
- data/hierogloss.gemspec +26 -0
- data/lib/hierogloss/dictionary.rb +39 -0
- data/lib/hierogloss/gloss.rb +174 -0
- data/lib/hierogloss/version.rb +3 -0
- data/lib/hierogloss.rb +24 -0
- data/lib/kramdown/converter/bbcode.rb +113 -0
- data/lib/kramdown/converter/htlal.rb +34 -0
- data/lib/kramdown/parser/hierogloss.rb +37 -0
- data/src/Gardiner.ttf +0 -0
- data/test/minitest_helper.rb +4 -0
- data/test/test_dictionary.rb +50 -0
- data/test/test_gloss.rb +43 -0
- data/test/test_hierogloss.rb +7 -0
- data/test/test_kramdown_extensions.rb +72 -0
- metadata +157 -0
Binary file
|
Binary file
|
data/bin/hierogloss
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'hierogloss'
|
5
|
+
|
6
|
+
options = { format: 'html' }
|
7
|
+
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.banner = "Usage: hierogloss [options] files..."
|
10
|
+
|
11
|
+
opts.on("-f", "--format [FORMAT]",
|
12
|
+
"Output format (html, bbcode, htlal)",
|
13
|
+
" (defaults to html)") do |format|
|
14
|
+
options[:format] = format
|
15
|
+
end
|
16
|
+
end.parse!
|
17
|
+
|
18
|
+
args = { input: 'hierogloss' }
|
19
|
+
if options[:format] == 'html'
|
20
|
+
args[:template] =
|
21
|
+
File.join(File.dirname(__FILE__), '..', 'data', 'hierogloss.html.erb')
|
22
|
+
end
|
23
|
+
|
24
|
+
doc = Kramdown::Document.new(ARGF.read, args)
|
25
|
+
puts doc.send("to_#{options[:format]}")
|