rcode2html 0.0.1
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.
- data/bin/rcode2html +22 -0
- metadata +46 -0
data/bin/rcode2html
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
if ARGV.size<2
|
5
|
+
puts "Usage input_dir output_dir [options]"
|
6
|
+
exit 0
|
7
|
+
end
|
8
|
+
|
9
|
+
if ARGV[0].index('../')
|
10
|
+
puts "Do not support relative paths"
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
14
|
+
Dir["#{ARGV[0]}/**/*.*"].each do |file|
|
15
|
+
rdir = File.absolute_path(ARGV[0])
|
16
|
+
file = File.absolute_path(file)
|
17
|
+
dir = File.dirname(file)
|
18
|
+
name = File.basename(file)
|
19
|
+
save = "#{ARGV[1]}/#{dir.gsub(rdir, '')}/#{name}.html"
|
20
|
+
FileUtils::mkdir_p(File.dirname(save))
|
21
|
+
`code2html #{ARGV[2..-1].join(' ')} #{file} #{save}`
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rcode2html
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Promix17
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Wrapper to code2html
|
15
|
+
email: promix17@yandex.ru
|
16
|
+
executables:
|
17
|
+
- rcode2html
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/rcode2html
|
22
|
+
homepage: https://bitbucket.org/promix17/rcode2html
|
23
|
+
licenses: []
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 1.8.23
|
43
|
+
signing_key:
|
44
|
+
specification_version: 3
|
45
|
+
summary: Wrapper to code2html
|
46
|
+
test_files: []
|