The ultimate file browser for maven repos and more
Posted by David Chandler on August 26, 2010
Recently, I’ve been doing a lot of work with maven where I needed to verify that the correct artifacts were deployed to a maven repository. While it’s easy enough to view a maven repo in a Web browser, it’s a pain to click through all the levels, and the POMs don’t show up very nicely due to the XML content.
So, I reached way back in time in my toolbox and pulled out lynx, the text-only browser created at my alma mater the year I graduated. (Ironically enough, I was then unaware of HTTP and lamenting that all the interesting work in EE had already been done. I had even used the Internet, as my wife and I would telnet across state lines with our campus VAX accounts to chat on the VT220 terminals in our respective dorms. But I didn’t see the Web coming, and it’s most of what I’ve done for the last 18 years…).
You can quickly browse maven central, for example, using
For extra speed and the ability to look at POMs in vi, pull in the HTTP repo first (POMs only for speed) with wget:
wget -r -l3 --no-parent https://repo1.maven.org/maven2/com/whatever -A.pom
Now for the really fun part. Inspired by the ability to launch Finder on the Mac with “open .”, I tried
Sure enough, lynx has finally cured my emacs file browser envy. Use the arrow keys to navigate, “o” to set options, including vi as your editor, then “/” to search just like in vi and “e” to edit any file. If you have to edit a bunch of files in multiple directories, this definitely trumps tedious “cd” and “vi” commands, even with shell filename completion. For really hardcore users, there’s
lynx -vikeys .
Of course, all this would be unnecessary if the Mac Finder worked a little more like Windows Explorer. Or if I’d learned emacs instead of vi.
For a real blast from the past, pull up the Google home page with lynx. Even Gmail works! I love text, I really do. Although, for the record, I do much prefer GMail and GCalendar in Chrome with keyboard shortcuts on.