12

Is there an API for OpenGrok? I'm interested in mining the results in either Perl or Java. At the moment, I could perform HTML scrapping against the results, but seems less-than-ideal.

As per its website, it leverages Lucene, but no real info on how to connect to it other than via HTML.

alanc
  • 4,102
  • 21
  • 24
Jose Leon
  • 1,615
  • 3
  • 22
  • 30

3 Answers3

5

Starting in OpenGrok 0.13, there is a simple REST API.

With OpenGrok 1.0 there is a JSON API.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
eh1160
  • 674
  • 1
  • 6
  • 14
2

Opengrok supports a command line interface that may be able to provide what you're looking for.

Example:

$ java -cp ./opengrok.jar org.opensolaris.opengrok.search.Search -R /var/opengrok/etc/configuration.xml -f "My Search"
arcdegree
  • 2,710
  • 3
  • 27
  • 38