Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap-desc: Wrap help descriptions under 80 chars #4121

Merged
merged 1 commit into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ The daemon will start listening on ports on the network, which are
documented in (and can be modified through) 'ipfs config Addresses'.
For example, to change the 'Gateway' port:

ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8082
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8082

The API address can be changed the same way:

ipfs config Addresses.API /ip4/127.0.0.1/tcp/5002
ipfs config Addresses.API /ip4/127.0.0.1/tcp/5002

Make sure to restart the daemon after changing addresses.

By default, the gateway is only accessible locally. To expose it to
other computers in the network, use 0.0.0.0 as the ip address:

ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080

Be careful if you expose the API. It is a security risk, as anyone could
control your node remotely. If you need to control the node remotely,
Expand All @@ -91,8 +91,8 @@ ipfs supports passing arbitrary headers to the API and Gateway. You can
do this by setting headers on the API.HTTPHeaders and Gateway.HTTPHeaders
keys:

ipfs config --json API.HTTPHeaders.X-Special-Header '["so special :)"]'
ipfs config --json Gateway.HTTPHeaders.X-Special-Header '["so special :)"]'
ipfs config --json API.HTTPHeaders.X-Special-Header '["so special :)"]'
ipfs config --json Gateway.HTTPHeaders.X-Special-Header '["so special :)"]'

Note that the value of the keys is an _array_ of strings. This is because
headers can have more than one value, and it is convenient to pass through
Expand All @@ -102,9 +102,9 @@ CORS Headers (for API)

You can setup CORS headers the same way:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["example.com"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["example.com"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'

Shutdown

Expand All @@ -119,15 +119,15 @@ 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
export IPFS_PATH=/path/to/ipfsrepo

Routing

IPFS by default will use a DHT for content routing. There is a highly
experimental alternative that operates the DHT in a 'client only' mode that can
be enabled by running the daemon as:
experimental alternative that operates the DHT in a 'client only' mode that
can be enabled by running the daemon as:

ipfs daemon --routing=dhtclient
ipfs daemon --routing=dhtclient

This will later be transitioned into a config option once it gets out of the
'experimental' stage.
Expand All @@ -136,7 +136,7 @@ DEPRECATION NOTICE

Previously, ipfs used an environment variable as seen below:

export API_ORIGIN="http://localhost:8888/"
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
Expand Down
3 changes: 2 additions & 1 deletion core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ var DagGetCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Get a dag node from ipfs.",
ShortDescription: `
'ipfs dag get' fetches a dag node from ipfs and prints it out in the specifed format.
'ipfs dag get' fetches a dag node from ipfs and prints it out in the specifed
format.
`,
},
Arguments: []cmds.Argument{
Expand Down
3 changes: 2 additions & 1 deletion core/commands/files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ var FilesWriteCmd = &cmds.Command{
Tagline: "Write to a mutable file in a given filesystem.",
ShortDescription: `
Write data to a file in a given filesystem. This command allows you to specify
a beginning offset to write to. The entire length of the input will be written.
a beginning offset to write to. The entire length of the input will be
written.

If the '--create' option is specified, the file will be created if it does not
exist. Nonexistant intermediate directories will not be created.
Expand Down
3 changes: 2 additions & 1 deletion core/commands/ipns.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ the private key enables publishing new (signed) values. In both publish
and resolve, the default name used is the node's own PeerID,
which is the hash of its public key.

You can use the 'ipfs key' commands to list and generate more names and their respective keys.
You can use the 'ipfs key' commands to list and generate more names and their
respective keys.

Examples:

Expand Down
3 changes: 2 additions & 1 deletion core/commands/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ var KeyCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Create and list IPNS name keypairs",
ShortDescription: `
'ipfs key gen' generates a new keypair for usage with IPNS and 'ipfs name publish'.
'ipfs key gen' generates a new keypair for usage with IPNS and 'ipfs name
publish'.

> ipfs key gen --type=rsa --size=2048 mykey
> ipfs name publish --key=mykey QmSomeHash
Expand Down
3 changes: 2 additions & 1 deletion core/commands/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var logLevelCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Change the logging level.",
ShortDescription: `
Change the verbosity of one or all subsystems log output. This does not affect the event log.
Change the verbosity of one or all subsystems log output. This does not affect
the event log.
`,
},

Expand Down
3 changes: 2 additions & 1 deletion core/commands/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ the private key enables publishing new (signed) values. In both publish
and resolve, the default name used is the node's own PeerID,
which is the hash of its public key.

You can use the 'ipfs key' commands to list and generate more names and their respective keys.
You can use the 'ipfs key' commands to list and generate more names and their
respective keys.

Examples:

Expand Down
12 changes: 7 additions & 5 deletions core/commands/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ var P2PCmd = &cmds.Command{
ShortDescription: `
Create and use tunnels to remote peers over libp2p

Note: this command is experimental and subject to change as usecases and APIs are refined`,
Note: this command is experimental and subject to change as usecases and APIs
are refined`,
},

Subcommands: map[string]*cmds.Command{
Expand Down Expand Up @@ -188,7 +189,8 @@ var p2pListenerListenCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Forward p2p connections to a network multiaddr.",
ShortDescription: `
Register a p2p connection handler and forward the connections to a specified address.
Register a p2p connection handler and forward the connections to a specified
address.

Note that the connections originate from the ipfs daemon process.
`,
Expand Down Expand Up @@ -237,9 +239,9 @@ var p2pStreamDialCmd = &cmds.Command{
ShortDescription: `
Establish a new connection to a peer service.

When a connection is made to a peer service the ipfs daemon will setup one time
TCP listener and return it's bind port, this way a dialing application can
transparently connect to a p2p service.
When a connection is made to a peer service the ipfs daemon will setup one
time TCP listener and return it's bind port, this way a dialing application
can transparently connect to a p2p service.
`,
},
Arguments: []cmds.Argument{
Expand Down
6 changes: 4 additions & 2 deletions core/commands/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ the private key enables publishing new (signed) values. In both publish
and resolve, the default name used is the node's own PeerID,
which is the hash of its public key.

You can use the 'ipfs key' commands to list and generate more names and their respective keys.
You can use the 'ipfs key' commands to list and generate more names and their
respective keys.

Examples:

Expand All @@ -49,7 +50,8 @@ Publish an <ipfs-path> with another name, added by an 'ipfs key' command:
> ipfs name publish --key=mykey /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
Published to QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n: /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy

Alternatively, publish an <ipfs-path> using a valid PeerID(as listed by 'ipfs key list -l'):
Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
'ipfs key list -l'):

> ipfs name publish --key=QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
Published to QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n: /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
Expand Down
5 changes: 3 additions & 2 deletions core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ TOOL COMMANDS

Use 'ipfs <command> --help' to learn more about each command.

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