molybdenum-99 / infoboxer

Wikipedia information extraction library
MIT License
174 stars 16 forks source link

Configuration #64

Closed rileyr closed 8 years ago

rileyr commented 8 years ago

Addresses https://github.com/molybdenum-99/infoboxer/issues/63.

zverok commented 8 years ago

Hey, that's a lot of work! There is one imporant thing that is still to be done: Infoboxer is not only Reality backend/Wikipedia client, it is generic MediaWiki client, which targets to work with any MediaWiki installation in existance (and there are plenty of useful ones, not speaking of different language versions of Wikipedia).

Therefore, the right way of configuring things, for me, is following:

w = Infoboxer::MediaWiki.new('http://tardis.wikia.com', 
                              user_agent: MY_UA,
                              cache_path: '/tmp/tardis-wikia')
Infoboxer.configure do |c|
  c.cache_path '/tmp/%{domain}'
end
rileyr commented 8 years ago

Per-wiki configuration, makes sense. I'm gonna close this PR as it was made with an understanding of the library sorta missed the mark on it's use case.

zverok commented 8 years ago

OK. Sorry for discouraging you! Some matters here are, kinda, complicated :(