Friday, December 28, 2007

klik2 klik beagle

Yay! I managed to make a klik2 recipe for beagle. In principle this should enable anyone to just do
$ klik klik2://beagle
and happily run beagle. All the dependency packages will be automatically downloaded and managed in the background. Or to download once and use many times, you can do
$ klik get beagle
$ alias runbeagle='klik run ~/Desktop/beagle.cmg'
$ runbeagle

Not all of the above is happening right away; klik2 is under development and is looking promising but not completely done yet. But if you already have mono and want to run beagle, you can sort of do it now. This works for any distribution that klik2 works for, which is basically almost all the major distributions.

  1. Get and install klik2
  2. Download http://cs-people.bu.edu/dbera/blogdata/beagle.xml
  3. $ klik get beagle.xml
    • It will do a lot of stuff and end up failing since there is no single app called "beagle" in the beagle package. It will however create the file ~/Desktop/beagle_0.3.1-2.cmg
  4. Run beagled.
    • klik run beagled ~/Desktop/beagle_0.3.1-2.cmg --fg --backend manpages --backend Files
  5. Browse to http://localhost:4000/ to access beagle using the web interface. You can use it to search, check indexing status and shutdown beagled.
  6. To run the other beagle tools, the pattern is the same
    • $ klik run beagle-command ~/Desktop/beagle_0.3.1-2.cmg beagle-command-params
    • For example, to shutdown from command line
      • $ klik run beagle-shutdown ~/Desktop/beagle_0.3.1-2.cmg
  7. The next time you want to run beagled, you need not run the recipe again; start from step-4 straight away!

1 comment:

Anonymous said...

If a .cmg contains multiple binaries to execute, you can also try

klik prompt applic.cmg

which lets pop up a little dialog to select which application you'd want to run.

Also, you can add some posthook script into your recipe that makes it start beagled by default if you "klik run beagle.cmg".