Some sess doc stuff

From Fernseher
Jump to navigationJump to search

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 For load, default is to print the response body, but not the headers or error messages. For store, default is to print nothing.

  • Load

sessdocget id[/rev] [--noheaders] [--headers] [--nobody] [--body] [--verbose] > entity ::=httprc

  • Store (For all stores, Content-title, From, and Content-type are required. Content-type comes from the branched document for branches. If From is not specified, its gotten from ~/.sessdoc[AUTHOR] or $USER. For put, these things can be specified on the command line or in a simple headers section before the first newline. If any of them are on the command line, it's assumed that there is no simple headers section and the body starts right away.)

sessdocput id[/rev] [--type=content-type] [--title=content-title] [--author=author] [--noheaders] [--headers] [--nobody] [--body] [--verbose] < entity > entity ::=httprc

sessdocbranch id[/rev] new-id [--title=content-title] [--author=author] [--noheaders] [--headers] [--body] [--nobody] [--verbose] > entity ::=httprc

  • Return codes
    • 64 EX_USAGE Args not understood or missing required args
    • 69 EX_UNAVAILABLE 500 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