Sha256: fbaf0f0f7ce392b43ee3e68c5275dafe92df92be743074c19259e9b6056eb82f

Contents?: true

Size: 1.53 KB

Versions: 2

Compression:

Stored size: 1.53 KB

Contents

# this code is to list the notes



def fillhypernotenameh(inffile)
  applet                = inffile
  @a_viewhypernotehtml  = applet
  
end

 def findnotefilesh(d)
  
         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|sch|txt/
                  #  puts "#{x}"        #opens the file thats in fileName as read only
                   $notesarray =  $notesarray | ["#{x}"] 
                  end
               end
          end
  end
  
def listnotedirshtml

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...
                        findnotefilesh(x + "/**")
                end
        end
        @notedirectoriesresult = ""
         @noterecordsresulth = $notesarray.entries.sort.rwd_method("fillhypernotenameh")
      end  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rwdhypernote-0.15 code/superant.com.hypernote/listnotedirshtml.rb
rwdhypernote-0.16 code/superant.com.hypernote/listnotedirshtml.rb