Sha256: 58bb4d9cd476b946f333839d9409fd79b0862cce0a03995f991f617bd0eef35b
Contents?: true
Size: 753 Bytes
Versions: 26
Compression:
Stored size: 753 Bytes
Contents
class GetFilePath def initialize(src) @src = src end def get_file_path() #lines = File.readlines(@src.gsub(".org", ".md")) lines = File.readlines(@src) files = [] lines.each do |line| #if path2 = line.match(/\!\[img\]\(((.+))/)# "(.+)"\)/) #if path2 = line.match(/\[\[file\:(.+)\](.+)\]\]/) || line.match(/\[\[file:(.+)\]\]/) if path2 = line.match(/\[\[(.+)\]\[file:(.+)\]\]/) || line.match(/\[\[file:(.+)\]\]/) if path2[2] == nil files << path2[1] else files << path2[2] end end end #paths = [] #files.each do |file| #paths << File.join(Dir.pwd, file) #end #return paths return files end end #GetFilePath.new("thesis.org")
Version data entries
26 entries across 26 versions & 1 rubygems