Method: Paperless::Engine#process_text
- Defined in:
- lib/paperless/engine.rb
#process_text ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/paperless/engine.rb', line 114 def process_text puts "Processing Text file..." text = File.open(@file, "rb") {|io| io.read} # Verify that we need to search for date or just set to today # Need to prcess file for date in case the rules need to use it. # First check if there are actually any date rules @rules.each do |rule| if rule.condition == Paperless::DATE_VAR @date = date_search(text,@date_locale) || date_search(@file,@date_locale) end end # Process each page and pass it through the rules engine process_rules_engine(text) end |