1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 23:53:19 +08:00

All commands: Align to under 78-ruler width

This is just for the description, for now.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
This commit is contained in:
Richard Littauer
2016-06-01 16:44:29 +01:00
parent c814478fb9
commit 7f61030eb5
12 changed files with 70 additions and 45 deletions

View File

@ -110,8 +110,9 @@ second signal.
IPFS_PATH environment variable
ipfs uses a repository in the local file system. By default, the repo is located
at ~/.ipfs. To change the repo location, set the $IPFS_PATH environment variable:
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
@ -121,8 +122,9 @@ Previously, IPFS used an environment variable as seen below:
export API_ORIGIN="http://localhost:8888/"
This is deprecated. It is still honored in this version, but will be removed in a
future version, along with this notice. Please move to setting the HTTP Headers.
This is deprecated. It is still honored in this version, but will be removed
in a future version, along with this notice. Please move to setting the HTTP
Headers.
`,
},

View File

@ -26,8 +26,9 @@ var initCmd = &cmds.Command{
ShortDescription: `
Initializes IPFS configuration files and generates a new keypair.
ipfs uses a repository in the local file system. By default, the repo is located
at ~/.ipfs. To change the repo location, set the $IPFS_PATH environment variable:
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
`,

View File

@ -331,7 +331,11 @@ var getValueDhtCmd = &cmds.Command{
ShortDescription: `
Outputs the best value for the given key.
There may be several different values for a given key stored in the DHT; in this context 'best' means the record that is most desirable. There is no one metric for 'best': it depends entirely on the key type. For IPNS, 'best' is the record that is both valid and has the highest sequence number (freshest). Different key types can specify other 'best' rules.
There may be several different values for a given key stored in the DHT; in
this context 'best' means the record that is most desirable. There is no one
metric for 'best': it depends entirely on the key type. For IPNS, 'best' is
the record that is both valid and has the highest sequence number (freshest).
Different key types can specify other 'best' rules.
`,
},
@ -434,11 +438,17 @@ var putValueDhtCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Write a key/value pair to the DHT.",
ShortDescription: `
Given a key of the form /foo/bar and a value of any form, this will write that value to the DHT with that key.
Given a key of the form /foo/bar and a value of any form, this will write that
value to the DHT with that key.
Keys have two parts: a keytype (foo) and the key name (bar). IPNS uses the /ipns keytype, and expects the key name to be a Peer ID. IPNS entries are specifically formatted (protocol buffer).
Keys have two parts: a keytype (foo) and the key name (bar). IPNS uses the
/ipns keytype, and expects the key name to be a Peer ID. IPNS entries are
specifically formatted (protocol buffer).
You may only use keytypes that are supported in your ipfs binary: currently this is only /ipns. Unless you have a relatively deep understanding of the go-ipfs DHT internals, you likely want to be using 'ipfs name publish' instead of this.
You may only use keytypes that are supported in your ipfs binary: currently
this is only /ipns. Unless you have a relatively deep understanding of the
go-ipfs DHT internals, you likely want to be using 'ipfs name publish' instead
of this.
Value is arbitrary text. Standard input can be used to provide value.

View File

