mdpdf 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f98dd96a6821de291ce3f26b702f9816357cbbac78d63f8376c7e61d8b85556b
4
- data.tar.gz: a74dbf46a02b912607c006ce1c1b5092b0bca8917d7460eae230cc8844914f3c
3
+ metadata.gz: 3af16489c853833efac6bfb85c6abfc930df0a441ac2a2d4a58838df069f92cb
4
+ data.tar.gz: 76da37f1daee282418376f4b1641c6cdad0fd5d499e1ccf0ece5e08f93feeb44
5
5
  SHA512:
6
- metadata.gz: 213ecab55233dc713ce0b9d5664c3f964090ec010f717b1f6923e0080b105725c1d84cd6b0266d6305d5a48cd2df17aa7386b2a4a4f066a3ce15106b36c9bd20
7
- data.tar.gz: 6e425598e3fcb355f1309fdfe0fe9db172baba26eca2ec9a737c4fa13a75adb3fad3f76ed6088b42c2cb2a967fbd91664275c571c10b32a9abb6186be804d6f8
6
+ metadata.gz: 1e7bd809c7ee2ffa32a01d2bb3671bf384036d863e112acd6b9b954edbb1cc0166f0de3113d32172bad7f3f55da561678b2d7dae950eb00dd73ea11df3a643ac
7
+ data.tar.gz: '09bd80d92af243e30f15a18a27a3959f493c77e48b476b5e0958752ef80f56528d7a5459f7d6db2e2cf3f6476feb10919b15e8a50a3130bd3f0cebc9098dc726'
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Mdpdf
2
+ Writting markdown file,it's convert to PDF
3
+ this mdpdf it can easy markdown file pdf convert
4
+ if There was a bug. please issues or pull request
2
5
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mdpdf`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
6
 
7
7
  ## Installation
8
8
 
data/exe/mdpdf CHANGED
@@ -2,16 +2,32 @@
2
2
 
3
3
  require 'mdpdf'
4
4
 
5
- if ARGV[0].nil?
6
- puts "argment error"
7
- else
8
- mdfile_name = ARGV[0]
5
+ def errmsg
6
+ err_msg = <<-EOS
7
+ 1st argment is MarkDown file name or options \n
8
+ 2nd argment is outs PDF fine name \n
9
+ OPTION: \n
10
+ -v => version \n
11
+ -h => help\n
12
+ EOS
13
+
14
+ STDERR.print err_msg
9
15
  end
10
16
 
11
- if ARGV[1].nil?
12
- puts "argment error"
13
- else
17
+ if ARGV.length == 2
18
+ mdfile_name = ARGV[0]
14
19
  outpdf_name = ARGV[1]
20
+ elsif ARGV.length == 1
21
+ argv = ARGV[0]
22
+ case argv
23
+ when '-v'
24
+ puts "mdpdf version is #{Mdpdf::VERSION} "
25
+ when '-h'
26
+ errmsg
27
+ else
28
+ errmsg
29
+ end
30
+ else
31
+ errmsg
15
32
  end
16
33
 
17
- Mdpdf::Md2Pdf.new(mdfile_name,outpdf_name)
@@ -20,7 +20,7 @@ module Mdpdf
20
20
  end
21
21
 
22
22
  def creat_md(html_body)
23
- markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :tables => true, :autolink => true)
23
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :tables => true, :autolink => true,:fenced_code_blocks => true)
24
24
  body = markdown.render(html_body)
25
25
  html_template = "
26
26
  <!DOCTYP html>
@@ -1,3 +1,3 @@
1
1
  module Mdpdf
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdpdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - '723'
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler