Skip to content

Commit

Permalink
Merge pull request #2782 from ipfs/feature/78-ruler
Browse files Browse the repository at this point in the history
All commands: Align to under 78-ruler width
  • Loading branch information
whyrusleeping committed Jun 1, 2016
2 parents cd4bc54 + 7f61030 commit fd1eae8
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 45 deletions.
10 changes: 6 additions & 4 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
`,
},

Expand Down
5 changes: 3 additions & 2 deletions cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`,
Expand Down
18 changes: 14 additions & 4 deletions core/commands/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
},

Expand Down Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions core/commands/files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,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:
Expand Down Expand Up @@ -555,9 +555,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{
Expand Down
4 changes: 2 additions & 2 deletions core/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
3 changes: 2 additions & 1 deletion core/commands/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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>
`,
Expand Down
18 changes: 8 additions & 10 deletions core/commands/object/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
},

Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions core/commands/object/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
19 changes: 13 additions & 6 deletions core/commands/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions core/commands/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
14 changes: 8 additions & 6 deletions core/commands/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion core/commands/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
},

Expand Down

0 comments on commit fd1eae8

Please sign in to comment.