@ -381,8 +381,8 @@ var FilesReadCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Read a file in a given mfs.",
ShortDescription: `
Read a specified number of bytes from a file at a given offset. By default, will
read the entire file similar to unix cat.
Read a specified number of bytes from a file at a given offset. By default,
will read the entire file similar to unix cat.
Examples:
@ -553,9 +553,9 @@ EXAMPLE:
WARNING:
Usage of the '--flush=false' option does not guarantee data durability until
the tree has been flushed. This can be accomplished by running 'ipfs files stat'
on the file or any of its ancestors.
Usage of the '--flush=false' option does not guarantee data durability until
the tree has been flushed. This can be accomplished by running 'ipfs files
stat' on the file or any of its ancestors.
`,
},
Arguments: []cmds.Argument{

View File

@ -26,8 +26,8 @@ var GetCmd = &cmds.Command{
ShortDescription: `
Stores to disk the data contained an IPFS or IPNS object(s) at the given path.
By default, the output will be stored at './<ipfs-path>', but an alternate path
can be specified with '--output=<path>' or '-o=<path>'.
By default, the output will be stored at './<ipfs-path>', but an alternate
path can be specified with '--output=<path>' or '-o=<path>'.
To output a TAR archive instead of unpacked files, use '--archive' or '-a'.

View File

@ -33,7 +33,8 @@ var LsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "List links from an object.",
ShortDescription: `
Displays the links an IPFS or IPNS object(s) contains, with the following format:
Displays the links an IPFS or IPNS object(s) contains, with the following
format:
<link base58 hash> <link size in bytes> <link name>
`,

View File

@ -65,17 +65,15 @@ var ObjectDataCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Outputs the raw bytes in an IPFS object.",
ShortDescription: `
'ipfs object data' is a plumbing command for retrieving the raw bytes stored in
a DAG node. It outputs to stdout, and <key> is a base58 encoded
multihash.
'ipfs object data' is a plumbing command for retrieving the raw bytes stored
in a DAG node. It outputs to stdout, and <key> is a base58 encoded multihash.
`,
LongDescription: `
'ipfs object data' is a plumbing command for retrieving the raw bytes stored in
a DAG node. It outputs to stdout, and <key> is a base58 encoded
multihash.
'ipfs object data' is a plumbing command for retrieving the raw bytes stored
in a DAG node. It outputs to stdout, and <key> is a base58 encoded multihash.
Note that the "--encoding" option does not affect the output, since the
output is the raw data of the object.
Note that the "--encoding" option does not affect the output, since the output
is the raw data of the object.
`,
},
@ -313,8 +311,8 @@ Examples:
$ echo '{ "Data": "abc" }' | ipfs object put
This creates a node with the data 'abc' and no links. For an object with links,
create a file named 'node.json' with the contents:
This creates a node with the data 'abc' and no links. For an object with
links, create a file named 'node.json' with the contents:
{
"Data": "another",

View File

@ -241,8 +241,8 @@ Example:
$ BAR=$(echo "bar" | ipfs add -q)
$ ipfs object patch $EMPTY_DIR add-link foo $BAR
This takes an empty directory, and adds a link named 'foo' under it, pointing to
a file containing 'bar', and returns the hash of the new object.
This takes an empty directory, and adds a link named 'foo' under it, pointing
to a file containing 'bar', and returns the hash of the new object.
`,
},
Arguments: []cmds.Argument{

View File

@ -152,20 +152,27 @@ var listPinCmd = &cmds.Command{
Tagline: "List objects pinned to local storage.",
ShortDescription: `
Returns a list of objects that are pinned locally.
By default, all pinned objects are returned, but the '--type' flag or arguments can restrict that to a specific pin type or to some specific objects respectively.
By default, all pinned objects are returned, but the '--type' flag or
arguments can restrict that to a specific pin type or to some specific objects
respectively.
`,
LongDescription: `
Returns a list of objects that are pinned locally.
By default, all pinned objects are returned, but the '--type' flag or arguments can restrict that to a specific pin type or to some specific objects respectively.
By default, all pinned objects are returned, but the '--type' flag or
arguments can restrict that to a specific pin type or to some specific objects
respectively.
Use --type=<type> to specify the type of pinned keys to list. Valid values are:
Use --type=<type> to specify the type of pinned keys to list.
Valid values are:
* "direct": pin that specific object.
* "recursive": pin that specific object, and indirectly pin all its decendants
* "recursive": pin that specific object, and indirectly pin all its
descendants
* "indirect": pinned indirectly by an ancestor (like a refcount)
* "all"
With arguments, the command fails if any of the arguments is not a pinned object.
And if --type=<type> is additionally used, the command will also fail if any of the arguments is not of the specified type.
With arguments, the command fails if any of the arguments is not a pinned
object. And if --type=<type> is additionally used, the command will also fail
if any of the arguments is not of the specified type.
Example:
$ echo "hello" | ipfs add -q

View File

@ -20,8 +20,11 @@ var StatsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Query ipfs statistics.",
Synopsis: "ipfs stats <command>",
ShortDescription: `'ipfs stats' is a set of commands to help look at statistics for your ipfs node.`,
LongDescription: `'ipfs stats' is a set of commands to help look at statistics for your ipfs node.`,
ShortDescription: `'ipfs stats' is a set of commands to help look at statistics
for your ipfs node.
`,
LongDescription: `'ipfs stats' is a set of commands to help look at statistics
for your ipfs node.`,
},
Subcommands: map[string]*cmds.Command{

View File

@ -260,12 +260,13 @@ var swarmDisconnectCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Close connection to a given address.",
ShortDescription: `
'ipfs swarm disconnect' closes a connection to a peer address. The address format
is an ipfs multiaddr:
'ipfs swarm disconnect' closes a connection to a peer address. The address
format is an ipfs multiaddr:
ipfs swarm disconnect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
The disconnect is not permanent; if ipfs needs to talk to that address later, it will reconnect.
The disconnect is not permanent; if ipfs needs to talk to that address later,
it will reconnect.
`,
},
Arguments: []cmds.Argument{
@ -373,10 +374,11 @@ var swarmFiltersCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Manipulate address filters.",
ShortDescription: `
'ipfs swarm filters' will list out currently applied filters. Its subcommands can be used
to add or remove said filters. Filters are specified using the multiaddr-filter format:
'ipfs swarm filters' will list out currently applied filters. Its subcommands
can be used to add or remove said filters. Filters are specified using the
multiaddr-filter format:
example:
Example:
/ip4/192.168.0.0/ipcidr/16

View File

@ -26,7 +26,8 @@ var tarAddCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Import a tar file into ipfs.",
ShortDescription: `
'ipfs tar add' will parse a tar file and create a merkledag structure to represent it.
'ipfs tar add' will parse a tar file and create a merkledag structure to
represent it.
`,
},