Sha256: f9b7273d4c3e904457e33b85d205b5abbdbc696d6781c74f9931998ce184be3c
Contents?: true
Size: 1.56 KB
Versions: 2
Compression:
Stored size: 1.56 KB
Contents
# this code is to list the notes def findnotefilesh(d) notesarray = [""] a = Array.new(Dir[d].entries.sort) #loop through and get the files names a.each do |x| #adjust the filters to the files you want to see... if(!test(?d,x)) # only txt files if x =~ /htm|html|rwd|nam|pdf|jpg|gif|avi|sch|txt/ if $DEBUG # puts "#{x}" # looks at the files end notesarray = notesarray | ["#{x}"] end end end return notesarray end def listnotedirshttp3 if $temp_rwdhypernote_directory.to_s.empty? startlangdir = $rwdhypernote_directory else startlangdir = $temp_rwdhypernote_directory end @hypernote_directory = startlangdir notesarray = [""] #get a list of the files and subdirectories on the starting directory only anotearray = Array.new(Dir[startlangdir].entries.sort) #loop through the list, ignore the files and add all new directories found anotearray.each do |x| #if it is a file... if(!test(?d,x)) anotearray.delete(x) else #it is a directory... notesarray = findnotefilesh(x + "/**") end end a_notedatahtml3 = "" notesarray.delete_if { |x| x < " " } notesarray.each { |xarr| a_notedatahtml3 += "<a href='#{xarr}'>#{xarr}</a></href><br>"} @a_notedatahtml3 = "#{a_notedatahtml3}" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rwdhypernote-0.15 | code/superant.com.hypernote/listnotedirhttp4.rb |
rwdhypernote-0.16 | code/superant.com.hypernote/listnotedirhttp4.rb |