docs: ensure empty line between text and a following heading

This commit is contained in:
albertony
2024-04-05 21:39:44 +02:00
parent 05e5712bc4
commit e739ee2c27
18 changed files with 52 additions and 29 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ based on media formats or file extensions. Additionally, there is no
media transcoding support. This means that some players might show
files that they are not able to play back correctly.
` + dlnaflags.Help + vfs.Help,
` + dlnaflags.Help + vfs.Help(),
Annotations: map[string]string{
"versionIntroduced": "v1.46",
"groups": "Filter",
+2 -2
View File
@@ -10,8 +10,7 @@ import (
)
// Help contains the text for the command line help and manual.
var Help = `
### Server options
var Help = `### Server options
Use ` + "`--addr`" + ` to specify which IP address and port the server should
listen on, e.g. ` + "`--addr 1.2.3.4:8000` or `--addr :8080`" + ` to listen to all
@@ -22,6 +21,7 @@ default "rclone (hostname)".
Use ` + "`--log-trace` in conjunction with `-vv`" + ` to enable additional debug
logging of all UPNP traffic.
`
// Options is the type for DLNA serving options.
+7 -1
View File
@@ -5,6 +5,7 @@ import (
"context"
_ "embed"
"path/filepath"
"strings"
"syscall"
"github.com/spf13/cobra"
@@ -33,6 +34,11 @@ var (
//go:embed docker.md
var longHelp string
// help returns the help string cleaned up to simplify appending
func help() string {
return strings.TrimSpace(longHelp) + "\n\n"
}
func init() {
cmdFlags := Command.Flags()
// Add command specific flags
@@ -50,7 +56,7 @@ func init() {
var Command = &cobra.Command{
Use: "docker",
Short: `Serve any remote on docker's volume plugin API.`,
Long: longHelp + vfs.Help,
Long: help() + vfs.Help(),
Annotations: map[string]string{
"versionIntroduced": "v1.56",
"groups": "Filter",
+3 -3
View File
@@ -80,8 +80,7 @@ func init() {
var Command = &cobra.Command{
Use: "ftp remote:path",
Short: `Serve remote:path over FTP.`,
Long: `
Run a basic FTP server to serve a remote over FTP protocol.
Long: `Run a basic FTP server to serve a remote over FTP protocol.
This can be viewed with a FTP client or you can make a remote of
type FTP to read and write it.
@@ -100,7 +99,8 @@ then using Authentication is advised - see the next section for info.
By default this will serve files without needing a login.
You can set a single username and password with the --user and --pass flags.
` + vfs.Help + proxy.Help,
` + vfs.Help() + proxy.Help,
Annotations: map[string]string{
"versionIntroduced": "v1.44",
"groups": "Filter",
+2 -1
View File
@@ -73,7 +73,8 @@ The server will log errors. Use ` + "`-v`" + ` to see access logs.
` + "`--bwlimit`" + ` will be respected for file transfers. Use ` + "`--stats`" + ` to
control the stats printing.
` + libhttp.Help(flagPrefix) + libhttp.TemplateHelp(flagPrefix) + libhttp.AuthHelp(flagPrefix) + vfs.Help + proxy.Help,
` + libhttp.Help(flagPrefix) + libhttp.TemplateHelp(flagPrefix) + libhttp.AuthHelp(flagPrefix) + vfs.Help() + proxy.Help,
Annotations: map[string]string{
"versionIntroduced": "v1.39",
"groups": "Filter",
+1 -1
View File
@@ -92,7 +92,7 @@ Where ` + "`$PORT`" + ` is the same port number we used in the serve nfs command
This feature is only available on Unix platforms.
` + vfs.Help,
` + vfs.Help(),
Annotations: map[string]string{
"versionIntroduced": "v1.65",
"groups": "Filter",
+2 -2
View File
@@ -23,8 +23,7 @@ import (
)
// Help contains text describing how to use the proxy
var Help = strings.Replace(`
### Auth Proxy
var Help = strings.Replace(`### Auth Proxy
If you supply the parameter |--auth-proxy /path/to/program| then
rclone will use that program to generate backends on the fly which
@@ -104,6 +103,7 @@ before it takes effect.
This can be used to build general purpose proxies to any kind of
backend that rclone supports.
`, "|", "`", -1)
// Options is options for creating the proxy
+1
View File
@@ -147,6 +147,7 @@ these **must** end with /. Eg
The` + "`--private-repos`" + ` flag can be used to limit users to repositories starting
with a path of ` + "`/<username>/`" + `.
` + libhttp.Help(flagPrefix) + libhttp.AuthHelp(flagPrefix),
Annotations: map[string]string{
"versionIntroduced": "v1.40",
+7 -1
View File
@@ -3,6 +3,7 @@ package s3
import (
"context"
_ "embed"
"strings"
"github.com/rclone/rclone/cmd"
"github.com/rclone/rclone/fs/config/flags"
@@ -40,6 +41,11 @@ func init() {
//go:embed serve_s3.md
var serveS3Help string
// help returns the help string cleaned up to simplify appending
func help() string {
return strings.TrimSpace(serveS3Help) + "\n\n"
}
// Command definition for cobra
var Command = &cobra.Command{
Annotations: map[string]string{
@@ -49,7 +55,7 @@ var Command = &cobra.Command{
},
Use: "s3 remote:path",
Short: `Serve remote:path over s3.`,
Long: serveS3Help + httplib.Help(flagPrefix) + vfs.Help,
Long: help() + httplib.Help(flagPrefix) + vfs.Help(),
RunE: func(command *cobra.Command, args []string) error {
cmd.CheckArgs(1, 1, command, args)
f := cmd.NewFsSrc(args)
+1 -1
View File
@@ -114,7 +114,7 @@ used. Omitting "restrict" and using ` + "`--sftp-path-override`" + ` to enable
checksumming is possible but less secure and you could use the SFTP server
provided by OpenSSH in this case.
` + vfs.Help + proxy.Help,
` + vfs.Help() + proxy.Help,
Annotations: map[string]string{
"versionIntroduced": "v1.48",
"groups": "Filter",
+3 -1
View File
@@ -89,6 +89,7 @@ supported hash on the backend or you can use a named hash such as
to see the full list.
### Access WebDAV on Windows
WebDAV shared folder can be mapped as a drive on Windows, however the default settings prevent it.
Windows will fail to connect to the server using insecure Basic authentication.
It will not even display any login dialog. Windows requires SSL / HTTPS connection to be used with Basic.
@@ -104,6 +105,7 @@ If required, increase the FileSizeLimitInBytes to a higher value.
Navigate to the Services interface, then restart the WebClient service.
### Access Office applications on WebDAV
Navigate to following registry HKEY_CURRENT_USER\Software\Microsoft\Office\[14.0/15.0/16.0]\Common\Internet
Create a new DWORD BasicAuthLevel with value 2.
0 - Basic authentication disabled
@@ -112,7 +114,7 @@ Create a new DWORD BasicAuthLevel with value 2.
https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint
` + libhttp.Help(flagPrefix) + libhttp.TemplateHelp(flagPrefix) + libhttp.AuthHelp(flagPrefix) + vfs.Help + proxy.Help,
` + libhttp.Help(flagPrefix) + libhttp.TemplateHelp(flagPrefix) + libhttp.AuthHelp(flagPrefix) + vfs.Help() + proxy.Help,
Annotations: map[string]string{
"versionIntroduced": "v1.39",
"groups": "Filter",