Difference between revisions of "Some sess doc stuff"

From Fernseher
Jump to navigationJump to search
Line 1: Line 1:
For all of these, the search order for the database URL is: ~/.sessdoc[REPO] ''etc-root''/etc/sessdoc.conf http://www.sessrumnir.net/doc
For all of these, the search order for the database URL is: ~/.sessdoc[REPO] ''etc-root''/etc/sessdoc.conf http://www.sessrumnir.net:80/doc


*Load
*Load
Line 18: Line 18:


sessdocbranch ''id''[/''rev''] ''new-id'' --title=''content-title'' [--author=''author''] ::=''httprc''
sessdocbranch ''id''[/''rev''] ''new-id'' --title=''content-title'' [--author=''author''] ::=''httprc''
*Return codes
**64 EX_USAGE Args not understood or missing required args
**69 EX_UNAVAILABLE Can't connect to repository host/port
**78 EX_CONFIG Problem reading config files?  (might not need this one... just move on)
**1 EXIT_FAILURE Internal error that isn't normal
**65 EX_DATAERR 400 Bad request
**77 EX_NOPERM 409 Not allowed
**79 EX_NOTFOUND 404 No such document/revision
**0 EXIT_SUCCESS 200/201 Success

Revision as of 08:28, 11 November 2009

For all of these, the search order for the database URL is: ~/.sessdoc[REPO] etc-root/etc/sessdoc.conf http://www.sessrumnir.net:80/doc

  • Load

sessdocget id[/rev] > entity ::=httprc

sessdocget id[/rev] --nohead > body ::=httprc

sessdochead id[/rev] > head ::=httprc

  • Store

sessdocput id[/rev] < entity ::=httprc (* headers required: Content-type, Content-title, potentially From: (if From not specified, ~/.sessdoc[AUTHOR] or $USER is used))

sessdocput id[/rev] --type=content-type --title=content-title [--author=author] < body ::=httprc

sessdocbranch id[/rev] new-id < head ::=httprc (* headers required: Content-title, potentially From: (if From not specified, ~/.sessdoc[AUTHOR] or $USER is used))

sessdocbranch id[/rev] new-id --title=content-title [--author=author] ::=httprc

  • Return codes
    • 64 EX_USAGE Args not understood or missing required args
    • 69 EX_UNAVAILABLE Can't connect to repository host/port
    • 78 EX_CONFIG Problem reading config files? (might not need this one... just move on)
    • 1 EXIT_FAILURE Internal error that isn't normal
    • 65 EX_DATAERR 400 Bad request
    • 77 EX_NOPERM 409 Not allowed
    • 79 EX_NOTFOUND 404 No such document/revision
    • 0 EXIT_SUCCESS 200/201 Success