I've got emacs and racket running nicely on my Android phone (thanks to the awesome Gnuroot). But that left me with a new wrinkle: what's the best way to access Racket Documentation while programming on my phone? Obviously, I can open up a browser to doc.racket-lang.org but what if I'm a context where I don't have access to the Net?
By default, apt-get appears to install racket documentation in /usr/share/doc/racket, which means that my phone had the documentation, I just needed a way of viewing it.
Method 1: w3m. A quick and easy way to view the documentation is to run apt-get install w3m, and install w3m. w3m is an extremely handy tool as it lets you view html files from the command line. For example:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSghyphenhyphenHZ9ParRtVFfKoQbI8H2hlT1QLVNeZvUUGLIcrfx70CZavUaoFHLAWZkLxcT2chrfns8hJHFlYKm89wHxi8jIWZtQQ3b_6KVRzvPXbRgGXwPU-EgPMfj-3zjDmM1PehlKBMQ/s580/Screenshot_2015-11-23-06-40-29.png)
Method 2: launch a local web server. While w3m is a fast and functional solution, I wanted to be able to view the documentation in a standard browser, too. I figured I could accomplish this if I kicked off a local webserver. I could then point my regular Android browser to this server and I'd be all set. While I'm sure I could have installed apache or another full featured server, I found an easier and lighter weight solution: wbox. wbox is a testing tool that happens to offer the capability of being a stand alone, zero configuration, web server. Installing wbox is as easy as running apt-get install wbox. And here it is in action:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX1lWYvjP0vAvV5BqQta3decn78yGQ5YaP12u5s4M2P0x3_3biFZVbCK4wDsfM6AtkKETdGYWtvOXqc24dJbxRXAGLPHw7k7xyRuhZIrP5mWaLWx9ZrZBQ81Hcobn3m0vTcGG-Zw/s580/Screenshot_2015-11-23-06-03-29.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQhYG3URidoYg2B5yGgewi9BIWbFy__cxcp0rixsD7nyqvPSmNRZAkeNNQiH3TF9SeB8SoA0e-qD_m7z3D-TigDGGYUNU2FRP4KS_tfwjInXM5qpkb5wBIX0m9Ix_W6JWr9V1vg/s580/Screenshot_2015-11-23-06-03-45.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoPEpmVVmpDBSD4J7mf8kQBBAf_9-VTb6aOdfzx2HfbV6r7EvbLA-lvCRLTPpKED4XL8PFfP_SFWzUboCAtkPMbL3hrVmLbW9QwufjyVZhzC00yFIpGkveBs3aVCHge8OwJyhpLA/s580/Screenshot_2015-11-23-06-05-39.png)
(Note the URL is: http://localhost:8081)
wbox worked perfectly, and I should be able to leverage this same approach to hosting any local documentation.
Combine this local web browser approach with Android Multi Window, and you've got a remarkably functional environment.
I'm one step closer to a full self contained, no-Internet-needed, development environment.
If you have Python already installed, you can also say "python -m SimpleHTTPServer 8000" to get a trivial web server on port 8000.
ReplyDeleteYou plan *not* to use the Internet...
ReplyDeleteGrant -
ReplyDeleteWhen I'm flying (on a WiFi-less flight) and want to program, yeah, I plan to *not* use the Internet :-).