code/superant.com.gutenberg/rungutenbergwindow.rb in rwdgutenberg-0.06 vs code/superant.com.gutenberg/rungutenbergwindow.rb in rwdgutenberg-0.07

- old
+ new

@@ -23,31 +23,21 @@ def rwdgutenbergwindowtwo begin tempdoc = "" @gutendisplayvariable = "" tempcount = 0 - $stderr.print "starting\n" + if $gutenbergcommand == "openbook" - # raise "forced error test" # raise RuntimeError - $stderr.print "testing string\n" - fileName = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".gut" - - $stderr.print "about to open file existence " - $stderr.print fileName - $stderr.print "\n" - + fileName = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".gut" fd = File.open(fileName,"r") booktitle = fd.readline.chomp - $stderr.print booktitle + $bookfile=File.new(booktitle,"r") #opens the file thats in fileName as read only $gutenbergcommand == "continue" - - end - if $gutenbergcommand == "continue" tempcount = 0 while tempcount < $booksteps tempdoc += $bookfile.gets #reads the file into the doc string