# File utils.rb, line 290 def findRdocTitle( catalogFile="docs/CATALOG" ) # Try extracting it from the CATALOG file from a line that looks like: # Title: Foo Bar Module title = findCatalogKeyword( 'title', catalogFile ) # If that doesn't work for some reason, try grabbing the name of the CVS # repository the directory belongs to. if title.nil? && File::directory?( "CVS" ) && File::exists?( "CVS/Repository" ) title = File::read( "CVS/Repository" ).chomp end # As a last resort, use the name of the project directory if title.nil? distdir = File::dirname( __FILE__ ) distdir = File::dirname( distdir ) if /docs$/ =~ distdir title = File::basename( distdir ) end return title end