gyazz-markup 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 58e314752f4b892c06667aca81310ca64bad1c8c
4
- data.tar.gz: 2bbf2129f76d622c6e02207b76d91162ebd66259
3
+ metadata.gz: 7b35c60ff1b1ca1a396bfcc23e8b8b69fa856866
4
+ data.tar.gz: cffdec0efd0d223e7a3977b4b893e52b2bc84011
5
5
  SHA512:
6
- metadata.gz: 1d83085b2af85d03ec7e21012e02757fadd89da875c3b1057bd0f3e082b6e10c51edfacd696fe45448c9bb9a7bcf20f58bb48c09bc7af43c98442b52092237db
7
- data.tar.gz: 66e4b88eed7ab9a6869fc22dcc4e881f5258394fc1a8b6efc060713e30cb48eb25b369e3e70cd8f5ed46ce56942c3c51b9158bdf310cefec9a8b9cde2c4adf65
6
+ metadata.gz: 2e0f98ac36d6fbe7e95ccbf523a478a5dcb63f0ec140a1fcac7995f0371e48bd2b37652c7376d0072c7da332d7c4cacbc082eac992eed1ac0e933a2bdf89e81a
7
+ data.tar.gz: 580de3d1ccf20f86bf0f33b61eabdb5f8235bd1c1b03bf9483c2510adbbfb402eef2196312d21ad9387ffb729d2578ff4c904b10ad08ca88364cb4a88c3bde80
@@ -1,3 +1,7 @@
1
+ === 0.1.4 2013-04-08
2
+
3
+ * rename option --indent => --listtag
4
+
1
5
  === 0.1.3 2013-04-08
2
6
 
3
7
  * update gyazz-markup command
data/README.md CHANGED
@@ -29,7 +29,7 @@ options
29
29
  gm = GyazzMarkup::Markup.new(
30
30
  :host => 'http://gyazz.com',
31
31
  :wiki => 'shokai'
32
- :indent => 'div',
32
+ :listtag => 'div',
33
33
  :prefix => '-'
34
34
  )
35
35
  puts gm.markup str
@@ -57,9 +57,9 @@ wikilink [[shokai::かずすけ]]
57
57
  ```
58
58
 
59
59
  % gyazz-markup --help
60
- % gyazz-markup -i samples/sample.txt
60
+ % gyazz-markup -i samples/sample.txt -li div -prefix "-"
61
61
 
62
- <img src="http://shokai.org/archive/file/780a435810de562eed7fc4be802ca180.png">
62
+ <img src="http://shokai.org/archive/file/507156117820b62bab54dc185883d9d3.png">
63
63
 
64
64
 
65
65
  Test
@@ -10,23 +10,23 @@ parser = ArgsParser.parse ARGV do
10
10
  arg :output, 'output file', :alias => :o
11
11
  arg :wiki, 'wiki name', :default => 'test'
12
12
  arg :host, 'host name', :default => 'http://gyazz.com'
13
- arg :indent, 'list indent tag'
13
+ arg :listtag, 'list tag', :alias => :li
14
14
  arg :prefix, 'list prefix'
15
15
  arg :help, 'show help', :alias => :h
16
16
  end
17
17
 
18
18
  if parser.has_option? :help or !parser.has_param? :input
19
- STDERR.puts "gyazz-markup - convert gyazz syntax to HTML (v#{GyazzMarkup::VERSION} )"
19
+ STDERR.puts "gyazz-markup - convert Gyazz.com syntax to HTML (v#{GyazzMarkup::VERSION})"
20
20
  STDERR.puts " https://github.com/shokai/gyazz-markup"
21
21
  STDERR.puts parser.help
22
22
  STDERR.puts
23
23
  STDERR.puts "e.g."
24
24
  STDERR.puts " gyazz-markup -i input.txt"
25
- STDERR.puts " gyazz-markup -i input.txt -wiki shokai -indent div -prefix \"-\""
25
+ STDERR.puts " gyazz-markup -i input.txt -wiki shokai -li div -prefix \"-\""
26
26
  exit 1
27
27
  end
28
28
 
29
- if parser.has_param? :indent
29
+ if parser.has_param? :listtag
30
30
  puts '<style type="text/css">'
31
31
  0.upto(5).each do |i|
32
32
  puts ".gyazz_indent#{i}{ margin-left : #{i*20}px; }"
@@ -38,6 +38,6 @@ txt = open(parser[:input]).read
38
38
  puts GyazzMarkup::Markup.new(
39
39
  :wiki => parser[:wiki],
40
40
  :host => parser[:host],
41
- :indent => parser[:indent],
41
+ :listtag => parser[:listtag],
42
42
  :prefix => parser[:prefix]
43
43
  ).markup(txt)
@@ -28,15 +28,15 @@ module GyazzMarkup
28
28
  line = markup_url line
29
29
  line = markup_wiki_link line
30
30
  line = markup_inner_link line
31
- line = markup_indent line
31
+ line = markup_listtag line
32
32
  end
33
33
  end
34
34
 
35
- def markup_indent(str)
36
- return str unless options[:indent]
35
+ def markup_listtag(str)
36
+ return str unless options[:listtag]
37
37
  indent_count = str.scan(/^(\s*).*$/)[0][0].size
38
38
  prefix = "#{options[:prefix]} " if options[:prefix]
39
- "<#{options[:indent]} class=\"gyazz_indent#{indent_count}\">#{prefix}#{str.strip}</#{options[:indent]}>"
39
+ "<#{options[:listtag]} class=\"gyazz_indent#{indent_count}\">#{prefix}#{str.strip}</#{options[:listtag]}>"
40
40
  end
41
41
 
42
42
  def markup_image(str)
@@ -5,7 +5,7 @@ module GyazzMarkup
5
5
  {
6
6
  :host => 'http://gyazz.com',
7
7
  :wiki => 'test',
8
- :indent => nil,
8
+ :listtag => nil,
9
9
  :prefix => nil
10
10
  }
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module GyazzMarkup
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gyazz-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto