[tahoe-dev] Fwd: Tahoe

zooko zooko at zooko.com
Wed Apr 2 16:33:23 UTC 2008


Ben Laurie wrote:

> So, I'm quite excited about Tahoe, and I even managed to build it
> on FreeBSD (on which I will blog at some point soon).
>
> But ... the documentation sucks! I can get the web interface
> working, but I've complete struck out on the command line.

It's a shame that the CLI has not received the benefit of nearly as  
much work as the wapi/wui has.  I'm hoping that someone who loves  
CLIs will take ownership of it:

http://allmydata.org/trac/tahoe/report/23


> Seems to me I should be able to do something like, say...
>
> bin/tahoe ls -d http://193.133.15.7:8124/uri/ 
> URI:DIR2:djrdkfawoqihigoett4g6auz6a:jx5mplfpwexnoqff7y5e4zjus4lidm76dc 
> uarpct7cckorh2dpgq
>
> and get a directory listing. But apparently not.
>
> bin/tahoe:  --dir-cap must be a dir cap (or "root"), but we got
> 'http://193.133.15.7:8124/uri/ 
> URI:DIR2:djrdkfawoqihigoett4g6auz6a:jx5mplfpwexnoqff7y5e4zjus4lidm76dc 
> uarpct7cckorh2dpgq'.

Ah, this isn't a problem in the CLI precisely, but in the parsing of  
capabilities.  If your capability had started with a string matching  
this expression:

# URIs (soon to be renamed "caps") are always allowed to come with a  
leading
# 'http://127.0.0.1:8123/uri/' that will be ignored.
OPTIONALHTTPLEAD=r'(?:https?://(?:127.0.0.1|localhost):8123/uri/)?'

(code snippet from http://allmydata.org/trac/tahoe/browser/src/ 
allmydata/uri.py )

Then it would have worked just as you expected.

Perhaps that expression should be broadened to:

# URIs (soon to be renamed "caps") are always allowed to come with a  
leading
# HTTP string that will be ignored.
OPTIONALHTTPLEAD=r'(?:https?://(?:[0-9]+.[0-9]+.[0-9]+.[0-9]+| 
localhost):8123/uri/)?'

or even something like:

OPTIONALHTTPLEAD=r'(?:https?://(?:[0-9]+.[0-9]+.[0-9]+.[0-9]+|[^:]+): 
8123/uri/)?'

?


> so, what am I doing wrong, and how about some CLI examples somewhere?

That's a good idea.  Perhaps you could add a bit more example text into:

http://allmydata.org/source/tahoe/trunk/docs/using.html

Or is it that you didn't see using.html, and that if you had it would  
have sufficed for an example?


Thanks for the feedback!

Regards,

Zooko




More information about the tahoe-dev mailing list