Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the help.py for Android's monkeyrunner

I just can't find the help.py file in order to create the API reference for the monkeyrunner. The command described at the Android references

monkeyrunner <format> help.py <outfile> does not work when i call monkeyrunner html help.py /path/to/place/the/doc.html.

It's quite obvious that the help.py file is not found and the monkeyrunner also tells me "Can't open specified script file". But a locate on my system doesn't bring me a help.py file that has anything to do with monkeyrunner or Android.

So my question is: Where did they hide the help.py file for creating the API reference?

like image 617
keyboardsurfer Avatar asked Dec 09 '10 08:12

keyboardsurfer


1 Answers

I cannot find it either. But one can assume that it is simply calling MonkeyRunner.help() with the passed in arguments. If you just want to get something quick use this script I created also named help.py:

#!/usr/bin/env python

# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

text = MonkeyRunner.help("html");

f = open('help.html', 'w')
f.write(text);
f.close();

Run it just like any other monkeyrunner script:

$ monkeyrunner help.py
like image 151
dstricks Avatar answered Nov 10 '22 11:11

dstricks