This is my last fall semester as a college student.
Wow.
Monday, August 30, 2010
Wednesday, August 4, 2010
Automated Generation of Javadocs for Open Source Android Applications
While Java is not my favorite language, it has its benefits. With one Android application already posted on the market and another application in development, I decided to start using Javadocs a little more seriously. The process of generating Javadocs is not that complicated using Eclipse, but that is not the solution I wanted. My goal was to automate the generation and posting of the docs as the source code changed.
- Clean up any files from the previous run of the script
- Download the latest source code from the svn repository using svn export. It is notable that you can use svn export with Github since they support accessing repositories using the SVN protocol. Awesome!
- Generate the javadocs based off of the freshly downloaded code using the desired parameters.
- Copy the newly generated javadocs to the desired server. For my purposes, secure copy was the best solution. With my server's public key installed on the shared host, I was able to log into the remote box without prompting for a user name and password.
#!/bin/bash
cd /path/to/files/docs/
rm -rf ampted.svn
rm -rf ampted
svn export http://ampted.googlecode.com/svn/trunk/
mv trunk ampted.svn
JAVADOCHEADER='<a target="_top" href="http://www.amptedapp.com/">Android Mobile Physical Therapy Exercise Documenter</a>'
JAVADOCFOOTER="Generated on `date`"
javadoc -private -header "$JAVADOCHEADER" -footer "$JAVADOCFOOTER" -d /path/to/files/docs/ampted/ -sourcepath /path/to/files/docs/ampted.svn/android/src/ -subpackages com.AMPTedApp -classpath /path/to/files/lib/android.jar
scp -r /path/to/files/docs/ampted remoteuser@example.com:/path/to/remote/files/docs/
Nothing to do, so what will I accomplish?
There are two and a half weeks before my last fall semester starts and I have very little to do. I have a few things on my calendar, but generally it is empty. So, what I am going to do with all of this free time? Simple, write lots and lots of code. Actually, my plan is to work on several projects while I still have the time. It just happens to be that most of these projects involve me writing code.