Sha256: 097dd6ffb19c6638128a919ba80cf7d7413eb29cb79d33a42894947b02e169ac

Contents?: true

Size: 1.83 KB

Versions: 6

Compression:

Stored size: 1.83 KB

Contents

# this code is to list the notes



def fillhypernotename(inffile)
  applet                = inffile.gsub(/\.txt$/, "")
  @a_viewhypernote  = applet
  
end

 def findnotefiles(d)
    p d
         a = Array.new(Dir[d].entries.sort)
	 p a
         #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 =~ /rb|txt|txt/
                    puts "#{x}"        #opens the file thats in fileName as read only
                   $notesarray =  $notesarray | ["#{x}"] 
                  end
               end
          end
  end
  
def listnotedirs
 startlangdir = $rwdhypernote_directory
 
 $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 a directory...
	
          if(test(?d,x))
            # add to the original list of directories
            @@tmproot = x + "/**"
            #adds the new ones to the array
            
            bnotearray = Dir[@@tmproot].entries.sort
            bnotearray.each do |x|
              if(test(?d,x))
                anotearray.push(x)  #appends to the end of the array...
              end
            end
          end
        end
        anotearray.each do |x|
                #if it is a file...
		p x
                if(!test(?d,x))
                        anotearray.delete(x)
                  else              #it is a directory...
                        findnotefiles(x + "/**")
                end
        end
         @noterecordsresult = $notesarray.entries.sort.rwd_method("fillhypernotename")
      end  

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
bigtinker-0.94 code/superant.com.hypernote/listhypernotes.rb
bigtinker-0.93 code/superant.com.hypernote/listhypernotes.rb
rwdhypernote-0.05 code/superant.com.hypernote/listhypernotes.rb
rwdhypernote-0.07 code/superant.com.hypernote/listhypernotes.rb
rwdhypernote-0.06 code/superant.com.hypernote/listhypernotes.rb
rwdhypernote-0.04 code/superant.com.hypernote/listhypernotes.rb