Sha256: 4908d777c20961931a4e68205c94608fe0ed189499d4d7bdd90437dc26991cd7

Contents?: true

Size: 1.76 KB

Versions: 21

Compression:

Stored size: 1.76 KB

Contents

# part of rwdtinker smalllinux@gmail.com
# copyleft gpl 2008 Steven Gibson

require 'lib/rwdtinker/rwdtinkertools'

tmpmodload = '
def RwdtinkerTools.findfilest(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 rwd files
			if x =~ /rb|po|txt/
				fileA=File.open("#{x}","r")        #opens the file thats in fileName as read only
				@@tempdoc+=fileA.read    #reads the file into the doc string
				fileA.close    
			end
		end
	end
	
end


def RwdtinkerTools.findlanguagefiles(langdir,lang)
     @@tempdoc = ""

            startlangdir = File.join(langdir,lang)
           #get a list of the files and subdirectories on the starting directory only
            alanghash = Array.new(Dir[startlangdir].entries.sort)
             #loop through the list, ignore the files and add all new directories found
            alanghash.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
		          blanghash = Dir[@@tmproot].entries.sort
		          blanghash.each do |x|
			           if(test(?d,x))
				        alanghash.push(x)  #appends to the end of the array...
			           end
		            end
	            end
            end
            alanghash.each do |x|
	                      #if it is a file...
	                      if(!test(?d,x))
		                      alanghash.delete(x)
	                       else              #it is a directory...
		                      findfilest(x + "/**")
	                       end
                end
  
	        return @@tempdoc
  
end
'

RwdtinkerTools.module_eval(tmpmodload)

Version data entries

21 entries across 21 versions & 14 rubygems

Version Path
bigtinker-0.97 lib/rwdtinker/rwdlangdir.rb
bigtinker-0.98 lib/rwdtinker/rwdlangdir.rb
rubyslippers-1.08 lib/rwdtinker/rwdlangdir.rb
rwddialogmap-0.02 lib/rwdtinker/rwdlangdir.rb
rwdeliza-0.05 lib/rwdtinker/rwdlangdir.rb
rwdgutenberg-0.13 lib/rwdtinker/rwdlangdir.rb
rwdfoldeditor-0.07 lib/rwdtinker/rwdlangdir.rb
rwdhypernote-0.15 lib/rwdtinker/rwdlangdir.rb
rwdhypernote-0.16 lib/rwdtinker/rwdlangdir.rb
rwdlanguage-0.01 lib/rwdtinker/rwdlangdir.rb
rwdmpd-0.08 lib/rwdtinker/rwdlangdir.rb
rwdmpd-0.07 lib/rwdtinker/rwdlangdir.rb
rwdruby-1.08 lib/rwdtinker/rwdlangdir.rb
rwdschedule-0.07 lib/rwdtinker/rwdlangdir.rb
rwdtinker-1.83 lib/rwdtinker/rwdlangdir.rb
rwdtinker-1.82 lib/rwdtinker/rwdlangdir.rb
rwdtinker-1.84 lib/rwdtinker/rwdlangdir.rb
rwdtinker-1.85 lib/rwdtinker/rwdlangdir.rb
rwdtorrent-0.08 lib/rwdtinker/rwdlangdir.rb
tinkerbell-0.03 lib/rwdtinker/rwdlangdir.rb