sussdorff wrote:Here is a Ruby Script which I so far successfully use to extract the date from the OCR'd PDF and store that date as the modification date. As you might guess from the naming of the months, I am from Germany, but US works as well.
thanks for the script, and for the idea to resort to a Ruby script to solve this issue. I like very much the flexibility you have configured in your script, with the possibility to capture dates in different formats, though in my case I found that the script captured my birthday rather than the invoice date, so I will need to hack it a bit!
For those who wonder how to use Ruby on OSX, it turns out that there is a need for an additional module called osx/cocoa, otherwise these sort of errors will appear:
- Code: Select all
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- osx/cocoa (LoadError)
The module is known officially as RubyCocoa:
https://en.wikipedia.org/wiki/RubyCocoaThe project is hosted on SourceForge and a very recent release 1.2, dated 2014-07-27 is now available. I have downloaded the Ruby 2.0 version and it runs nicely on OSX 10.9 Mavericks.
http://rubycocoa.sourceforge.net/Ciao, Luca