/* Copyright 2013 The Perkeep Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // TODO(mpl): this doc is not in sync with what the pk-put help outputs. But it should be. /* The pk-put tool mainly pushes blobs, files, and directories. It can also perform various related tasks, such as setting tags, creating permanodes, and creating share blobs. Usage: pk-put [globalopts] [commandopts] [commandargs] Modes: delete: Create and upload a delete claim. attr: Add, set, or delete a permanode's attribute. file: Upload file(s). init: Initialize the pk-put configuration file. With no option, it tries to use the GPG key found in the default identity secret ring. permanode: Create and upload a permanode. rawobj: Upload a custom JSON schema blob. share: Grant access to a resource by making a "share" blob. blob: Upload raw blob(s). Examples: pk-put file [opts] (raw, without any metadata) pk-put blob --permanode --title='My Blob' --tag=backup,my_blob pk-put blob - (read from stdin) pk-put permanode (create a new permanode) pk-put permanode --title="Some Name" --tag=foo,bar (with attributes added) pk-put init pk-put init --gpgkey=XXXXX pk-put share [opts] pk-put rawobj (debug command) pk-put attr Set attribute pk-put attr --add Adds attribute (e.g. "tag") pk-put attr --del [] Deletes named attribute [value For mode-specific help: pk-put -help Global options: -help=false: print usage -secret-keyring="~/.gnupg/secring.gpg": GnuPG secret keyring file to use. -server="": Perkeep server prefix. If blank, the default from the "server" field of ~/.camlistore/config is used. Acceptable forms: https://you.example.com, example.com:1345 (https assumed), or http://you.example.com/alt-root -verbose=false: extra debug logging -verbose_http=false: show HTTP request summaries -version=false: show version */ package main // import "perkeep.org/cmd/pk-put"