96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# File 'lib/tocmd/translator_local.rb', line 96
def build_with_dir(destiny_dir,dest_dir)
p "start building......"
if File.directory?(destiny_dir) == false
p 'process_with_one'
ar = @source_file_path.split('/')
file_name = ar.pop().split('.')[0]
src_path = ar.join('/').to_s
ar.push('preview');
dest_dir = ar.join('/').to_s
process_with_one(src_path,dest_dir,destiny_dir.split('/').pop().to_s)
return;
end
p "src_dir = #{destiny_dir}"
p "dest_dir = #{dest_dir}"
Dir.foreach(destiny_dir) do |ff|
unless /^\./ =~ ff ||/^images/ =~ ff ||/^css/ =~ ff || File.directory?(ff) || File.extname(ff) != '.md'
process_with_one(destiny_dir,dest_dir,ff)
end
end
end
|