diff --git a/backend/all/all.go b/backend/all/all.go index e06ad4e80..17fb6ddf2 100644 --- a/backend/all/all.go +++ b/backend/all/all.go @@ -9,6 +9,7 @@ import ( _ "github.com/rclone/rclone/backend/box" _ "github.com/rclone/rclone/backend/cache" _ "github.com/rclone/rclone/backend/chunker" + _ "github.com/rclone/rclone/backend/compress" _ "github.com/rclone/rclone/backend/crypt" _ "github.com/rclone/rclone/backend/drive" _ "github.com/rclone/rclone/backend/dropbox" @@ -28,7 +29,6 @@ import ( _ "github.com/rclone/rclone/backend/opendrive" _ "github.com/rclone/rclone/backend/pcloud" _ "github.com/rclone/rclone/backend/premiumizeme" - _ "github.com/rclone/rclone/backend/press" _ "github.com/rclone/rclone/backend/putio" _ "github.com/rclone/rclone/backend/qingstor" _ "github.com/rclone/rclone/backend/s3" diff --git a/backend/press/press.go b/backend/compress/compress.go similarity index 99% rename from backend/press/press.go rename to backend/compress/compress.go index 68c85b520..72aeb4df7 100644 --- a/backend/press/press.go +++ b/backend/compress/compress.go @@ -1,5 +1,5 @@ -// Package press provides wrappers for Fs and Object which implement compression. -package press +// Package compress provides wrappers for Fs and Object which implement compression. +package compress import ( "bufio" @@ -61,7 +61,7 @@ func init() { // Register our remote fs.Register(&fs.RegInfo{ - Name: "press", + Name: "compress", Description: "Compress a remote", NewFs: NewFs, Options: []fs.Option{{ diff --git a/backend/press/press_test.go b/backend/compress/compress_test.go similarity index 89% rename from backend/press/press_test.go rename to backend/compress/compress_test.go index eb0fdc373..9271ead78 100644 --- a/backend/press/press_test.go +++ b/backend/compress/compress_test.go @@ -1,5 +1,5 @@ // Test Crypt filesystem interface -package press +package compress import ( "os" @@ -41,8 +41,8 @@ func TestRemoteGzip(t *testing.T) { if *fstest.RemoteName != "" { t.Skip("Skipping as -remote set") } - tempdir := filepath.Join(os.TempDir(), "rclone-press-test-gzip") - name := "TestPressGzip" + tempdir := filepath.Join(os.TempDir(), "rclone-compress-test-gzip") + name := "TestCompressGzip" fstests.Run(t, &fstests.Opt{ RemoteName: name + ":", NilObject: (*Object)(nil), @@ -60,7 +60,7 @@ func TestRemoteGzip(t *testing.T) { "SetTier", }, ExtraConfig: []fstests.ExtraConfigItem{ - {Name: name, Key: "type", Value: "press"}, + {Name: name, Key: "type", Value: "compress"}, {Name: name, Key: "remote", Value: tempdir}, {Name: name, Key: "compression_mode", Value: "gzip"}, }, diff --git a/backend/press/.gitignore b/backend/press/.gitignore deleted file mode 100644 index 9daeafb98..000000000 --- a/backend/press/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/docs/content/press.md b/docs/content/compress.md similarity index 83% rename from docs/content/press.md rename to docs/content/compress.md index ad11d539c..40daaa66d 100644 --- a/docs/content/press.md +++ b/docs/content/compress.md @@ -1,13 +1,13 @@ --- -title: "Press" +title: "Compress" description: "Compression Remote" date: "2020-09-14" --- -Press (Experimental) +Compress (Experimental) ----------------------------------------- -The `press` remote adds compression to another remote. It is best used with remotes containing +The `Compress` remote adds compression to another remote. It is best used with remotes containing many large compressible files. Please read the [warnings](#warnings) before using this remote. @@ -30,13 +30,13 @@ c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> n -name> press +name> compress ... 8 / Compress a remote - \ "press" + \ "compress" ... -Storage> press -** See help for press backend at: https://rclone.org/press/ ** +Storage> compress +** See help for compress backend at: https://rclone.org/compress/ ** Remote to compress. Enter a string value. Press Enter for the default (""). @@ -53,8 +53,8 @@ n) No (default) y/n> n Remote config -------------------- -[press] -type = press +[compress] +type = compress remote = remote_to_press:subdir compression_mode = gzip -------------------- @@ -87,26 +87,26 @@ This remote is currently **experimental**. Things may break and data may be lost at your own risk. Please understand the risks associated with using experimental code and don't use this remote in critical applications. -{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/press/press.go then run make backenddocs" >}} +{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/compress/compress.go then run make backenddocs" >}} ### Standard Options -Here are the standard options specific to press (Compress a remote). +Here are the standard options specific to compress (Compress a remote). -#### --press-remote +#### --compress-remote Remote to compress. - Config: remote -- Env Var: RCLONE_PRESS_REMOTE +- Env Var: RCLONE_COMPRESS_REMOTE - Type: string - Default: "" -#### --press-mode +#### --compress-mode Compression mode. - Config: mode -- Env Var: RCLONE_PRESS_MODE +- Env Var: RCLONE_COMPRESS_MODE - Type: string - Default: "gzip" - Examples: @@ -115,9 +115,9 @@ Compression mode. ### Advanced Options -Here are the advanced options specific to press (Compress a remote). +Here are the advanced options specific to compress (Compress a remote). -#### --press-level +#### --compress-level GZIP compression level (-2 to 9). @@ -130,7 +130,7 @@ GZIP compression level (-2 to 9). Level 0 turns off compression. - Config: level -- Env Var: RCLONE_PRESS_LEVEL +- Env Var: RCLONE_COMPRESS_LEVEL - Type: int - Default: -1