All pastes #432231 Raw Edit

Mine

public ruby v1 · immutable
·published 2007-04-10 03:36 UTC
rendered paste body
        when /.sxw$|.odt$/ # read content.xml from zip file, strip <> tags          Zip::ZipFile.open(self.temp_path) do |zipfile|            text_in_file = zipfile.file.open('content.xml') { |f| f.read.gsub(/<.*?>/, ' ') }          end    du_opt = (`uname` == "Darwin\n") ? "d0" : "-summarize"   @trash_size = `du -#{du_opt} -h #{TRASH_PATH}`.match(/(.*?)\t/)[1]    @ferret_size = `du -#{du_opt} -h #{FERRET_PATH}`.match(/(.*?)\t/)[1]